Contiki 2.5
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
platform
stepper-robot
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
();
16
etimer_set
(&
timer
,
CLOCK_SECOND
/2);
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);
22
etimer_reset
(&
timer
);
23
}
24
PROCESS_END
();
25
}
26
27
AUTOSTART_PROCESSES(&codeprop_process, &ram_segments_cleanup_process, &stepper_process,&blink_process);
Generated on Fri Aug 30 2013 12:34:10 for Contiki 2.5 by
1.8.3.1