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 | |
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')
-rw-r--r-- | firmware/drivers/led.c | 16 | ||||
-rw-r--r-- | firmware/export/config/samsungyh920.h | 3 | ||||
-rw-r--r-- | firmware/export/config/samsungyh925.h | 3 |
3 files changed, 20 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 | ||
diff --git a/firmware/export/config/samsungyh920.h b/firmware/export/config/samsungyh920.h index 4837942eed..8717cb765c 100644 --- a/firmware/export/config/samsungyh920.h +++ b/firmware/export/config/samsungyh920.h | |||
@@ -115,6 +115,9 @@ | |||
115 | /* We're able to shut off power to the HDD */ | 115 | /* We're able to shut off power to the HDD */ |
116 | /* todo #define HAVE_ATA_POWER_OFF */ | 116 | /* todo #define HAVE_ATA_POWER_OFF */ |
117 | 117 | ||
118 | /* Software controlled LED */ | ||
119 | #define CONFIG_LED LED_REAL | ||
120 | |||
118 | /* Define this if you have a software controlled poweroff */ | 121 | /* Define this if you have a software controlled poweroff */ |
119 | #define HAVE_SW_POWEROFF | 122 | #define HAVE_SW_POWEROFF |
120 | 123 | ||
diff --git a/firmware/export/config/samsungyh925.h b/firmware/export/config/samsungyh925.h index ad04f6c81e..098bfc851d 100644 --- a/firmware/export/config/samsungyh925.h +++ b/firmware/export/config/samsungyh925.h | |||
@@ -112,6 +112,9 @@ | |||
112 | /* We're able to shut off power to the HDD */ | 112 | /* We're able to shut off power to the HDD */ |
113 | /* todo #define HAVE_ATA_POWER_OFF */ | 113 | /* todo #define HAVE_ATA_POWER_OFF */ |
114 | 114 | ||
115 | /* Software controlled LED */ | ||
116 | #define CONFIG_LED LED_REAL | ||
117 | |||
115 | /* Define this if you have a software controlled poweroff */ | 118 | /* Define this if you have a software controlled poweroff */ |
116 | #define HAVE_SW_POWEROFF | 119 | #define HAVE_SW_POWEROFF |
117 | 120 | ||