lcd: remove the need for dbox includes
authorpieterg <pieterg@users.sourceforge.net>
Wed, 16 May 2012 16:14:55 +0000 (18:14 +0200)
committerpieterg <pieterg@users.sourceforge.net>
Wed, 16 May 2012 16:14:55 +0000 (18:14 +0200)
configure.ac
lib/gdi/lcd.cpp

index 972effc..4e62e42 100644 (file)
@@ -14,8 +14,6 @@ AC_PROG_CXX
 m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
 AC_CONFIG_MACRO_DIR([m4])
 
-AC_CHECK_HEADERS([dbox/fp.h dbox/lcd-ks0713.h])
-
 AC_PATH_PROG(MSGFMT, msgfmt, AC_MSG_ERROR(Could not find msgfmt))
 
 AM_PATH_PYTHON
index 7132eb1..abe2a72 100644 (file)
@@ -4,13 +4,6 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 
-#if defined(HAVE_DBOX_FP_H) && defined(HAVE_DBOX_LCD_KS0713_H)
-#include <dbox/fp.h>
-#include <dbox/lcd-ks0713.h>
-#else
-#define NO_LCD 1
-#endif
-
 #include <lib/gdi/esize.h>
 #include <lib/base/init.h>
 #include <lib/base/init_num.h>
@@ -91,6 +84,14 @@ eDBoxLCD::eDBoxLCD()
                eDebug("couldn't open LCD - load lcd.ko!");
        else
        {
+
+#ifndef LCD_IOCTL_ASC_MODE
+#define LCDSET                  0x1000
+#define LCD_IOCTL_ASC_MODE             (21|LCDSET)
+#define        LCD_MODE_ASC                    0
+#define        LCD_MODE_BIN                    1
+#endif
+
                int i=LCD_MODE_BIN;
                ioctl(lcdfd, LCD_IOCTL_ASC_MODE, &i);
                FILE *f = fopen("/proc/stb/lcd/xres", "r");
@@ -138,6 +139,12 @@ void eDBoxLCD::setFlipped(bool onoff)
 int eDBoxLCD::setLCDContrast(int contrast)
 {
 #ifndef NO_LCD
+
+#ifndef LCD_IOCTL_SRV
+#define LCDSET                  0x1000
+#define        LCD_IOCTL_SRV                   (10|LCDSET)
+#endif
+
        int fp;
        if((fp=open("/dev/dbox/fp0", O_RDWR))<0)
        {