add button function

This commit is contained in:
Harald Pichler 2016-12-06 21:36:22 +01:00
parent 353cfe723c
commit 16e6a20b31
2 changed files with 2 additions and 6 deletions

View file

@ -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 */

View file

@ -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;