The cc2530dk blink-hello example now makes sense for cc2531

This commit is contained in:
George Oikonomou 2011-12-16 23:56:06 +00:00 committed by George Oikonomou
parent 38a222e83c
commit febcf0fc41

View file

@ -46,14 +46,16 @@ PROCESS_THREAD(blink_process, ev, data)
{
PROCESS_BEGIN();
blinks = 0;
while(1) {
etimer_set(&et_blink, CLOCK_SECOND);
PROCESS_WAIT_EVENT_UNTIL(ev == PROCESS_EVENT_TIMER);
blinks = leds_get();
leds_off(LEDS_ALL);
leds_on((blinks + 1) & LEDS_ALL);
leds_on(blinks & LEDS_ALL);
blinks++;
printf("Blink... (state %0.2X)\n", leds_get());
}