AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
fbdev.h
Go to the documentation of this file.
1
#ifndef _DEV_FB_H
2
#define _DEV_FB_H
3
4
/* Framebuffers (dev/fb/): /dev/fb0, with Linux's framebuffer API. */
5
6
/* Registers a framebuffer, and returns the first one. */
7
int
fbdev_register
(
int
,
void
*);
8
struct
fbdev
*
fbdev_primary
(
void
);
9
10
/* The kinds of framebuffer drivers. */
11
#define FBDEV_TYPE_VESA 1
12
extern
struct
fbdev
fbdev_vesa
;
13
14
/* Linux's framebuffer API */
15
#include <aquila/fb.h>
16
17
/* The drivers' side */
18
19
#include <
mm/vm.h
>
20
#include <
fs/iobuf.h
>
21
23
struct
fbdev
{
24
int
type
;
25
void
*
data
;
26
struct
fb_fix_screeninfo *
fix_screeninfo
;
27
struct
fb_var_screeninfo *
var_screeninfo
;
28
29
int (*
probe
)(
int
id,
struct
fbdev
*fb);
30
ssize_t
(*
read
) (
struct
fbdev
*fb,
off_t
offset,
struct
iobuf
*io);
31
ssize_t
(*
write
)(
struct
fbdev
*fb,
off_t
offset,
struct
iobuf
*io);
32
int (*
ioctl
)(
struct
fbdev
*fb,
int
request,
void
*argp);
33
int (*
map
) (
struct
fbdev
*fb,
struct
vm_space
*
vm_space
,
struct
vm_entry
*
vm_entry
);
34
};
35
36
#endif
/* ! _DEV_FB_H */
fbdev_primary
struct fbdev * fbdev_primary(void)
Returns the first framebuffer, once it is set up, for the virtual terminals.
Definition
fbdev.c:63
fbdev_register
int fbdev_register(int type, void *data)
Registers a framebuffer, which fbdev_probe() sets up with its driver.
Definition
fbdev.c:37
iobuf.h
fbdev_vesa
The boot loader's VBE framebuffer: what VBE said about the card and the mode (dev/fb/vesa/).
Definition
vesa.h:8
fbdev
A framebuffer: its driver, its screen's information, its operations.
Definition
fbdev.h:23
fbdev::probe
int(*) probe(int id, struct fbdev *fb)
Definition
fbdev.h:29
fbdev::write
ssize_t(*) write(struct fbdev *fb, off_t offset, struct iobuf *io)
Definition
fbdev.h:31
fbdev::ioctl
int(*) ioctl(struct fbdev *fb, int request, void *argp)
Definition
fbdev.h:32
fbdev::var_screeninfo
struct fb_var_screeninfo * var_screeninfo
Definition
fbdev.h:27
fbdev::type
int type
Definition
fbdev.h:24
fbdev::read
ssize_t(*) read(struct fbdev *fb, off_t offset, struct iobuf *io)
Definition
fbdev.h:30
fbdev::fix_screeninfo
struct fb_fix_screeninfo * fix_screeninfo
Definition
fbdev.h:26
fbdev::map
int(*) map(struct fbdev *fb, struct vm_space *vm_space, struct vm_entry *vm_entry)
Definition
fbdev.h:33
fbdev::data
void * data
Definition
fbdev.h:25
iobuf
An iobuf.
Definition
iobuf.h:35
vm_entry
A mapping (map entry): a range of an address space, its permissions, and where its pages come from.
Definition
vm.h:66
vm_space
An address space: its mappings, and its page tables.
Definition
vm.h:25
ssize_t
long int ssize_t
Definition
types.h:12
off_t
long int off_t
Definition
types.h:10
vm.h
kernel
include
dev
fbdev.h
Generated by
1.18.0