eeprom_data_read()函数代码描述
/**
* @brief read data from eeprom.
* @param hi2c: the handle points to the operation information.
* @param mode: i2c transfer mode.
* - EE_MODE_POLL: transmits data through polling mode.
* - EE_MODE_INT: transmits data through interrupt mode.
* - EE_MODE_DMA: transmits data through dma mode.
* @param address: eeprom address.
* @param mem_address: eeprom memory address.
* @param pdata: data buffer.
* @param number: the number of data to be transferred.
* @param timeout: maximum waiting time.
* @retval i2c status.
*/
i2c_status_type eeprom_data_read(i2c_handle_type* hi2c, eeprom_i2c_mode_type mode, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t number, uint32_t timeout)
void eeprom_data_write()函数代码描述
/**
* @brief write data to eeprom.
* @param hi2c: the handle points to the operation information.
* @param mode: i2c transfer mode.
* - EE_MODE_POLL: transmits data through polling mode.
* - EE_MODE_INT: transmits data through interrupt mode.
* - EE_MODE_DMA: transmits data through dma mode.
* @param address: eeprom address.
* @param mem_address: eeprom memory address.
* @param pdata: data buffer.
* @param number: the number of data to be transferred.
* @param timeout: maximum waiting time.
* @retval i2c status.
*/
i2c_status_type eeprom_data_write(i2c_handle_type* hi2c, eeprom_i2c_mode_type mode, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t number, uint32_t timeout)
下载验证
如果通讯正常,写入和读取的数据相同LCD屏显示eeprom write/read ok
如果通讯错误,LCD屏显示eeprom write/read error