Fix style in settings-eeprom.c
This commit is contained in:
parent
69d7724c8f
commit
74111826a0
@ -37,6 +37,7 @@ struct eeprom_calibration_settings {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define EEPROM_OVER_TEMP_CONFIG_BASE_ADDR (EEPROM_CALIBRATION_BASE_ADDR + sizeof(struct eeprom_calibration_settings))
|
#define EEPROM_OVER_TEMP_CONFIG_BASE_ADDR (EEPROM_CALIBRATION_BASE_ADDR + sizeof(struct eeprom_calibration_settings))
|
||||||
|
|
||||||
struct eeprom_over_temp_config {
|
struct eeprom_over_temp_config {
|
||||||
float over_temperature;
|
float over_temperature;
|
||||||
uint32_t over_temp_crc;
|
uint32_t over_temp_crc;
|
||||||
@ -54,7 +55,7 @@ static bool check_eeprom_header(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void settings_eeprom_zero()
|
static void settings_eeprom_zero(void)
|
||||||
{
|
{
|
||||||
settings_eeprom_save_calibration(0.0f, 0.0f, false);
|
settings_eeprom_save_calibration(0.0f, 0.0f, false);
|
||||||
settings_eeprom_save_overtemp_limit(0.0f, false);
|
settings_eeprom_save_overtemp_limit(0.0f, false);
|
||||||
@ -62,7 +63,7 @@ static void settings_eeprom_zero()
|
|||||||
|
|
||||||
bool settings_eeprom_detect_and_prepare(void)
|
bool settings_eeprom_detect_and_prepare(void)
|
||||||
{
|
{
|
||||||
bool eeprom_ready = false;;
|
bool eeprom_ready = false;
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
@ -77,7 +78,10 @@ bool settings_eeprom_detect_and_prepare(void)
|
|||||||
if (check_eeprom_header() == false) {
|
if (check_eeprom_header() == false) {
|
||||||
/* Try to write a new header and check it again */
|
/* Try to write a new header and check it again */
|
||||||
spi_eeprom_write(0, expected_header, sizeof(expected_header));
|
spi_eeprom_write(0, expected_header, sizeof(expected_header));
|
||||||
while (spi_eeprom_write_in_progress());
|
|
||||||
|
while (spi_eeprom_write_in_progress())
|
||||||
|
;
|
||||||
|
|
||||||
if (check_eeprom_header() == false) {
|
if (check_eeprom_header() == false) {
|
||||||
goto ret_deinit_crc;
|
goto ret_deinit_crc;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user