config.h 688 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <EEPROM.h>
  2. #define RTC_ENABLED 1
  3. #define TIME_DISP_ENABLED 1
  4. #define GESTURE_ENABLED 1
  5. #define LIGHTBAR_ENABLED 1
  6. #define TOUCH_ENABLED 1
  7. #define BATTERY_ENABLED 1
  8. #define MAX7219_ENABLED 0
  9. #define TM1618_ENABLED 1
  10. #define GESTURE_SPARKFUN_ENABLED 0
  11. #define GESTURE_ADAFRUIT_ENABLED 1
  12. #define CONF_ADDR 0
  13. struct ConfigData {
  14. bool twelveHMode; // True = 12h; False = 24h
  15. bool dayNightIndicator; // True = enable; False = disable
  16. };
  17. extern ConfigData mcuConfig;
  18. void initConfig() {
  19. mcuConfig = {true, true};
  20. }
  21. void saveConfig() {
  22. EEPROM.put(CONF_ADDR, mcuConfig);
  23. }
  24. void loadConfig() {
  25. EEPROM.get(CONF_ADDR, mcuConfig);
  26. }