Skip to content

Commit 81b330d

Browse files
authored
[Demo 2] Use lcd_BacklightLevel define (Fix #42)
1 parent f2f2f57 commit 81b330d

File tree

1 file changed

+7
-7
lines changed
  • CEdev/examples/demo_2/src

1 file changed

+7
-7
lines changed

CEdev/examples/demo_2/src/main.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717

1818
/* Put all your code here */
1919
void main(void) {
20-
uint8_t i, backlight_level;
20+
uint8_t i, bl_level_copy;
2121

22-
backlight_level = lcd_GetBacklightLevel();
22+
bl_level_copy = lcd_BacklightLevel;
2323

24-
for(i = backlight_level; i > 0; i--) {
24+
for(i = bl_level_copy; i > 0; i--) {
2525
boot_WaitShort();
26-
lcd_SetBacklightLevel(i);
26+
lcd_BacklightLevel = i;
2727
}
2828

2929
for(i = 0; i < 255; i++) {
3030
boot_WaitShort();
31-
lcd_SetBacklightLevel(i);
31+
lcd_BacklightLevel = i;
3232
}
3333

34-
lcd_SetBacklightLevel(backlight_level);
34+
lcd_BacklightLevel = bl_level_copy;
3535

3636
/* Clean up for the return to the OS */
3737
prgm_CleanUp();
38-
}
38+
}

0 commit comments

Comments
 (0)