diff options
author | Szymon Dziok <b0hoon@o2.pl> | 2014-06-14 17:47:37 +0000 |
---|---|---|
committer | Szymon Dziok <b0hoon@o2.pl> | 2014-06-18 18:06:17 +0000 |
commit | 81db2f5eb040f286f9184e2da9094b151be3c7c0 (patch) | |
tree | aa548ef1e11764433bceca50d59b58499d94fda4 /firmware/drivers/led.c | |
parent | 7107f0ac86370d3279892785af345597e89fe585 (diff) | |
download | rockbox-81db2f5eb040f286f9184e2da9094b151be3c7c0.tar.gz rockbox-81db2f5eb040f286f9184e2da9094b151be3c7c0.zip |
YH92x: Use the led near the lcd as the ATA led, instead of shine all the time.
Change-Id: I139d0a8dc00e4d5fd964c3667e598aec923cc1cd
Diffstat (limited to 'firmware/drivers/led.c')
-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 | ||