diff options
author | andreas 'randy' weinberger <vdr@smue.org> | 2010-02-21 19:58:27 +0100 |
---|---|---|
committer | andreas 'randy' weinberger <vdr@smue.org> | 2010-02-21 19:58:27 +0100 |
commit | 10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3 (patch) | |
tree | 60ad7c856565f03e145b2996d1bb5f9cd64c0532 /glcddrivers/framebuffer.h | |
download | graphlcd-base-10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3.tar.gz graphlcd-base-10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3.tar.bz2 |
initial git upload, based on graphlcd-base-0.1.5
Diffstat (limited to 'glcddrivers/framebuffer.h')
-rw-r--r-- | glcddrivers/framebuffer.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/glcddrivers/framebuffer.h b/glcddrivers/framebuffer.h new file mode 100644 index 0000000..79d1d77 --- /dev/null +++ b/glcddrivers/framebuffer.h @@ -0,0 +1,56 @@ +/* + * GraphLCD driver library + * + * framebuffer.h - framebuffer device + * Output goes to a framebuffer device + * + * This file is released under the GNU General Public License. Refer + * to the COPYING file distributed with this package. + * + * (c) 2004 Stephan Skrodzki + */ + +#ifndef _GLCDDRIVERS_FRAMEBUFFER_H_ +#define _GLCDDRIVERS_FRAMEBUFFER_H_ + +#include "driver.h" +#include <linux/fb.h> + + +namespace GLCD +{ + +class cDriverConfig; + +class cDriverFramebuffer : public cDriver +{ +private: + unsigned char ** LCD; + cDriverConfig * config; + cDriverConfig * oldConfig; + char *offbuff; + int fbfd; + struct fb_var_screeninfo vinfo; + struct fb_fix_screeninfo finfo; + long int screensize; + void *fbp; + int zoom; + + int CheckSetup(); + void SetPixel(int x, int y); + +public: + cDriverFramebuffer(cDriverConfig * config); + virtual ~cDriverFramebuffer(); + + virtual int Init(); + virtual int DeInit(); + + virtual void Clear(); + virtual void Set8Pixels(int x, int y, unsigned char data); + virtual void Refresh(bool refreshAll = false); +}; + +} // end of namespace + +#endif |