Functions | |
| e2p_device_spi_attribute_t * | e2p_device_spi_get_attribute (hpm_eeprom_device_t *device) |
| Get eeprom spi device attribute. More... | |
| hpm_stat_t | e2p_device_spi_register_param (hpm_eeprom_device_t *device, void *host_info, uint32_t dev_id) |
| Register eeprom spi device parameter to device structure. More... | |
| hpm_stat_t | e2p_device_spi_init (hpm_eeprom_device_t *device) |
| Initialize eeprom spi device, hw init(clock and pin) and spi master init. More... | |
| hpm_stat_t | e2p_device_spi_deinit (hpm_eeprom_device_t *device) |
| De-initialize eeprom spi device. More... | |
| static hpm_stat_t | e2p_device_spi_page_read (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data, bool is_cross_page) |
| Read data from eeprom spi device from one page. More... | |
| hpm_stat_t | e2p_device_spi_read (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data) |
| Read data from eeprom spi device. More... | |
| static hpm_stat_t | e2p_device_spi_write_enable (hpm_eeprom_device_t *device, spi_control_config_t *control_config) |
| Write Enable instruction to set the write enable latch (WEL) bit in the status register to a logic 1. More... | |
| static bool | e2p_device_spi_write_in_progress (hpm_eeprom_device_t *device, spi_control_config_t *control_config) |
| Read data from eeprom spi device. More... | |
| static hpm_stat_t | e2p_device_spi_page_write (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data, bool is_cross_page) |
| Write data to eeprom spi device from one page. More... | |
| hpm_stat_t | e2p_device_spi_write (hpm_eeprom_device_t *device, uint32_t data_addr, uint32_t len, uint8_t *data) |
| Write data to eeprom spi device. More... | |
Variables | |
| static const e2p_device_spi_attribute_t | supported_e2p_spi_device_list [] |
| eeprom spi supported device information list More... | |
| static e2p_device_ops_t | hpm_e2p_spi_device_ops |
| eeprom spi device operations structure More... | |
| hpm_stat_t e2p_device_spi_deinit | ( | hpm_eeprom_device_t * | device | ) |
De-initialize eeprom spi device.
| [in] | device | Pointer to eeprom device structure |
| status_success |
| e2p_device_spi_attribute_t* e2p_device_spi_get_attribute | ( | hpm_eeprom_device_t * | device | ) |
Get eeprom spi device attribute.
| [in] | device | Pointer to eeprom device structure |
| Pointer | to eeprom spi device attribute structure |
| hpm_stat_t e2p_device_spi_init | ( | hpm_eeprom_device_t * | device | ) |
Initialize eeprom spi device, hw init(clock and pin) and spi master init.
| [in] | device | Pointer to eeprom device structure |
| status_success | or status_fail if initialization fails or status_invalid_argument if configuration is invalid |
|
static |
Read data from eeprom spi device from one page.
| [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 |
| [in] | is_cross_page | Indicate whether the read operation crosses a page boundary |
| status_success | or status_fail if read operation fails or status_invalid_argument if configuration is invalid or status_spi_master_busy if spi bus is busy or status_timeout if spi transfer timeout |
|
static |
Write data to eeprom spi device from one page.
| [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 to store write data |
| [in] | is_cross_page | Indicate whether the write operation crosses a page boundary |
| status_success | or status_fail if read operation fails or status_invalid_argument if configuration is invalid or status_spi_master_busy if spi bus is busy or status_timeout if spi transfer timeout |
| hpm_stat_t e2p_device_spi_read | ( | hpm_eeprom_device_t * | device, |
| uint32_t | data_addr, | ||
| uint32_t | len, | ||
| uint8_t * | data | ||
| ) |
Read data from eeprom spi 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 operation fails or status_invalid_argument if configuration is invalid or status_spi_master_busy if spi bus is busy or status_timeout if spi transfer timeout |
| hpm_stat_t e2p_device_spi_register_param | ( | hpm_eeprom_device_t * | device, |
| void * | host_info, | ||
| uint32_t | dev_id | ||
| ) |
Register eeprom spi device parameter to device structure.
| [in] | device | Pointer to eeprom device structure |
| [in] | host_info | Pointer to eeprom spi host configuration structure |
| [in] | dev_id | Eeprom device id |
| status_success | or status_fail if dev_id is invalid |
| hpm_stat_t e2p_device_spi_write | ( | hpm_eeprom_device_t * | device, |
| uint32_t | data_addr, | ||
| uint32_t | len, | ||
| uint8_t * | data | ||
| ) |
Write data to eeprom spi 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 read operation fails or status_invalid_argument if configuration is invalid or status_spi_master_busy if spi bus is busy or status_timeout if spi transfer timeout |
|
static |
Write Enable instruction to set the write enable latch (WEL) bit in the status register to a logic 1.
| [in] | device | Pointer to eeprom device structure |
| [in] | control_config | Pointer to spi control configuration structure |
| status_success | or status_fail if read operation fails or status_invalid_argument if configuration is invalid or status_spi_master_busy if spi bus is busy or status_timeout if spi transfer timeout |
|
static |
Read data from eeprom spi device.
| [in] | device | Pointer to eeprom device structure |
| [in] | control_config | Pointer to spi control configuration structure |
| true | Write in progress; false Write cycle completed |
|
static |
eeprom spi device operations structure
|
static |
eeprom spi supported device information list