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 "hw-arduino.h"
|
||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 1
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define PRINTF(...) printf(__VA_ARGS__)
|
#define PRINTF(...) printf(__VA_ARGS__)
|
||||||
|
@ -135,7 +135,9 @@ PROCESS_THREAD(arduino_sketch, ev, data)
|
||||||
#endif /* PLATFORM_HAS_BUTTON */
|
#endif /* PLATFORM_HAS_BUTTON */
|
||||||
|
|
||||||
if(etimer_expired(&loop_periodic_timer)) {
|
if(etimer_expired(&loop_periodic_timer)) {
|
||||||
|
mcu_sleep_off();
|
||||||
loop ();
|
loop ();
|
||||||
|
mcu_sleep_on();
|
||||||
etimer_reset(&loop_periodic_timer);
|
etimer_reset(&loop_periodic_timer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue