diff options
| author | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-11-09 02:15:09 +0000 |
|---|---|---|
| committer | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-11-09 02:15:09 +0000 |
| commit | 1e88da3ea994175689ab4d8edbc1fd809f1d6ad8 (patch) | |
| tree | 61d3330fd7690c45651588ec5e9cbdb86701c174 /lib/gdi/lcd.cpp | |
| parent | d7d95c7b2435ab1819bc23eff5ff53aaac2b9ff1 (diff) | |
| download | enigma2-1e88da3ea994175689ab4d8edbc1fd809f1d6ad8.tar.gz enigma2-1e88da3ea994175689ab4d8edbc1fd809f1d6ad8.zip | |
added setContrast, setBrightness and removed SetParam(bright, contrast)
Diffstat (limited to 'lib/gdi/lcd.cpp')
| -rw-r--r-- | lib/gdi/lcd.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/gdi/lcd.cpp b/lib/gdi/lcd.cpp index 6b353230..776173dd 100644 --- a/lib/gdi/lcd.cpp +++ b/lib/gdi/lcd.cpp @@ -64,11 +64,6 @@ eDBoxLCD::eDBoxLCD(): eLCD(eSize(128, 64)) { int i=LCD_MODE_BIN; ioctl(lcdfd, LCD_IOCTL_ASC_MODE, &i); - int lcdbrightness=0, lcdcontrast=0; - - lcdbrightness=130; - lcdcontrast=32; - setLCDParameter(lcdbrightness, lcdcontrast); inverted=0; } } @@ -79,7 +74,7 @@ void eDBoxLCD::setInverted(unsigned char inv) update(); } -int eDBoxLCD::setLCDParameter(int brightness, int contrast) +int eDBoxLCD::setLCDContrast(int contrast) { int fp; if((fp=open("/dev/dbox/fp0", O_RDWR))<=0) @@ -92,12 +87,22 @@ int eDBoxLCD::setLCDParameter(int brightness, int contrast) { eDebug("[LCD] can't set lcd contrast"); } + return(0); +} + +int eDBoxLCD::setLCDBrightness(int brightness) +{ + int fp; + if((fp=open("/dev/dbox/fp0", O_RDWR))<=0) + { + eDebug("[LCD] can't open /dev/dbox/fp0"); + return(-1); + } if(ioctl(fp, FP_IOCTL_LCD_DIMM, &brightness)) { eDebug("[LCD] can't set lcd brightness"); } - eDebug("[LCD] set brightness %d, contrast %d", brightness, contrast); return(0); } |
