Skip to content

Commit 571af00

Browse files
committed
Update LED usage.
* Flash the hard drive led. * Keep power led solid.
1 parent 44dedad commit 571af00

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

firmware/lm32/main.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include "fx2.h"
2020
#include "version.h"
2121

22+
static int led_last_event;
23+
2224
int main(void)
2325
{
2426
irq_setmask(0);
@@ -62,7 +64,7 @@ int main(void)
6264
#endif
6365

6466
#ifdef CSR_FRONT_PANEL_BASE
65-
front_panel_leds_out_write(0x1);
67+
front_panel_leds_out_write(0x4);
6668
#endif
6769

6870
ci_prompt();
@@ -74,6 +76,11 @@ int main(void)
7476
fx2_service(true);
7577
#endif
7678

79+
#ifdef CSR_FRONT_PANEL_BASE
80+
if (elapsed(&led_last_event, identifier_frequency_read())) {
81+
front_panel_leds_out_write(front_panel_leds_out_read() ^ 0x1);
82+
}
83+
#endif
7784
/* XXX FIX DDR conflict between DMA and L2 cache */
7885
#if 0
7986
pattern_service();

0 commit comments

Comments
 (0)