35 // Bits in the control register |
35 // Bits in the control register |
36 #define SLCD_BLINK_CTRL 0x01 |
36 #define SLCD_BLINK_CTRL 0x01 |
37 #define SLCD_CURSOR_CTRL 0x02 |
37 #define SLCD_CURSOR_CTRL 0x02 |
38 #define SLCD_DISPLAY_CTRL 0x04 |
38 #define SLCD_DISPLAY_CTRL 0x04 |
39 |
39 |
|
40 extern int debug; |
|
41 |
40 |
42 |
41 struct slcdDataStruct |
43 struct slcdDataStruct |
42 { |
44 { |
43 int x; /* Start x pixels */ |
45 int x; /* Start x pixels */ |
44 int y; /* Start y pixels */ |
46 int y; /* Start y pixels */ |
183 |
185 |
184 |
186 |
185 |
187 |
186 void slcdBacklight(SGOBJ *dlg, int fd, int bl) |
188 void slcdBacklight(SGOBJ *dlg, int fd, int bl) |
187 { |
189 { |
188 fprintf(stdout, "slcdBacklight %d\n", bl); |
190 if (debug) |
|
191 fprintf(stdout, "slcdBacklight %d\n", bl); |
189 if (bl) |
192 if (bl) |
190 dlg[1].state |= SG_SELECTED; |
193 dlg[1].state |= SG_SELECTED; |
191 else |
194 else |
192 dlg[1].state &= ~SG_SELECTED; |
195 dlg[1].state &= ~SG_SELECTED; |
193 SDLGui_DrawLCD(dlg, 1); |
196 SDLGui_DrawLCD(dlg, 1); |