aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gdisp')
-rw-r--r--drivers/gdisp/ILI9320/gdisp_lld.c7
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: