diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/led.c | 5 | ||||
-rw-r--r-- | firmware/panic.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/firmware/drivers/led.c b/firmware/drivers/led.c index a9be9399c8..2799b7cd8c 100644 --- a/firmware/drivers/led.c +++ b/firmware/drivers/led.c @@ -23,7 +23,7 @@ #include "system.h" #include "kernel.h" -#if CONFIG_LED == LED_REAL +#if (defined(CONFIG_LED) && (CONFIG_LED == LED_REAL)) void led(bool on) { @@ -37,7 +37,8 @@ void led(bool on) } } -#elif (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) +#elif (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) \ + || defined(HAVE_REMOTE_LCD) static bool current; static long last_on; /* timestamp of switching off */ diff --git a/firmware/panic.c b/firmware/panic.c index aaac9ba87b..8d6b0e5bb5 100644 --- a/firmware/panic.c +++ b/firmware/panic.c @@ -39,7 +39,7 @@ void panicf( const char *fmt, ...) va_list ap; #ifndef SIMULATOR -#if CONFIG_LED == LED_REAL +#if (defined(CONFIG_LED) && (CONFIG_LED == LED_REAL)) bool state = false; int i = 0; #endif @@ -90,7 +90,7 @@ void panicf( const char *fmt, ...) while (1) { #ifndef SIMULATOR -#if CONFIG_LED == LED_REAL +#if (defined(CONFIG_LED) && (CONFIG_LED == LED_REAL)) if (--i <= 0) { state = !state; |