projects
/
vuplus_dvbapp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup and remove FactoryTest
[vuplus_dvbapp]
/
lib
/
gdi
/
lcd.cpp
diff --git
a/lib/gdi/lcd.cpp
b/lib/gdi/lcd.cpp
old mode 100644
(file)
new mode 100755
(executable)
index
ae0477b
..
04ed7e2
--- a/
lib/gdi/lcd.cpp
+++ b/
lib/gdi/lcd.cpp
@@
-4,8
+4,12
@@
#include <fcntl.h>
#include <sys/ioctl.h>
#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>
#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/gdi/esize.h>
#include <lib/base/init.h>
@@
-56,7
+60,9
@@
eDBoxLCD::eDBoxLCD()
lcdfd = open("/dev/dbox/oled0", O_RDWR);
if (lcdfd < 0)
{
lcdfd = open("/dev/dbox/oled0", O_RDWR);
if (lcdfd < 0)
{
- FILE *f=fopen("/proc/stb/fp/oled_brightness", "w");
+ FILE *f=fopen("/proc/stb/lcd/oled_brightness", "w");
+ if (!f)
+ f = fopen("/proc/stb/fp/oled_brightness", "w");
if (f)
{
is_oled = 2;
if (f)
{
is_oled = 2;
@@
-68,10
+74,6
@@
eDBoxLCD::eDBoxLCD()
eDebug("found OLED display!");
is_oled = 1;
}
eDebug("found OLED display!");
is_oled = 1;
}
-#else
- lcdfd = -1;
-#endif
- instance=this;
if (lcdfd<0)
eDebug("couldn't open LCD - load lcd.o!");
if (lcdfd<0)
eDebug("couldn't open LCD - load lcd.o!");
@@
-104,6
+106,15
@@
eDBoxLCD::eDBoxLCD()
is_oled = 3;
}
}
is_oled = 3;
}
}
+#endif
+#ifdef SET_RIGHT_HALF_VFD_SKIN
+ fprintf(stdout,"SET RIGHT HALF VFD SKIN\n");
+ FILE *f = fopen("/proc/stb/lcd/right_half", "w");
+ fprintf(f,"skin");
+ fclose(f);
+#endif
+ instance=this;
+
setSize(xres, yres, bpp);
}
setSize(xres, yres, bpp);
}
@@
-115,6
+126,7
@@
void eDBoxLCD::setInverted(unsigned char inv)
int eDBoxLCD::setLCDContrast(int contrast)
{
int eDBoxLCD::setLCDContrast(int contrast)
{
+#ifndef NO_LCD
int fp;
if((fp=open("/dev/dbox/fp0", O_RDWR))<=0)
{
int fp;
if((fp=open("/dev/dbox/fp0", O_RDWR))<=0)
{
@@
-127,17
+139,21
@@
int eDBoxLCD::setLCDContrast(int contrast)
eDebug("[LCD] can't set lcd contrast");
}
close(fp);
eDebug("[LCD] can't set lcd contrast");
}
close(fp);
+#endif
return(0);
}
int eDBoxLCD::setLCDBrightness(int brightness)
{
return(0);
}
int eDBoxLCD::setLCDBrightness(int brightness)
{
+#ifndef NO_LCD
eDebug("setLCDBrightness %d", brightness);
eDebug("setLCDBrightness %d", brightness);
- FILE *f=fopen("/proc/stb/fp/oled_brightness", "w");
+ FILE *f=fopen("/proc/stb/lcd/oled_brightness", "w");
+ if (!f)
+ f = fopen("/proc/stb/fp/oled_brightness", "w");
if (f)
{
if (fprintf(f, "%d", brightness) == 0)
if (f)
{
if (fprintf(f, "%d", brightness) == 0)
- eDebug("write /proc/stb/
fp
/oled_brightness failed!! (%m)");
+ eDebug("write /proc/stb/
lcd
/oled_brightness failed!! (%m)");
fclose(f);
}
else
fclose(f);
}
else
@@
-153,6
+169,7
@@
int eDBoxLCD::setLCDBrightness(int brightness)
eDebug("[LCD] can't set lcd brightness (%m)");
close(fp);
}
eDebug("[LCD] can't set lcd brightness (%m)");
close(fp);
}
+#endif
return(0);
}
return(0);
}
@@
-172,6
+189,9
@@
eDBoxLCD *eDBoxLCD::getInstance()
void eDBoxLCD::update()
{
void eDBoxLCD::update()
{
+#ifdef BUILD_VUPLUS
+ return ;
+#endif
if (lcdfd >= 0)
{
if (!is_oled || is_oled == 2)
if (lcdfd >= 0)
{
if (!is_oled || is_oled == 2)