added autostart + replaced codeprop_event_quit with PROCESS_EVENT_EXIT
This commit is contained in:
parent
62e32d2b23
commit
9eb477f8f5
1 changed files with 4 additions and 2 deletions
|
@ -28,12 +28,14 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: beeper.c,v 1.1 2006/06/18 07:48:48 adamdunkels Exp $
|
* @(#)$Id: beeper.c,v 1.2 2006/06/21 12:40:14 nifi Exp $
|
||||||
*/
|
*/
|
||||||
#include "contiki-esb.h"
|
#include "contiki-esb.h"
|
||||||
|
|
||||||
PROCESS(beeper_process, "Beeper");
|
PROCESS(beeper_process, "Beeper");
|
||||||
|
|
||||||
|
AUTOSTART_PROCESSES(&beeper_process);
|
||||||
|
|
||||||
static struct etimer etimer;
|
static struct etimer etimer;
|
||||||
|
|
||||||
static struct pt beeper_pt;
|
static struct pt beeper_pt;
|
||||||
|
@ -72,7 +74,7 @@ PROCESS_THREAD(beeper_process, ev, data)
|
||||||
|
|
||||||
PROCESS_WAIT_EVENT();
|
PROCESS_WAIT_EVENT();
|
||||||
|
|
||||||
if(ev == codeprop_event_quit) {
|
if(ev == PROCESS_EVENT_EXIT) {
|
||||||
break;
|
break;
|
||||||
} else if(ev == sensors_event &&
|
} else if(ev == sensors_event &&
|
||||||
data == &button_sensor) {
|
data == &button_sensor) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue