Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
862 B

  1. /*
  2. RTC support module
  3. Copyright (C) 2018 by Pavel Chauzov <poulch at mail dot ru>
  4. */
  5. // -----------------------------------------------------------------------------
  6. // RTC3231_SUPPORT
  7. // -----------------------------------------------------------------------------
  8. #ifndef RTC_SUPPORT
  9. #define RTC_SUPPORT 0 // enable battery backed RTC for ntp
  10. #define RTC_PROVIDER RTC_DUMMY
  11. #endif
  12. #ifndef RTC_RECOVERY_CNT
  13. #define RTC_RECOVERY_CNT 10 // 0 no recovery
  14. #endif
  15. #ifndef RTC_NTP_SYNC_ENA
  16. #define RTC_NTP_SYNC_ENA 1 // enable sync RTC on NTP sync success
  17. #endif
  18. #if RTC_SUPPORT
  19. #if RTC_PROVIDER == RTC_PROVIDER_DS3231
  20. #include "../rtc/ds3231.h"
  21. #elif RTC_PROVIDER == RTC_PROVIDER_DS1307
  22. #include "../rtc/ds1307.h"
  23. #else
  24. #include "../rtc/dummy.h"
  25. #endif
  26. #endif