1
0
aedrix-kernel/include/framebuffer.h
Aaron Lindsay 38f87f12c5 Add basic framebuffer support (probably not working right yet?)
Possibly (probably) calculating wrong pixel values, addresses.
2012-09-07 23:54:04 -04:00

28 lines
696 B
C

#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 */