9 #include "../firmware.h"
11 static void Configuration_save_to_eeprom(
void);
12 static bool Configuration_load_from_eeprom(
void);
13 static void Configuration_load_defaults(
void);
14 static void Configuration_update_checksum(
void);
16 void Configuration_Init(
void)
18 if(Configuration_load_from_eeprom() ==
false)
21 Configuration_load_defaults();
22 Configuration_save_to_eeprom();
29 static void Configuration_save_to_eeprom(
void)
34 static bool Configuration_load_from_eeprom(
void)
41 return Configuration_verify_checksum();
44 bool Configuration_verify_checksum(
void)
50 return (checksum == spacecraft_configuration.checksum);
53 static void Configuration_load_defaults(
void)
58 Configuration_update_checksum();
61 static void Configuration_update_checksum(
void)
void EEPROM_write(uint32_t address, uint32_t *data, uint32_t length)
bool EEPROM_selfTest(void)
void EEPROM_read(uint32_t address, uint32_t *data, uint32_t length)
uint16_t Util_crc16(const uint8_t *buf, uint32_t size)