![]() |
GaIA BIOS Library
|
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. | |
Functions to handle on board Eeprom data storage.
| int eeprom_read | ( | uint16_t | address, |
| uint8_t * | dst, | ||
| uint16_t | size, | ||
| uint8_t | crc_mode ) |
Reads n bytes from the given address.
| 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. |
EE_ERROR if an error occured, EE_OK otherwise. | 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
| int eeprom_write | ( | uint16_t | address, |
| const uint8_t * | src, | ||
| uint16_t | size, | ||
| uint8_t | crc_mode ) |
Writes n bytes at the given address.
| 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. |
EE_ERROR if an error occured, EE_OK otherwise.