From f9cb3d0992d6a533244dd6217cb86725342b1a94 Mon Sep 17 00:00:00 2001 From: bsx Date: Sun, 22 May 2011 17:48:02 +0200 Subject: [PATCH] added lcdInvert added possibility to output the display buffer inverted --- lcd/display.c | 12 +++++++++++- lcd/display.h | 1 + modules/bsx.c | 12 +++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lcd/display.c b/lcd/display.c index 75b2a36..0328dc5 100644 --- a/lcd/display.c +++ b/lcd/display.c @@ -30,6 +30,7 @@ void delayms(uint32_t ms) /**************************************************************************/ uint8_t lcdBuffer[RESX*RESY_B]; +int inverted = 0; /* //TODO FIXME why doenst that work ? @@ -160,7 +161,16 @@ void lcdDisplay(uint32_t shift) uint16_t i,page; for(page=0; page 100) brightness = 100; backlightSetBrightness(brightness); - }; + } if(gpioGetValue(RB_BTN0)==0){ brightness--; if (brightness > 100) brightness = 0; backlightSetBrightness(brightness); - }; + } + + if (gpioGetValue(RB_BTN3) == 0) { + while(gpioGetValue(RB_BTN3)==0); + lcdInvert(); + } if (gpioGetValue(RB_BTN4)==0) { while(gpioGetValue(RB_BTN4)==0); DoString(0,8,"Enter ISP!"); lcdDisplay(0); ReinvokeISP(); - }; + } dx = DoString(0, yctr, "Bright:"); dx = DoInt(dx, yctr, brightness); @@ -72,3 +77,4 @@ void module_bsx(void) { return; } +