diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/ata.c | 6 | ||||
-rw-r--r-- | firmware/drivers/led.c | 5 | ||||
-rw-r--r-- | firmware/export/ata.h | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 4 | ||||
-rw-r--r-- | firmware/panic.c | 4 |
5 files changed, 12 insertions, 9 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index c3c2531a2e..54a1b12143 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -71,7 +71,7 @@ static struct mutex ata_mtx; | |||
71 | int ata_device; /* device 0 (master) or 1 (slave) */ | 71 | int ata_device; /* device 0 (master) or 1 (slave) */ |
72 | 72 | ||
73 | int ata_spinup_time = 0; | 73 | int ata_spinup_time = 0; |
74 | #if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) | 74 | #if (CONFIG_LED == LED_REAL) |
75 | static bool ata_led_enabled = true; | 75 | static bool ata_led_enabled = true; |
76 | static bool ata_led_on = false; | 76 | static bool ata_led_on = false; |
77 | #endif | 77 | #endif |
@@ -152,7 +152,7 @@ STATICIRAM int wait_for_end_of_transfer(void) | |||
152 | return (ATA_ALT_STATUS & (STATUS_RDY|STATUS_DRQ)) == STATUS_RDY; | 152 | return (ATA_ALT_STATUS & (STATUS_RDY|STATUS_DRQ)) == STATUS_RDY; |
153 | } | 153 | } |
154 | 154 | ||
155 | #if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) | 155 | #if (CONFIG_LED == LED_REAL) |
156 | /* Conditionally block LED access for the ATA driver, so the LED can be | 156 | /* Conditionally block LED access for the ATA driver, so the LED can be |
157 | * (mis)used for other purposes */ | 157 | * (mis)used for other purposes */ |
158 | static void ata_led(bool on) | 158 | static void ata_led(bool on) |
@@ -1003,7 +1003,7 @@ int ata_init(void) | |||
1003 | return 0; | 1003 | return 0; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | #if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) | 1006 | #if (CONFIG_LED == LED_REAL) |
1007 | void ata_set_led_enabled(bool enabled) | 1007 | void ata_set_led_enabled(bool enabled) |
1008 | { | 1008 | { |
1009 | ata_led_enabled = enabled; | 1009 | ata_led_enabled = enabled; |
diff --git a/firmware/drivers/led.c b/firmware/drivers/led.c index 2799b7cd8c..36748a1b18 100644 --- a/firmware/drivers/led.c +++ b/firmware/drivers/led.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "system.h" | 23 | #include "system.h" |
24 | #include "kernel.h" | 24 | #include "kernel.h" |
25 | 25 | ||
26 | #if (defined(CONFIG_LED) && (CONFIG_LED == LED_REAL)) | 26 | #if (CONFIG_LED == LED_REAL) |
27 | 27 | ||
28 | void led(bool on) | 28 | void led(bool on) |
29 | { | 29 | { |
@@ -37,8 +37,7 @@ void led(bool on) | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | #elif (defined(CONFIG_LED) && (CONFIG_LED == LED_VIRTUAL)) \ | 40 | #elif (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) |
41 | || defined(HAVE_REMOTE_LCD) | ||
42 | 41 | ||
43 | static bool current; | 42 | static bool current; |
44 | static long last_on; /* timestamp of switching off */ | 43 | static long last_on; /* timestamp of switching off */ |
diff --git a/firmware/export/ata.h b/firmware/export/ata.h index 697935cafc..d3323308e8 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h | |||
@@ -47,7 +47,7 @@ extern int ata_init(void); | |||
47 | extern int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); | 47 | extern int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); |
48 | extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); | 48 | extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); |
49 | extern void ata_spin(void); | 49 | extern void ata_spin(void); |
50 | #if defined(CONFIG_LED) && (CONFIG_LED == LED_REAL) | 50 | #if (CONFIG_LED == LED_REAL) |
51 | extern void ata_set_led_enabled(bool enabled); | 51 | extern void ata_set_led_enabled(bool enabled); |
52 | #endif | 52 | #endif |
53 | extern unsigned short* ata_get_identify(void); | 53 | extern unsigned short* ata_get_identify(void); |
diff --git a/firmware/export/config.h b/firmware/export/config.h index aaaac686b1..0a59c0bf89 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -226,6 +226,10 @@ | |||
226 | #define CONFIG_USBOTG 0 | 226 | #define CONFIG_USBOTG 0 |
227 | #endif | 227 | #endif |
228 | 228 | ||
229 | #ifndef CONFIG_LED | ||
230 | #define CONFIG_LED 0 | ||
231 | #endif | ||
232 | |||
229 | /* Enable the directory cache and tagcache in RAM if we have | 233 | /* Enable the directory cache and tagcache in RAM if we have |
230 | * plenty of RAM. Both features can be enabled independently. */ | 234 | * plenty of RAM. Both features can be enabled independently. */ |
231 | #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \ | 235 | #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \ |
diff --git a/firmware/panic.c b/firmware/panic.c index 8d6b0e5bb5..c50bd54457 100644 --- a/firmware/panic.c +++ b/firmware/panic.c | |||
@@ -39,7 +39,7 @@ void panicf( const char *fmt, ...) | |||
39 | va_list ap; | 39 | va_list ap; |
40 | 40 | ||
41 | #ifndef SIMULATOR | 41 | #ifndef SIMULATOR |
42 | #if (defined(CONFIG_LED) && (CONFIG_LED == LED_REAL)) | 42 | #if (CONFIG_LED == LED_REAL) |
43 | bool state = false; | 43 | bool state = false; |
44 | int i = 0; | 44 | int i = 0; |
45 | #endif | 45 | #endif |
@@ -90,7 +90,7 @@ void panicf( const char *fmt, ...) | |||
90 | while (1) | 90 | while (1) |
91 | { | 91 | { |
92 | #ifndef SIMULATOR | 92 | #ifndef SIMULATOR |
93 | #if (defined(CONFIG_LED) && (CONFIG_LED == LED_REAL)) | 93 | #if (CONFIG_LED == LED_REAL) |
94 | if (--i <= 0) | 94 | if (--i <= 0) |
95 | { | 95 | { |
96 | state = !state; | 96 | state = !state; |