Merge branch 'osd' of https://github.com/osdomotics/osd-contiki into osd
Conflicts: cpu/avr/dev/button-sensor.c
This commit is contained in:
commit
91fcc28b12
2 changed files with 4 additions and 5 deletions
|
@ -77,13 +77,13 @@ extern volatile uint8_t mcusleepcycle;
|
||||||
extern resource_t res_event, res_separate;
|
extern resource_t res_event, res_separate;
|
||||||
#endif /* PLATFORM_HAS_BUTTON */
|
#endif /* PLATFORM_HAS_BUTTON */
|
||||||
|
|
||||||
volatile uint8_t mcusleepcycleval;
|
volatile uint8_t mcusleepcycleval;
|
||||||
|
|
||||||
/*-------------- enabled sleep mode ----------------------------------------*/
|
/*-------------- enabled sleep mode ----------------------------------------*/
|
||||||
void
|
void
|
||||||
mcu_sleep_init(void)
|
mcu_sleep_init(void)
|
||||||
{
|
{
|
||||||
mcusleepcycleval=mcusleepcycle;
|
mcusleepcycleval=mcusleepcycle;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
mcu_sleep_on(void)
|
mcu_sleep_on(void)
|
||||||
|
@ -113,7 +113,7 @@ PROCESS(arduino_sketch, "Arduino Sketch Wrapper");
|
||||||
PROCESS_THREAD(arduino_sketch, ev, data)
|
PROCESS_THREAD(arduino_sketch, ev, data)
|
||||||
{
|
{
|
||||||
static struct etimer loop_periodic_timer;
|
static struct etimer loop_periodic_timer;
|
||||||
|
|
||||||
PROCESS_BEGIN();
|
PROCESS_BEGIN();
|
||||||
adc_init ();
|
adc_init ();
|
||||||
mcu_sleep_init ();
|
mcu_sleep_init ();
|
||||||
|
@ -138,7 +138,7 @@ PROCESS_THREAD(arduino_sketch, ev, data)
|
||||||
|
|
||||||
if(etimer_expired(&loop_periodic_timer)) {
|
if(etimer_expired(&loop_periodic_timer)) {
|
||||||
mcu_sleep_off();
|
mcu_sleep_off();
|
||||||
loop ();
|
loop ();
|
||||||
mcu_sleep_on();
|
mcu_sleep_on();
|
||||||
etimer_reset(&loop_periodic_timer);
|
etimer_reset(&loop_periodic_timer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ ISR(INT4_vect)
|
||||||
{
|
{
|
||||||
|
|
||||||
// leds_toggle(LEDS_RED);
|
// leds_toggle(LEDS_RED);
|
||||||
|
|
||||||
if(BUTTON_CHECK_IRQ()) {
|
if(BUTTON_CHECK_IRQ()) {
|
||||||
if(timer_expired(&debouncetimer)) {
|
if(timer_expired(&debouncetimer)) {
|
||||||
// led1_on();
|
// led1_on();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue