Add HAL AVR EEPROM implementation

pull/131/head
D.R.racer 2021-10-18 15:27:26 +02:00 committed by DRracer
parent abe2567c84
commit 8eb6240541
1 changed files with 5 additions and 3 deletions

View File

@ -1,15 +1,17 @@
#include "../eeprom.h" #include "../eeprom.h"
#include <avr/eeprom.h>
namespace hal { namespace hal {
namespace eeprom { namespace eeprom {
EEPROM eeprom; EEPROM eeprom;
uint8_t EEPROM::ReadByte(EEPROM::addr_t /*addr*/) { uint8_t EEPROM::ReadByte(EEPROM::addr_t addr) {
return 0; return eeprom_read_byte((const uint8_t *)addr);
} }
void EEPROM::UpdateByte(EEPROM::addr_t /*addr*/, uint8_t /*value*/) { void EEPROM::UpdateByte(EEPROM::addr_t addr, uint8_t value) {
eeprom_update_byte((uint8_t *)addr, value);
} }
} // namespace eeprom } // namespace eeprom