1 #include <AT91SAM7S64.h>
4 #include <sys/procinit.h>
7 #include <debug-uart.h>
8 #include <interrupt-utils.h>
10 volatile const char *
volatile input_line =
NULL;
11 volatile unsigned int input_line_len = 0;
14 recv_input(
const char *str,
unsigned int len)
21 PROCESS(blink_process,
"LED blink process");
30 ev== PROCESS_EVENT_TIMER);
31 if (ev == PROCESS_EVENT_EXIT)
break;
32 leds_invert(LEDS_RED);
36 printf(
"FSMSTATE: %04x",cc2420_getreg(CC2420_FSMSTATE));
38 if (SFD_IS_1) printf(
" SFD");
39 if (FIFO_IS_1) printf(
" FIFO");
40 if (FIFOP_IS_1) printf(
" FIFOP");
46 printf(
"Ended process\n");
49 PROCINIT(&etimer_process, &blink_process);
55 *AT91C_AIC_IDCR = 0xffffffff;
56 *AT91C_PMC_PCDR = 0xffffffff;
57 *AT91C_PMC_PCER = (1 << AT91C_ID_PIOA);
60 printf(
"Initialising\n");
61 dbg_set_input_handler(recv_input);
70 printf(
"Processes running\n");
77 *AT91C_PMC_SCDR |= AT91C_PMC_PCK;