diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/led.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/firmware/drivers/led.c b/firmware/drivers/led.c index 22583364d5..36a4e4eb87 100644 --- a/firmware/drivers/led.c +++ b/firmware/drivers/led.c | |||
@@ -27,15 +27,27 @@ | |||
27 | 27 | ||
28 | #if (CONFIG_LED == LED_REAL) | 28 | #if (CONFIG_LED == LED_REAL) |
29 | 29 | ||
30 | #if defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925) | ||
31 | |||
32 | #define LED_ON GPIO_CLEAR_BITWISE(GPIOF_OUTPUT_VAL, 0x20) | ||
33 | #define LED_OFF GPIO_SET_BITWISE(GPIOF_OUTPUT_VAL, 0x20) | ||
34 | |||
35 | #else | ||
36 | |||
37 | #define LED_ON or_b(0x40, &PBDRL) | ||
38 | #define LED_OFF and_b(~0x40, &PBDRL) | ||
39 | |||
40 | #endif /* SAMSUNG_YH920 || SAMSUNG_YH925 */ | ||
41 | |||
30 | void led(bool on) | 42 | void led(bool on) |
31 | { | 43 | { |
32 | if ( on ) | 44 | if ( on ) |
33 | { | 45 | { |
34 | or_b(0x40, &PBDRL); | 46 | LED_ON; |
35 | } | 47 | } |
36 | else | 48 | else |
37 | { | 49 | { |
38 | and_b(~0x40, &PBDRL); | 50 | LED_OFF; |
39 | } | 51 | } |
40 | } | 52 | } |
41 | 53 | ||