GaIA BIOS Library
Loading...
Searching...
No Matches
Eeprom Handling functions

Functions to handle on board Eeprom data storage. More...

Functions

void eeprom_type_identify (void)
 Identifies the on-board eeprom type.
int eeprom_write (uint16_t address, const uint8_t *src, uint16_t size, uint8_t crc_mode)
 Writes n bytes at the given address.
int eeprom_read (uint16_t address, uint8_t *dst, uint16_t size, uint8_t crc_mode)
 Reads n bytes from the given address.

Detailed Description

Functions to handle on board Eeprom data storage.

Function Documentation

◆ eeprom_read()

int eeprom_read ( uint16_t address,
uint8_t * dst,
uint16_t size,
uint8_t crc_mode )

Reads n bytes from the given address.

Parameters
address- address to read from.
dst- pointer to the buffer where to put the data being read.
size- number of bytes to be read.
crc_mode- specify DONT_USE_CRC if no CRC check is needed, ONLY_CHECK_CRC to only check the CRC or LOAD_CHECK_CRC to check CRC and read the data into the specified buffer.
Returns
EE_ERROR if an error occured, EE_OK otherwise.

◆ eeprom_type_identify()

void eeprom_type_identify ( void )

Identifies the on-board eeprom type.

The result is stored in the eeprom_type bitfield variable, using the eeprom identification bitmasks

◆ eeprom_write()

int eeprom_write ( uint16_t address,
const uint8_t * src,
uint16_t size,
uint8_t crc_mode )

Writes n bytes at the given address.

Parameters
address- address to write to.
src- pointer to the data to be written.
size- number of bytes to be written.
crc_mode- specify DONT_USE_CRC or USE_CRC.
Returns
EE_ERROR if an error occured, EE_OK otherwise.