ConfigurationStore.h 724 B

1234567891011121314151617181920212223242526
  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. void 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 uint8_t calibration_status_store(uint8_t status) { eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS, status); }
  20. #endif//CONFIG_STORE_H