diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -343,6 +343,7 @@ uint8_t sw_right_last = 0; void save_settings() { +/* Minimal_EEPROM_Unlock(); // Try programming a word at an address divisible by 4 Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_BOOTTOBREW, boottobrew); @@ -352,22 +353,25 @@ void save_settings() Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_K_D, k_d); Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_UNITS, temp_units); Minimal_EEPROM_Lock(); +*/ } void save_setpoints() { +/* Minimal_EEPROM_Unlock(); Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_BREWTEMP, setpoint_brew); Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_STEAMTEMP, setpoint_steam); Minimal_EEPROM_Lock(); +*/ } // TODO: Make a struct that has all settings in it. Pass by ref to this func in a library. void restore_settings() { - Minimal_EEPROM_Unlock(); +/* Minimal_EEPROM_Unlock(); while(Minimal_FLASH_GetStatus()==FLASH_BUSY); boottobrew = (*(__IO uint32_t*)(EEPROM_BASE_ADDR + EEPROM_ADDR_BOOTTOBREW)); @@ -391,7 +395,7 @@ void restore_settings() while(Minimal_FLASH_GetStatus()==FLASH_BUSY); temp_units = (*(__IO uint32_t*)(EEPROM_BASE_ADDR + EEPROM_ADDR_UNITS)); - Minimal_EEPROM_Lock(); + Minimal_EEPROM_Lock(); */ } int16_t last_temp = 21245;