aboutsummaryrefslogtreecommitdiff
path: root/lib/gdi/lcd.h
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
committerFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
commitd63d2c3c6cbbd574dda4f8b00ebe6c661735edd5 (patch)
tree84d0cacfd0b6c1241c236c7860f7cbd7f26901bb /lib/gdi/lcd.h
downloadenigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.tar.gz
enigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.zip
import of enigma2
Diffstat (limited to 'lib/gdi/lcd.h')
-rw-r--r--lib/gdi/lcd.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/gdi/lcd.h b/lib/gdi/lcd.h
new file mode 100644
index 00000000..567d0649
--- /dev/null
+++ b/lib/gdi/lcd.h
@@ -0,0 +1,53 @@
+#ifndef DISABLE_LCD
+
+#ifndef __lcd_h
+#define __lcd_h
+
+#include <asm/types.h>
+#include <lib/gdi/esize.h>
+#include <lib/gdi/erect.h>
+
+#define LCD_CONTRAST_MIN 0
+#define LCD_CONTRAST_MAX 63
+#define LCD_BRIGHTNESS_MIN 0
+#define LCD_BRIGHTNESS_MAX 255
+
+class eLCD
+{
+protected:
+ eSize res;
+ unsigned char *_buffer;
+ int lcdfd;
+ int _stride;
+ int locked;
+public:
+ int lock();
+ void unlock();
+
+ eLCD(eSize size);
+ virtual ~eLCD();
+
+ __u8 *buffer() { return (__u8*)_buffer; }
+ int stride() { return _stride; }
+ eSize size() { return res; }
+
+ virtual void update()=0;
+};
+
+class eDBoxLCD: public eLCD
+{
+ static eDBoxLCD *instance;
+ unsigned char inverted;
+public:
+ static eDBoxLCD *getInstance();
+ int switchLCD(int state);
+ int setLCDParameter(int brightness, int contrast);
+ void setInverted( unsigned char );
+ eDBoxLCD();
+ ~eDBoxLCD();
+ void update();
+};
+
+#endif
+
+#endif //DISABLE_LCD