1. Add MAC address displaying during the booting.

2. Set LEDs to turn on at different stages of the booting process.
This commit is contained in:
kasunch 2009-09-13 21:42:43 +00:00
parent 7444c41da9
commit 4319e8b82e

View file

@ -48,6 +48,7 @@
#include "dev/leds.h" #include "dev/leds.h"
#include "dev/rs232.h" #include "dev/rs232.h"
#include "dev/watchdog.h" #include "dev/watchdog.h"
#include "dev/ds2401.h"
#include "net/rime.h" #include "net/rime.h"
#include "net/mac/nullmac.h" #include "net/mac/nullmac.h"
@ -73,7 +74,7 @@ main(void)
leds_init(); leds_init();
leds_on(LEDS_ALL); leds_on(LEDS_RED);
/* Initialize USART */ /* Initialize USART */
init_usart(); init_usart();
@ -81,6 +82,10 @@ main(void)
/* Clock */ /* Clock */
clock_init(); clock_init();
leds_on(LEDS_GREEN);
ds2401_init();
random_init(0); random_init(0);
rtimer_init(); rtimer_init();
@ -92,10 +97,15 @@ main(void)
ctimer_init(); ctimer_init();
leds_on(LEDS_YELLOW);
init_net(); init_net();
printf_P(PSTR(CONTIKI_VERSION_STRING " started. Node id %u, using %s.\n"), printf_P(PSTR(CONTIKI_VERSION_STRING " started. Node id %u, using %s.\n"),
node_id, rime_mac->name); node_id, rime_mac->name);
printf_P(PSTR("MAC %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n"),
ds2401_id[0], ds2401_id[1], ds2401_id[2], ds2401_id[3],
ds2401_id[4], ds2401_id[5], ds2401_id[6], ds2401_id[7]);
leds_off(LEDS_ALL); leds_off(LEDS_ALL);