From a95c4933c4ef7631c077fc040076e71c8d46209a Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Tue, 13 Nov 2012 23:54:50 +0100 Subject: Backlight fix --- drivers/gdisp/ILI9320/gdisp_lld.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gdisp/ILI9320/gdisp_lld.c') 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: -- cgit v1.2.3