Contiki 2.5
core.c
1 #include <stepper-process.h>
2 #include <dev/leds.h>
3 #include <loader/codeprop-otf.h>
4 #include <loader/ram-segments.h>
5 #include <sys/autostart.h>
6 #include "codeprop-otf.h"
7 #include <stdio.h>
8 #include <stdlib.h>
9 
10 PROCESS(blink_process, "LED blink process");
11 
12 PROCESS_THREAD(blink_process, ev , data)
13 {
14  static struct etimer timer;
15  PROCESS_BEGIN();
17  while(1) {
18  PROCESS_WAIT_EVENT_UNTIL(ev == PROCESS_EVENT_EXIT ||
19  ev== PROCESS_EVENT_TIMER);
20  if (ev == PROCESS_EVENT_EXIT) break;
21  leds_invert(LEDS_RED);
23  }
24  PROCESS_END();
25 }
26 
27 AUTOSTART_PROCESSES(&codeprop_process, &ram_segments_cleanup_process, &stepper_process,&blink_process);