1
0
Fork 0
aedrix-kernel/include/framebuffer.h

28 lines
696 B
C
Raw Normal View History

#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
// 1, 2, and 4 bit color are currently unsupported
//#define FB_COLOR_DEPTH_1 1
//#define FB_COLOR_DEPTH_2 2
//#define FB_COLOR_DEPTH_4 4
#define FB_COLOR_DEPTH_8 8
#define FB_COLOR_DEPTH_16 16
#define FB_COLOR_DEPTH_24 24
struct fbdev {
unsigned int pixelwidth, pixelheight;
unsigned int color_depth;
void *fbaddr; //start address of the frame buffer in memory
void *device_ptr; //passed into device
};
struct fb {
unsigned int width, height;
unsigned int color_depth;
struct fbdev *device;
};
int fb_write_pixel(struct fb *f, unsigned int x, unsigned int y, unsigned int r, unsigned int g, unsigned int b);
#endif /* FRAMEBUFFER_H */