#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>
eDebug("found OLED display!");
is_oled = 1;
}
-#else
- lcdfd = -1;
-#endif
- instance=this;
if (lcdfd<0)
eDebug("couldn't open LCD - load lcd.o!");
is_oled = 3;
}
}
+#endif
+ instance=this;
+
setSize(xres, yres, bpp);
}
int eDBoxLCD::setLCDContrast(int contrast)
{
+#ifndef NO_LCD
int fp;
if((fp=open("/dev/dbox/fp0", O_RDWR))<=0)
{
eDebug("[LCD] can't set lcd contrast");
}
close(fp);
+#endif
return(0);
}
int eDBoxLCD::setLCDBrightness(int brightness)
{
+#ifndef NO_LCD
eDebug("setLCDBrightness %d", brightness);
FILE *f=fopen("/proc/stb/lcd/oled_brightness", "w");
if (!f)
eDebug("[LCD] can't set lcd brightness (%m)");
close(fp);
}
+#endif
return(0);
}