Low-level EEPROM interface. More...

Detailed Description

Low-level EEPROM interface.

Files

file  eeprom.h
 Low-level eeprom driver interface.
 

Functions

uint8_t eeprom_read_byte (uint32_t pos)
 Read a byte at the given position in eeprom. More...
 
size_t eeprom_read (uint32_t pos, uint8_t *data, size_t len)
 Read len bytes from the given position. More...
 
void eeprom_write_byte (uint32_t pos, uint8_t data)
 Write a byte at the given position. More...
 
size_t eeprom_write (uint32_t pos, const uint8_t *data, size_t len)
 Write len bytes at the given position. More...
 

Function Documentation

◆ eeprom_read()

size_t eeprom_read ( uint32_t  pos,
uint8_t *  data,
size_t  len 
)

Read len bytes from the given position.

This function must be implemented by each CPU that provides an internal EEPROM.

Parameters
[in]posstart position in eeprom
[out]dataoutput byte array to write to
[in]lenthe number of bytes to read
Returns
the number of bytes read

◆ eeprom_read_byte()

uint8_t eeprom_read_byte ( uint32_t  pos)

Read a byte at the given position in eeprom.

Parameters
[in]posposition to read
Returns
the byte read

◆ eeprom_write()

size_t eeprom_write ( uint32_t  pos,
const uint8_t *  data,
size_t  len 
)

Write len bytes at the given position.

This function must be implemented by each CPU that provides an internal EEPROM.

Parameters
[in]posstart position in eeprom
[in]datainput byte array to read into
[in]lenthe number of bytes to read
Returns
the number of bytes written

◆ eeprom_write_byte()

void eeprom_write_byte ( uint32_t  pos,
uint8_t  data 
)

Write a byte at the given position.

Parameters
[in]posposition to write
[in]databyte address to write to