diff -r e54611453d29 -r e8e548922e31 brewpanel/slcd.c --- a/brewpanel/slcd.c Thu Nov 19 21:17:26 2015 +0100 +++ b/brewpanel/slcd.c Thu Nov 19 22:50:17 2015 +0100 @@ -50,6 +50,7 @@ int cy; /* Cursor y position */ Uint8 cgram[8][8]; /* Characters in CGRAM */ int control; /* Control register */ + int backlight; /* Backlight */ }; struct slcdDataStruct *slcds [MAX_SLCDS] ; @@ -150,7 +151,7 @@ { struct slcdDataStruct *lcd = slcds [fd]; - SDLGui_Char(lcd->x + (lcd->cx * 12) + 12, lcd->y + (lcd->cy * 18) + 8, data, 0); + SDLGui_Char(lcd->x + (lcd->cx * 12) + 12, lcd->y + (lcd->cy * 18) + 8, data, lcd->backlight); if (++lcd->cx == lcd->cols) { lcd->cx = 0; @@ -183,6 +184,15 @@ +void slcdBacklight(int fd, int bl) +{ + struct slcdDataStruct *lcd = slcds [fd]; + + lcd->backlight = bl; +} + + + int slcdInit(int fd, int x, int y, int w, int h, int cols, int rows) { static int initialised = 0; @@ -224,6 +234,7 @@ for (j = 0; j < 8; j++) lcd->cgram[i][j] = 0; lcd->control = 0; + lcd->backlight = 0; slcds[fd] = lcd;