STM32072B_EVAL BSP User Manual
|
Functions | |
uint32_t | BSP_EEPROM_Init (void) |
Initializes peripherals used by the I2C EEPROM driver. | |
uint32_t | BSP_EEPROM_ReadBuffer (uint8_t *pBuffer, uint16_t ReadAddr, uint32_t *NumByteToRead) |
Reads a block of data from the EEPROM device selected. | |
uint32_t | BSP_EEPROM_WriteBuffer (uint8_t *pBuffer, uint16_t WriteAddr, uint32_t NumByteToWrite) |
Writes buffer of data to the EEPROM device selected. | |
__weak void | BSP_EEPROM_TIMEOUT_UserCallback (void) |
Basic management of the timeout situation. |
Function Documentation
uint32_t BSP_EEPROM_Init | ( | void | ) |
Initializes peripherals used by the I2C EEPROM driver.
- Note:
- There are 2 different versions of M24LR64 (A01 & A02). Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
- Return values:
-
EEPROM_OK (0) if operation is correctly performed, else return value different from EEPROM_OK (0)
Definition at line 145 of file stm32072b_eval_eeprom.c.
References EEPROM_FAIL, EEPROM_I2C_Drv, and EEPROM_DrvTypeDef::Init.
uint32_t BSP_EEPROM_ReadBuffer | ( | uint8_t * | pBuffer, |
uint16_t | ReadAddr, | ||
uint32_t * | NumByteToRead | ||
) |
Reads a block of data from the EEPROM device selected.
- Parameters:
-
pBuffer pointer to the buffer that receives the data read from the EEPROM. ReadAddr EEPROM's internal address to start reading from. NumByteToRead pointer to the variable holding number of bytes to be read from the EEPROM.
- Note:
- The variable pointed by NumByteToRead is reset to 0 when all the data are read from the EEPROM. Application should monitor this variable in order know when the transfer is complete.
- Return values:
-
EEPROM_OK (0) if operation is correctly performed, else return value different from EEPROM_OK (0) or the timeout user callback.
Definition at line 173 of file stm32072b_eval_eeprom.c.
References EEPROM_FAIL, and EEPROM_DrvTypeDef::ReadBuffer.
void BSP_EEPROM_TIMEOUT_UserCallback | ( | void | ) |
Basic management of the timeout situation.
- Return values:
-
None.
Definition at line 347 of file stm32072b_eval_eeprom.c.
Referenced by EEPROM_I2C_WaitEepromStandbyState().
uint32_t BSP_EEPROM_WriteBuffer | ( | uint8_t * | pBuffer, |
uint16_t | WriteAddr, | ||
uint32_t | NumByteToWrite | ||
) |
Writes buffer of data to the EEPROM device selected.
- Parameters:
-
pBuffer pointer to the buffer containing the data to be written to the EEPROM. WriteAddr EEPROM's internal address to write to. NumByteToWrite number of bytes to write to the EEPROM.
- Return values:
-
EEPROM_OK (0) if operation is correctly performed, else return value different from EEPROM_OK (0) or the timeout user callback.
< If NumByteToWrite < EEPROM_PAGESIZE
< If NumByteToWrite < EEPROM_PAGESIZE
< If the number of data to be written is more than the remaining space in the current page:
< Write the data contained in same page
< Write the remaining data in the following page
Definition at line 194 of file stm32072b_eval_eeprom.c.
References EEPROM_FAIL, EEPROM_OK, EEPROMPageSize, and EEPROM_DrvTypeDef::WritePage.
Generated on Wed Jul 5 2017 08:56:11 for STM32072B_EVAL BSP User Manual by
