STM324xG_EVAL BSP User Manual: STM324xG EVAL EEPROM Exported Functions

STM3240G / STM3241G EVAL BSP Drivers

STM324xG_EVAL BSP User Manual
STM324xG EVAL EEPROM Exported Functions

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, uint16_t *NumByteToRead)
 Reads a block of data from the EEPROM.
uint32_t BSP_EEPROM_WriteBuffer (uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite)
 Writes buffer of data to the I2C EEPROM.
void BSP_EEPROM_TIMEOUT_UserCallback (void)
 Basic management of the timeout situation.
void EEPROM_IO_Init (void)
 Initializes peripherals used by the I2C EEPROM driver.
HAL_StatusTypeDef EEPROM_IO_WriteData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Write data to I2C EEPROM driver in using DMA channel.
HAL_StatusTypeDef EEPROM_IO_ReadData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Reads data from I2C EEPROM driver in using DMA channel.
HAL_StatusTypeDef EEPROM_IO_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
 Checks if target device is ready for communication.

Function Documentation

uint32_t BSP_EEPROM_Init ( void  )

Initializes peripherals used by the I2C EEPROM driver.

Return values:
EEPROM_OK(0) if operation is correctly performed, else return value different from EEPROM_OK (0)

Definition at line 139 of file stm324xg_eval_eeprom.c.

References EEPROM_FAIL, EEPROM_I2C_ADDRESS, EEPROM_IO_Init(), EEPROM_IO_IsDeviceReady(), EEPROM_MAX_TRIALS, and EEPROM_OK.

uint32_t BSP_EEPROM_ReadBuffer ( uint8_t *  pBuffer,
uint16_t  ReadAddr,
uint16_t *  NumByteToRead 
)

Reads a block of data from the EEPROM.

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 167 of file stm324xg_eval_eeprom.c.

References BSP_EEPROM_TIMEOUT_UserCallback(), EEPROM_FAIL, EEPROM_I2C_ADDRESS, EEPROM_IO_ReadData(), EEPROM_OK, and EEPROMDataRead.

Basic management of the timeout situation.

Definition at line 410 of file stm324xg_eval_eeprom.c.

Referenced by BSP_EEPROM_ReadBuffer(), EEPROM_WaitEepromStandbyState(), and EEPROM_WritePage().

uint32_t BSP_EEPROM_WriteBuffer ( uint8_t *  pBuffer,
uint16_t  WriteAddr,
uint16_t  NumByteToWrite 
)

Writes buffer of data to the I2C EEPROM.

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.

Definition at line 193 of file stm324xg_eval_eeprom.c.

References EEPROM_OK, EEPROM_PAGESIZE, and EEPROM_WritePage().

void EEPROM_IO_Init ( void  )

Initializes peripherals used by the I2C EEPROM driver.

Definition at line 1031 of file stm324xg_eval.c.

References I2Cx_Init().

Referenced by BSP_EEPROM_Init().

HAL_StatusTypeDef EEPROM_IO_IsDeviceReady ( uint16_t  DevAddress,
uint32_t  Trials 
)

Checks if target device is ready for communication.

Note:
This function is used with Memory devices
Parameters:
DevAddress,:Target device address
Trials,:Number of trials
Return values:
HALstatus

Definition at line 1069 of file stm324xg_eval.c.

References I2Cx_IsDeviceReady().

Referenced by BSP_EEPROM_Init(), and EEPROM_WaitEepromStandbyState().

HAL_StatusTypeDef EEPROM_IO_ReadData ( uint16_t  DevAddress,
uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Reads data from I2C EEPROM driver in using DMA channel.

Parameters:
DevAddress,:Target device address
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be read
Return values:
HALstatus

Definition at line 1057 of file stm324xg_eval.c.

References I2Cx_ReadMultiple().

Referenced by BSP_EEPROM_ReadBuffer().

HAL_StatusTypeDef EEPROM_IO_WriteData ( uint16_t  DevAddress,
uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Write data to I2C EEPROM driver in using DMA channel.

Parameters:
DevAddress,:Target device address
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be sent
Return values:
HALstatus

Definition at line 1044 of file stm324xg_eval.c.

References I2Cx_WriteMultiple().

Referenced by EEPROM_WritePage().

Generated on Fri Jan 15 2016 14:22:30 for STM324xG_EVAL BSP User Manual by   doxygen 1.7.6.1