You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
1.5 KiB

/*
Copyright (C) 2012, Aaron Lindsay <aaron@aclindsay.com>
This file is part of Aedrix.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#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 */