3 #include "dev/i2cmaster.h"
4 #include "dev/event-sensor.h"
6 #define TMP102_READ_INTERVAL (CLOCK_SECOND/2) // Poll the sensor every 500 ms
8 PROCESS (temp_process,
"Test Event process");
9 AUTOSTART_PROCESSES (&temp_process);
25 event_sensor.configure(SENSORS_ACTIVE,1);
32 printf (
"COUNT = %d\n", event_sensor.value(0));
void etimer_set(struct etimer *et, clock_time_t interval)
Set an event timer.
#define PROCESS_END()
Define the end of a process.
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
static struct etimer et
NIC receiver thread.
#define PROCESS_WAIT_EVENT_UNTIL(c)
Wait for an event to be posted to the process, with an extra condition.
int etimer_expired(struct etimer *et)
Check if an event timer has expired.
#define PROCESS_BEGIN()
Define the beginning of a process.