kernel: add header files
This commit is contained in:
49
include/kernel/fb.h
Normal file
49
include/kernel/fb.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef KERNEL_FB_H_
|
||||
#define KERNEL_FB_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum framebuffer_flags {
|
||||
FB_MODE_RGB = 0x01u,
|
||||
FB_MODE_VGATEXT = 0x02u,
|
||||
FB_MODE_PALETTE = 0x04u,
|
||||
};
|
||||
|
||||
struct framebuffer_bitfield {
|
||||
uint32_t b_offset;
|
||||
uint16_t b_length;
|
||||
};
|
||||
|
||||
struct framebuffer_varinfo {
|
||||
enum framebuffer_flags fb_flags;
|
||||
|
||||
uint32_t fb_xres;
|
||||
uint32_t fb_yres;
|
||||
uint32_t fb_bpp;
|
||||
uint32_t fb_stride;
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint32_t fb_xcells;
|
||||
uint32_t fb_ycells;
|
||||
};
|
||||
|
||||
struct {
|
||||
struct framebuffer_bitfield fb_red;
|
||||
struct framebuffer_bitfield fb_green;
|
||||
struct framebuffer_bitfield fb_blue;
|
||||
struct framebuffer_bitfield fb_alpha;
|
||||
};
|
||||
|
||||
struct {
|
||||
uintptr_t fb_palette_addr;
|
||||
uint16_t fb_palette_nr_colours;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
struct framebuffer_fixedinfo {
|
||||
uint64_t fb_baseptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user