41 lines
525 B
C
41 lines
525 B
C
#pragma once
|
|
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
|
|
#include <hwo/chksum.h>
|
|
#include <sys/mutex.h>
|
|
|
|
struct avr_eeprom_desc
|
|
{
|
|
uint8_t num_banks;
|
|
void* base_chksums;
|
|
};
|
|
|
|
struct avr_eeprom
|
|
{
|
|
union {
|
|
uint8_t data[32];
|
|
uint16_t data16[16];
|
|
uint32_t data32[8];
|
|
float f32[8];
|
|
int32_t i32[8];
|
|
};
|
|
};
|
|
typedef struct avr_eeprom avrEEPROM;
|
|
typedef struct avr_eeprom EEPROM;
|
|
|
|
extern MUTEX eepromMutex;
|
|
|
|
|
|
uint16_t eeprom_load(uint8_t bank,avrEEPROM *data);
|
|
uint16_t eeprom_save(uint8_t bank,avrEEPROM *data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|