ConfigurationStore.h 832 B

123456789101112131415161718192021222324252627
  1. #ifndef CONFIG_STORE_H
  2. #define CONFIG_STORE_H
  3. #define EEPROM_SETTINGS
  4. #include "Configuration.h"
  5. void Config_ResetDefault();
  6. #ifndef DISABLE_M503
  7. void Config_PrintSettings();
  8. #else
  9. FORCE_INLINE void Config_PrintSettings() {}
  10. #endif
  11. #ifdef EEPROM_SETTINGS
  12. void Config_StoreSettings();
  13. bool Config_RetrieveSettings();
  14. #else
  15. FORCE_INLINE void Config_StoreSettings() {}
  16. FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
  17. #endif
  18. inline uint8_t calibration_status() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS); }
  19. inline void calibration_status_store(uint8_t status) { eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS, status); }
  20. inline bool calibration_status_pinda() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA); }
  21. #endif//CONFIG_STORE_H