Просмотр исходного кода

Force INT1 clear before setting alarm

tags/v1.4.3^2
Bertrand Lemasle 6 лет назад
Родитель
Сommit
303d8edf07
1 измененных файлов: 3 добавлений и 2 удалений
  1. +3
    -2
      src/MainUnit.cpp

+ 3
- 2
src/MainUnit.cpp Просмотреть файл

@@ -36,9 +36,10 @@ namespace mainunit {
}
void interruptIn(uint16_t seconds) {
rtc::setAlarm(seconds);
pinMode(RTC_WAKE, INPUT);
EIFR |= 1 << INTF1; //forcing interrupt clear as sometimes, it does not seems to work (1 second appart positions)
rtc::setAlarm(seconds);
attachInterrupt(digitalPinToInterrupt(RTC_WAKE), interrupt, FALLING);
}


Загрузка…
Отмена
Сохранить