Data Structures | |
| struct | eeprom_context_t |
| eeprom hal context structure More... | |
Functions | |
| hpm_stat_t | hpm_eeprom_init (hpm_eeprom_device_t *device) |
| Initialize eeprom device. More... | |
| hpm_stat_t | hpm_eeprom_deinit (hpm_eeprom_device_t *device) |
| Deinitialize eeprom device. More... | |
| hpm_stat_t | hpm_eeprom_read_block (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data) |
| Read data from eeprom device. More... | |
| hpm_stat_t | hpm_eeprom_write_block (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data) |
| Write data to eeprom device. More... | |
| static uint8_t | find_empty_device_bit (uint32_t device_bit) |
| Find empty device bit. More... | |
| hpm_stat_t | hpm_eeprom_register (hpm_eeprom_device_t *device, char device_name[]) |
| Register eeprom device. More... | |
| hpm_stat_t | hpm_eeprom_unregister (char device_name[]) |
| Unregister eeprom device. More... | |
| hpm_eeprom_device_t * | hpm_eeprom_find (char device_name[]) |
| Find eeprom device by device name. More... | |
Variables | |
| eeprom_context_t | g_e2p_ctx |
|
static |
Find empty device bit.
| [in] | device_bit | Device bit map |
| empty | device bit index |
| hpm_stat_t hpm_eeprom_deinit | ( | hpm_eeprom_device_t * | device | ) |
Deinitialize eeprom device.
| [in] | device | Pointer to eeprom device structure |
| status_success |
| hpm_eeprom_device_t* hpm_eeprom_find | ( | char | device_name[] | ) |
Find eeprom device by device name.
| [in] | device_name | Device name |
| Pointer | to eeprom device structure |
| hpm_stat_t hpm_eeprom_init | ( | hpm_eeprom_device_t * | device | ) |
Initialize eeprom device.
| [in] | device | Pointer to eeprom device structure |
| status_success | or status_fail if initialization fails |
| hpm_stat_t hpm_eeprom_read_block | ( | hpm_eeprom_device_t * | device, |
| uint32_t | data_addr, | ||
| uint32_t | len, | ||
| uint8_t * | data | ||
| ) |
Read data from eeprom device.
| [in] | device | Pointer to eeprom device structure |
| [in] | data_addr | Data address to read from |
| [in] | len | Length of data to read |
| [in] | data | Pointer to buffer to store read data |
| status_success | if without any error |
| hpm_stat_t hpm_eeprom_register | ( | hpm_eeprom_device_t * | device, |
| char | device_name[] | ||
| ) |
Register eeprom device.
| [in] | device | Pointer to eeprom device structure |
| [in] | device_name | Device name |
| status_success |
| hpm_stat_t hpm_eeprom_unregister | ( | char | device_name[] | ) |
Unregister eeprom device.
| [in] | device_name | Device name |
| status_success | or status_fail if unregister fails |
| hpm_stat_t hpm_eeprom_write_block | ( | hpm_eeprom_device_t * | device, |
| uint32_t | data_addr, | ||
| uint32_t | len, | ||
| uint8_t * | data | ||
| ) |
Write data to eeprom device.
| [in] | device | Pointer to eeprom device structure |
| [in] | data_addr | Data address to write to |
| [in] | len | Length of data to write |
| [in] | data | Pointer to buffer containing data to write |
| status_success | if without any error |
| eeprom_context_t g_e2p_ctx |