add button function
This commit is contained in:
parent
353cfe723c
commit
16e6a20b31
|
@ -127,12 +127,7 @@ PROCESS_THREAD(arduino_sketch, ev, data)
|
||||||
if(ev == sensors_event && data == &button_sensor) {
|
if(ev == sensors_event && data == &button_sensor) {
|
||||||
mcu_sleep_off();
|
mcu_sleep_off();
|
||||||
PRINTF("*******BUTTON*******\n");
|
PRINTF("*******BUTTON*******\n");
|
||||||
|
button ();
|
||||||
/* Call the event_handler for this application-specific event. */
|
|
||||||
res_event.trigger();
|
|
||||||
|
|
||||||
/* Also call the separate response example handler. */
|
|
||||||
res_separate.resume();
|
|
||||||
mcu_sleep_on();
|
mcu_sleep_on();
|
||||||
}
|
}
|
||||||
#endif /* PLATFORM_HAS_BUTTON */
|
#endif /* PLATFORM_HAS_BUTTON */
|
||||||
|
|
|
@ -61,6 +61,7 @@ void mcu_sleep_set(uint8_t value);
|
||||||
extern void loop (void);
|
extern void loop (void);
|
||||||
extern void setup (void);
|
extern void setup (void);
|
||||||
extern void arduino_init (void);
|
extern void arduino_init (void);
|
||||||
|
extern void button (void);
|
||||||
|
|
||||||
extern struct process arduino_sketch;
|
extern struct process arduino_sketch;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue