AquilaOS documentation
How it works, and its code
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. */
7int fbdev_register(int, void*);
8struct fbdev *fbdev_primary(void);
9
10/* The kinds of framebuffer drivers. */
11#define FBDEV_TYPE_VESA 1
12extern 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
23struct 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 */
struct fbdev * fbdev_primary(void)
Returns the first framebuffer, once it is set up, for the virtual terminals.
Definition fbdev.c:63
int fbdev_register(int type, void *data)
Registers a framebuffer, which fbdev_probe() sets up with its driver.
Definition fbdev.c:37
The boot loader's VBE framebuffer: what VBE said about the card and the mode (dev/fb/vesa/).
Definition vesa.h:8
A framebuffer: its driver, its screen's information, its operations.
Definition fbdev.h:23
int(*) probe(int id, struct fbdev *fb)
Definition fbdev.h:29
ssize_t(*) write(struct fbdev *fb, off_t offset, struct iobuf *io)
Definition fbdev.h:31
int(*) ioctl(struct fbdev *fb, int request, void *argp)
Definition fbdev.h:32
struct fb_var_screeninfo * var_screeninfo
Definition fbdev.h:27
int type
Definition fbdev.h:24
ssize_t(*) read(struct fbdev *fb, off_t offset, struct iobuf *io)
Definition fbdev.h:30
struct fb_fix_screeninfo * fix_screeninfo
Definition fbdev.h:26
int(*) map(struct fbdev *fb, struct vm_space *vm_space, struct vm_entry *vm_entry)
Definition fbdev.h:33
void * data
Definition fbdev.h:25
An iobuf.
Definition iobuf.h:35
A mapping (map entry): a range of an address space, its permissions, and where its pages come from.
Definition vm.h:66
An address space: its mappings, and its page tables.
Definition vm.h:25
long int ssize_t
Definition types.h:12
long int off_t
Definition types.h:10