add mcu_sleep_off and on
This commit is contained in:
parent
542a921e3f
commit
6a2d13216a
1 changed files with 4 additions and 2 deletions
|
@ -57,7 +57,7 @@
|
|||
#include "hw-arduino.h"
|
||||
#include "contiki.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#define DEBUG 1
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#define PRINTF(...) printf(__VA_ARGS__)
|
||||
|
@ -135,7 +135,9 @@ PROCESS_THREAD(arduino_sketch, ev, data)
|
|||
#endif /* PLATFORM_HAS_BUTTON */
|
||||
|
||||
if(etimer_expired(&loop_periodic_timer)) {
|
||||
loop ();
|
||||
mcu_sleep_off();
|
||||
loop ();
|
||||
mcu_sleep_on();
|
||||
etimer_reset(&loop_periodic_timer);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue