diff options
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r-- | firmware/backlight.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index 5173d7819c..9a1159e59f 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "rtc.h" | 26 | #include "rtc.h" |
27 | #include "usb.h" | 27 | #include "usb.h" |
28 | #include "power.h" | 28 | #include "power.h" |
29 | #include "system.h" | ||
29 | 30 | ||
30 | #define BACKLIGHT_ON 1 | 31 | #define BACKLIGHT_ON 1 |
31 | #define BACKLIGHT_OFF 2 | 32 | #define BACKLIGHT_OFF 2 |
@@ -73,7 +74,7 @@ void backlight_thread(void) | |||
73 | /* Disable square wave */ | 74 | /* Disable square wave */ |
74 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); | 75 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); |
75 | #else | 76 | #else |
76 | PADR |= 0x4000; | 77 | __set_bit_constant(14-8, &PADRH); |
77 | #endif | 78 | #endif |
78 | } | 79 | } |
79 | /* else if(backlight_timer) */ | 80 | /* else if(backlight_timer) */ |
@@ -83,7 +84,7 @@ void backlight_thread(void) | |||
83 | /* Enable square wave */ | 84 | /* Enable square wave */ |
84 | rtc_write(0x0a, rtc_read(0x0a) | 0x40); | 85 | rtc_write(0x0a, rtc_read(0x0a) | 0x40); |
85 | #else | 86 | #else |
86 | PADR &= ~0x4000; | 87 | __clear_bit_constant(14-8, &PADRH); |
87 | #endif | 88 | #endif |
88 | } | 89 | } |
89 | break; | 90 | break; |
@@ -93,7 +94,7 @@ void backlight_thread(void) | |||
93 | /* Disable square wave */ | 94 | /* Disable square wave */ |
94 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); | 95 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); |
95 | #else | 96 | #else |
96 | PADR |= 0x4000; | 97 | __set_bit_constant(14-8, &PADRH); |
97 | #endif | 98 | #endif |
98 | break; | 99 | break; |
99 | 100 | ||
@@ -171,7 +172,7 @@ void backlight_init(void) | |||
171 | create_thread(backlight_thread, backlight_stack, | 172 | create_thread(backlight_thread, backlight_stack, |
172 | sizeof(backlight_stack), backlight_thread_name); | 173 | sizeof(backlight_stack), backlight_thread_name); |
173 | 174 | ||
174 | PAIOR |= 0x4000; | 175 | __set_bit_constant(14-8, &PAIORH); |
175 | 176 | ||
176 | backlight_on(); | 177 | backlight_on(); |
177 | } | 178 | } |