Correct version of EEPROM header for settings and write check for overtemperature
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define EEPROM_HEADER_MAGIC 0xA5
|
||||
#define EEPROM_HEADER_COMP_VER 0xFF
|
||||
#define EEPROM_HEADER_COMP_VER 0x01
|
||||
|
||||
static const uint8_t expected_header[2] = {EEPROM_HEADER_MAGIC, EEPROM_HEADER_COMP_VER};
|
||||
|
||||
@@ -36,6 +36,12 @@ struct eeprom_calibration_settings {
|
||||
uint32_t crc;
|
||||
};
|
||||
|
||||
#define EEPROM_OVER_TEMP_CONFIG_BASE_ADDR (EEPROM_CALIBRATION_BASE_ADDR + sizeof(struct eeprom_calibration_settings))
|
||||
struct eeprom_over_temp_config {
|
||||
float over_temperature;
|
||||
float over_temperature_redundant;
|
||||
};
|
||||
|
||||
static bool check_eeprom_header(void)
|
||||
{
|
||||
uint8_t header[2] = {0};
|
||||
|
Reference in New Issue
Block a user