From 4711829f03ee2fcd1c4e9dc2a353af0e35497180 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 31 Dec 2010 17:29:57 -0800 Subject: usrp2: fixed mdelay (used ticks rb register), cool led blink in u2init, removed unused files --- firmware/zpu/lib/u2_init.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'firmware/zpu/lib/u2_init.c') diff --git a/firmware/zpu/lib/u2_init.c b/firmware/zpu/lib/u2_init.c index 191a0e816..71bd2c594 100644 --- a/firmware/zpu/lib/u2_init.c +++ b/firmware/zpu/lib/u2_init.c @@ -51,10 +51,17 @@ u2_init(void) hal_enable_ints(); // flash all leds to let us know board is alive - hal_set_leds(0x0, 0x1f); - mdelay(100); - hal_set_leds(0x1f, 0x1f); - mdelay(100); + hal_set_led_src(0x0, 0x1f); /* software ctrl */ + hal_set_leds(0x0, 0x1f); mdelay(300); + hal_set_leds(LED_E, LED_E); mdelay(300); + hal_set_leds(LED_C, LED_C); mdelay(300); + hal_set_leds(LED_A, LED_A); mdelay(300); + for (int i = 0; i < 3; i++){ //blink all + static const int blinks = LED_E | LED_C | LED_A; + hal_set_leds(0x0, 0x1f); mdelay(100); + hal_set_leds(blinks, 0x1f); mdelay(100); + } + hal_set_led_src(0x1f & ~LED_D, 0x1f); /* hardware ctrl */ hal_set_leds(LED_D, 0x1f); // Leave one on #if 0 -- cgit v1.2.3