@@ -13,6 +13,10 @@
#define CONFIG_GPIO_LED_INVERTED_TABLE {}
#endif
+#ifndef STATUS_LED_ON
+#define STATUS_LED_ON 2
+#endif
+
static led_id_t gpio_led_inv[] = CONFIG_GPIO_LED_INVERTED_TABLE;
static int gpio_led_gpio_value(led_id_t mask, int state)
@@ -27,11 +27,13 @@ typedef struct {
} led_dev_t;
led_dev_t led_dev[] = {
+#if defined(STATUS_LED_BIT)
{ STATUS_LED_BIT,
STATUS_LED_STATE,
STATUS_LED_PERIOD,
0,
},
+#endif
#if defined(STATUS_LED_BIT1)
{ STATUS_LED_BIT1,
STATUS_LED_STATE1,
@@ -103,6 +103,10 @@ void __led_blink(led_id_t mask, int freq);
# include <asm/status_led.h>
#endif
+#else
+
+typedef unsigned long led_id_t;
+
#endif /* CONFIG_STATUS_LED */
/*
From: Benjamin Tietz <benjamin@micronet24.de> If STATUS_LED isn't selected, neither led_id_t is selected, nor STATUS_LED_ON. The following will set led_id_t to a reasonable default and define STATUS_LED_ON for that case. --- drivers/misc/gpio_led.c | 4 ++++ drivers/misc/status_led.c | 2 ++ include/status_led.h | 4 ++++ 3 files changed, 10 insertions(+)