summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/led.c16
-rw-r--r--firmware/export/config/samsungyh920.h3
-rw-r--r--firmware/export/config/samsungyh925.h3
3 files changed, 20 insertions, 2 deletions
diff --git a/firmware/drivers/led.c b/firmware/drivers/led.c
index 2258336..36a4e4e 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;
}
}
diff --git a/firmware/export/config/samsungyh920.h b/firmware/export/config/samsungyh920.h
index 4837942..8717cb7 100644
--- a/firmware/export/config/samsungyh920.h
+++ b/firmware/export/config/samsungyh920.h
@@ -115,6 +115,9 @@
/* We're able to shut off power to the HDD */
/* todo #define HAVE_ATA_POWER_OFF */
+/* Software controlled LED */
+#define CONFIG_LED LED_REAL
+
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF
diff --git a/firmware/export/config/samsungyh925.h b/firmware/export/config/samsungyh925.h
index ad04f6c..098bfc8 100644
--- a/firmware/export/config/samsungyh925.h
+++ b/firmware/export/config/samsungyh925.h
@@ -112,6 +112,9 @@
/* We're able to shut off power to the HDD */
/* todo #define HAVE_ATA_POWER_OFF */
+/* Software controlled LED */
+#define CONFIG_LED LED_REAL
+
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF