source: trunk/firmware/Inc/eeprom.h

Last change on this file was 6, checked in by f.jahn, 3 months ago
File size: 942 bytes
Line 
1#include "stm32g0xx_hal.h"
2#include "stdbool.h"
3#include "main.h"
4#include "sysdata.h"
5
6typedef enum startType_t
7{
8        FIRST_START_AFTER_ERASE = 0,                                                                                            // Flash storage with calibration data will be written with the default values
9        FIRST_START_AFTER_COMPARTIBLE_UPDATE,                                                                           // Calibration data will be preserved, additional configuration data also preserved
10        FIRST_START_AFTER_INCOMPARTIBLE_UPDATE,                                                                         // Calibration data will be preserved, additional configuration data is set to default
11        FIRST_START_ERROR                                                                                                                       // Cannot read memory location, where FIRST_START_ID was saved
12} startType_t;
13
14HAL_StatusTypeDef EEPROM_readConfig(sys_data_t* data);
15HAL_StatusTypeDef EEPROM_storeConfig(sys_data_t* data, uint8_t withSN);
16HAL_StatusTypeDef EEPROM_fullRestore(sys_data_t* data);
17HAL_StatusTypeDef EEPROM_factoryRestore(sys_data_t* data, int resetToDefault);
18startType_t EEPROM_isFirstStart(uint8_t* fsID);
Note: See TracBrowser for help on using the repository browser.