summaryrefslogtreecommitdiffstats
path: root/firmware/drivers
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2014-06-14 17:47:37 +0000
committerSzymon Dziok <b0hoon@o2.pl>2014-06-18 18:06:17 +0000
commit81db2f5eb040f286f9184e2da9094b151be3c7c0 (patch)
treeaa548ef1e11764433bceca50d59b58499d94fda4 /firmware/drivers
parent7107f0ac86370d3279892785af345597e89fe585 (diff)
downloadrockbox-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')
-rw-r--r--firmware/drivers/led.c16
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 @@
#if (CONFIG_LED == LED_REAL)
+#if defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925)
+
+#define LED_ON GPIO_CLEAR_BITWISE(GPIOF_OUTPUT_VAL, 0x20)
+#define LED_OFF GPIO_SET_BITWISE(GPIOF_OUTPUT_VAL, 0x20)
+
+#else
+
+#define LED_ON or_b(0x40, &PBDRL)
+#define LED_OFF and_b(~0x40, &PBDRL)
+
+#endif /* SAMSUNG_YH920 || SAMSUNG_YH925 */
+
void led(bool on)
{
if ( on )
{
- or_b(0x40, &PBDRL);
+ LED_ON;
}
else
{
- and_b(~0x40, &PBDRL);
+ LED_OFF;
}
}