diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-11-13 23:54:50 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-11-13 23:54:50 +0100 |
commit | a95c4933c4ef7631c077fc040076e71c8d46209a (patch) | |
tree | f54f775f2795e783d3190de8b1c16066d64e1fab /drivers/gdisp/ILI9320 | |
parent | 81f6af7e453b4ac86264dd5197e185d0d4ed0d22 (diff) | |
download | uGFX-a95c4933c4ef7631c077fc040076e71c8d46209a.tar.gz uGFX-a95c4933c4ef7631c077fc040076e71c8d46209a.tar.bz2 uGFX-a95c4933c4ef7631c077fc040076e71c8d46209a.zip |
Backlight fix
Diffstat (limited to 'drivers/gdisp/ILI9320')
-rw-r--r-- | drivers/gdisp/ILI9320/gdisp_lld.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gdisp/ILI9320/gdisp_lld.c b/drivers/gdisp/ILI9320/gdisp_lld.c index 4b485d79..7b9eda27 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld.c +++ b/drivers/gdisp/ILI9320/gdisp_lld.c @@ -508,10 +508,9 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) { return;
case GDISP_CONTROL_BACKLIGHT:
- if(GDISP.Backlight == (*(uint8_t*)value))
- return;
- GDISP_LLD(set_backlight)(*(uint8_t*)value);
- GDISP.Backlight = (*(uint8_t*)value);
+ if((unsigned)value > 100) value = (void *)100;
+ GDISP_LLD(set_backlight)((unsigned)value);
+ GDISP.Backlight = (unsigned)value;
break;
default:
|