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 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
30void led(bool on) 42void 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