eeprom stuff

This commit is contained in:
2020-11-05 13:05:19 +01:00
parent a875b34958
commit 076eca0a49
2 changed files with 34 additions and 103 deletions

View File

@ -8,24 +8,11 @@
#ifndef EEPROM_H_
#define EEPROM_H_
#include "stm32f1xx_hal.h"
#include <stdint.h>
#define STORAGE_ADDRESS 0x20
typedef struct {
uint32_t magic;
uint32_t savedTemperature;
uint32_t savedTime;
uint32_t operatingTime;
} tStorage;
void eepromWrite(uint16_t addr, uint8_t *buf, uint8_t len);
void eepromRead(uint16_t addr, uint8_t *buf, uint8_t len);
void eepromWriteStorage();
int eepromReadStorage();
#endif /* EEPROM_H_ */