diff options
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r-- | firmware/backlight.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index 9a1159e59f..d3b4580daa 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -74,7 +74,7 @@ void backlight_thread(void) | |||
74 | /* Disable square wave */ | 74 | /* Disable square wave */ |
75 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); | 75 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); |
76 | #else | 76 | #else |
77 | __set_bit_constant(14-8, &PADRH); | 77 | or_b(0x40, &PADRH); |
78 | #endif | 78 | #endif |
79 | } | 79 | } |
80 | /* else if(backlight_timer) */ | 80 | /* else if(backlight_timer) */ |
@@ -84,7 +84,7 @@ void backlight_thread(void) | |||
84 | /* Enable square wave */ | 84 | /* Enable square wave */ |
85 | rtc_write(0x0a, rtc_read(0x0a) | 0x40); | 85 | rtc_write(0x0a, rtc_read(0x0a) | 0x40); |
86 | #else | 86 | #else |
87 | __clear_bit_constant(14-8, &PADRH); | 87 | and_b(~0x40, &PADRH); |
88 | #endif | 88 | #endif |
89 | } | 89 | } |
90 | break; | 90 | break; |
@@ -94,7 +94,7 @@ void backlight_thread(void) | |||
94 | /* Disable square wave */ | 94 | /* Disable square wave */ |
95 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); | 95 | rtc_write(0x0a, rtc_read(0x0a) & ~0x40); |
96 | #else | 96 | #else |
97 | __set_bit_constant(14-8, &PADRH); | 97 | or_b(0x40, &PADRH); |
98 | #endif | 98 | #endif |
99 | break; | 99 | break; |
100 | 100 | ||
@@ -172,7 +172,10 @@ void backlight_init(void) | |||
172 | create_thread(backlight_thread, backlight_stack, | 172 | create_thread(backlight_thread, backlight_stack, |
173 | sizeof(backlight_stack), backlight_thread_name); | 173 | sizeof(backlight_stack), backlight_thread_name); |
174 | 174 | ||
175 | __set_bit_constant(14-8, &PAIORH); | 175 | #ifndef HAVE_RTC |
176 | |||
177 | or_b(0x40, &PAIORH); /* Set data direction of PA14 */ | ||
178 | #endif | ||
176 | 179 | ||
177 | backlight_on(); | 180 | backlight_on(); |
178 | } | 181 | } |