32 #include "dev/button-sensor.h"
36 PROCESS(test_button_process,
"Test button process");
37 AUTOSTART_PROCESSES(&test_button_process);
41 static int counter = 0;
45 printf(
"Starting Button test process (counter=%i)\n", counter);
46 button_sensor.configure(SENSORS_ACTIVE, 1);
51 if(ev == sensors_event && data == &button_sensor) {
53 printf(
"Button pressed (counter=%i)\n", counter);
#define PROCESS_BEGIN()
Define the beginning of a process.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
#define PROCESS_WAIT_EVENT()
Wait for an event to be posted to the process.
#define PROCESS(name, strname)
Declare a process.