graphlcd-base/glcddrivers/framebuffer.h
changeset 4 df6a40031aa5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/graphlcd-base/glcddrivers/framebuffer.h	Wed Feb 06 17:32:55 2008 +0000
     1.3 @@ -0,0 +1,56 @@
     1.4 +/*
     1.5 + * GraphLCD driver library
     1.6 + *
     1.7 + * framebuffer.h  -  framebuffer device
     1.8 + *                   Output goes to a framebuffer device
     1.9 + *
    1.10 + * This file is released under the GNU General Public License. Refer
    1.11 + * to the COPYING file distributed with this package.
    1.12 + *
    1.13 + * (c) 2004 Stephan Skrodzki
    1.14 + */
    1.15 +
    1.16 +#ifndef _GLCDDRIVERS_FRAMEBUFFER_H_
    1.17 +#define _GLCDDRIVERS_FRAMEBUFFER_H_
    1.18 +
    1.19 +#include "driver.h"
    1.20 +#include <linux/fb.h>
    1.21 +
    1.22 +
    1.23 +namespace GLCD
    1.24 +{
    1.25 +
    1.26 +class cDriverConfig;
    1.27 +
    1.28 +class cDriverFramebuffer : public cDriver
    1.29 +{
    1.30 +private:
    1.31 +    unsigned char ** LCD;
    1.32 +    cDriverConfig * config;
    1.33 +    cDriverConfig * oldConfig;
    1.34 +    char *offbuff;
    1.35 +    int fbfd;
    1.36 +    struct fb_var_screeninfo vinfo;
    1.37 +    struct fb_fix_screeninfo finfo;
    1.38 +    long int screensize;
    1.39 +    void *fbp;
    1.40 +    int zoom;
    1.41 +
    1.42 +    int CheckSetup();
    1.43 +    void SetPixel(int x, int y);
    1.44 +
    1.45 +public:
    1.46 +    cDriverFramebuffer(cDriverConfig * config);
    1.47 +    virtual ~cDriverFramebuffer();
    1.48 +
    1.49 +    virtual int Init();
    1.50 +    virtual int DeInit();
    1.51 +
    1.52 +    virtual void Clear();
    1.53 +    virtual void Set8Pixels(int x, int y, unsigned char data);
    1.54 +    virtual void Refresh(bool refreshAll = false);
    1.55 +};
    1.56 +
    1.57 +} // end of namespace
    1.58 +
    1.59 +#endif