6 #define RESERVED_EEPROM_SIZE 1024
12 uint8_t ReadByte(const uint32_t address
);
13 void WriteByte(const uint32_t address
, const uint8_t value
);
16 // The extEEPROM lib that we use for STM doesn't have the get and put templates
17 // These templates need to be reimplemented here
18 template <typename T
> void Get(uint32_t addr
, T
&value
)
20 uint8_t* p
= (uint8_t*)(void*)&value
;
21 size_t i
= sizeof(value
);
22 while(i
--) *p
++ = ReadByte(addr
++);
25 template <typename T
> const void Put(uint32_t addr
, const T
&value
)
27 const uint8_t* p
= (const uint8_t*)(const void*)&value
;
28 size_t i
= sizeof(value
);
29 while(i
--) WriteByte(addr
++, *p
++);