Legacy branch migration
This commit is contained in:
34
firmware/devices/memory.c
Normal file
34
firmware/devices/memory.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/**** Includes ****/
|
||||
#include <avr/eeprom.h>
|
||||
#include "memory.h"
|
||||
|
||||
/**** Public function definitions ****/
|
||||
uint8_t MEM_Read8b(uint8_t address)
|
||||
{
|
||||
return eeprom_read_byte((uint8_t*)address);
|
||||
}
|
||||
|
||||
uint16_t MEM_Read16b(uint8_t address)
|
||||
{
|
||||
return eeprom_read_word((uint8_t*)address);
|
||||
}
|
||||
|
||||
uint32_t MEM_Read32b(uint8_t address)
|
||||
{
|
||||
return eeprom_read_dword((uint8_t*)address);
|
||||
}
|
||||
|
||||
void MEM_Write8b(uint8_t address, uint8_t value)
|
||||
{
|
||||
return eeprom_write_byte((uint8_t*)address, value);
|
||||
}
|
||||
|
||||
void MEM_Write16b(uint8_t address, uint16_t value)
|
||||
{
|
||||
return eeprom_write_word((uint8_t*)address, value);
|
||||
}
|
||||
|
||||
void MEM_Write32b(uint8_t address, uint32_t value)
|
||||
{
|
||||
return eeprom_write_dword((uint8_t*)address, value);
|
||||
}
|
||||
Reference in New Issue
Block a user