Functions | |
| static uint32_t | flash_read (uint8_t *buf, uint32_t addr, uint32_t size) |
| Flash read function for eeprom emulation. More... | |
| static uint32_t | flash_write (uint8_t *buf, uint32_t addr, uint32_t size) |
| Flash write function for eeprom emulation. More... | |
| static void | flash_erase (uint32_t start_addr, uint32_t size) |
| Flash erase function for eeprom emulation. More... | |
| static uint32_t | eeprom_enter_critical (void) |
| Enter critical section by disabling global interrupts. More... | |
| static void | eeprom_exit_critical (uint32_t level) |
| Exit critical section by restoring global interrupts. More... | |
| hpm_stat_t | e2p_emulation_xpi_register_param (hpm_eeprom_device_t *device) |
| Register eeprom xpi emulation device parameter to device structure. More... | |
| hpm_stat_t | e2p_emulation_xpi_init (hpm_eeprom_device_t *device) |
| Initialize eeprom xpi emulation device. More... | |
| hpm_stat_t | e2p_emulation_xpi_read (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data) |
| Read data from eeprom xpi emulation device. More... | |
| hpm_stat_t | e2p_emulation_xpi_write (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data) |
| Write data to eeprom xpi emulation device. More... | |
Variables | |
| e2p_t | hpm_e2p_emulation |
| static e2p_device_ops_t | hpm_e2p_xpi_device_ops |
| eeprom xpi emulation device operations structure More... | |
| hpm_stat_t e2p_emulation_xpi_init | ( | hpm_eeprom_device_t * | device | ) |
Initialize eeprom xpi emulation device.
| [in] | device | Pointer to eeprom device structure |
| status_success | or status_fail if initialization fails |
| hpm_stat_t e2p_emulation_xpi_read | ( | hpm_eeprom_device_t * | device, |
| uint32_t | data_addr, | ||
| uint32_t | len, | ||
| uint8_t * | data | ||
| ) |
Read data from eeprom xpi emulation 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 | or status_fail if read fails |
| hpm_stat_t e2p_emulation_xpi_register_param | ( | hpm_eeprom_device_t * | device | ) |
Register eeprom xpi emulation device parameter to device structure.
| [in] | device | Pointer to eeprom device structure |
| status_success |
| hpm_stat_t e2p_emulation_xpi_write | ( | hpm_eeprom_device_t * | device, |
| uint32_t | data_addr, | ||
| uint32_t | len, | ||
| uint8_t * | data | ||
| ) |
Write data to eeprom xpi emulation 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 | or status_fail if write fails |
|
static |
Enter critical section by disabling global interrupts.
|
static |
Exit critical section by restoring global interrupts.
|
static |
Flash erase function for eeprom emulation.
| [in] | start_addr | Start address to erase |
| [in] | size | Size of data to erase |
|
static |
Flash read function for eeprom emulation.
| [in] | buf | Pointer to buffer to store read data |
| [in] | addr | Address to read from |
| [in] | size | Size of data to read |
| status_success |
|
static |
Flash write function for eeprom emulation.
| [in] | buf | Pointer to buffer containing data to write |
| [in] | addr | Address to write to |
| [in] | size | Size of data to write |
| status_success |
| e2p_t hpm_e2p_emulation |
|
static |
eeprom xpi emulation device operations structure