STM32373C_EVAL BSP User Manual
|
Functions | |
static void | I2C1_Init (void) |
I2C Bus initialization. | |
static HAL_StatusTypeDef | I2C1_TransmitData (uint8_t *pBuffer, uint16_t Length) |
Write buffer through I2C. | |
static void | I2C1_Error (void) |
Manages error callback by re-initializing I2C. | |
static void | I2C1_MspInit (I2C_HandleTypeDef *hi2c) |
Initializes I2C1 MSP. | |
static void | I2C2_Init (void) |
I2C Bus initialization. | |
static void | I2C2_WriteData (uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t Value) |
Write a value in a register of the device through I2C. | |
static HAL_StatusTypeDef | I2C2_WriteBuffer (uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length) |
Write buffer through I2C. | |
static uint8_t | I2C2_ReadData (uint16_t Addr, uint8_t Reg, uint16_t RegSize) |
Read a register of the device through I2C. | |
static HAL_StatusTypeDef | I2C2_ReadBuffer (uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length) |
Reads buffer through I2C. | |
static HAL_StatusTypeDef | I2C2_ReceiveData (uint16_t Addr, uint8_t *pBuffer, uint16_t Length) |
Read a register of the device through I2C. | |
static HAL_StatusTypeDef | I2C2_IsDeviceReady (uint16_t DevAddress, uint32_t Trials) |
Checks if target device is ready for communication. | |
static void | I2C2_Error (void) |
Manages error callback by re-initializing I2C. | |
static void | I2C2_MspInit (I2C_HandleTypeDef *hi2c) |
Initializes I2C2 MSP. | |
static void | SPIx_Init (void) |
Initializes SPI HAL. | |
static void | SPIx_Write (uint8_t Value) |
SPI Write a byte to device. | |
static uint32_t | SPIx_Read (void) |
SPI Read 4 bytes from device. | |
static void | SPIx_Error (void) |
SPI error treatment function. | |
static void | SPIx_MspInit (SPI_HandleTypeDef *hspi) |
Initializes SPI MSP. |
Function Documentation
static void I2C1_Error | ( | void | ) | [static] |
Manages error callback by re-initializing I2C.
- Return values:
-
None
Definition at line 627 of file stm32373c_eval.c.
References heval_I2c1, and I2C1_Init().
Referenced by I2C1_TransmitData().
static void I2C1_Init | ( | void | ) | [static] |
I2C Bus initialization.
- Return values:
-
None
Definition at line 581 of file stm32373c_eval.c.
References EVAL_I2C1, HDMI_CEC_I2C_ADDRESS, heval_I2c1, I2C1_MspInit(), and I2C1_TIMING.
Referenced by HDMI_CEC_IO_Init(), and I2C1_Error().
static void I2C1_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Initializes I2C1 MSP.
- Parameters:
-
hi2c I2C handle
- Return values:
-
None
Definition at line 540 of file stm32373c_eval.c.
References EVAL_I2C1, EVAL_I2C1_AF, EVAL_I2C1_CLK_ENABLE, EVAL_I2C1_FORCE_RESET, EVAL_I2C1_GPIO_CLK_ENABLE, EVAL_I2C1_GPIO_PORT, EVAL_I2C1_RELEASE_RESET, EVAL_I2C1_SCL_PIN, and EVAL_I2C1_SDA_PIN.
Referenced by I2C1_Init().
static HAL_StatusTypeDef I2C1_TransmitData | ( | uint8_t * | pBuffer, |
uint16_t | Length | ||
) | [static] |
Write buffer through I2C.
- Parameters:
-
pBuffer The address of the data to be written Length buffer size to be written
- Return values:
-
None
Definition at line 607 of file stm32373c_eval.c.
References heval_I2c1, I2C1_Error(), and I2c1Timeout.
Referenced by HDMI_CEC_IO_WriteData().
static void I2C2_Error | ( | void | ) | [static] |
Manages error callback by re-initializing I2C.
- Return values:
-
None
Definition at line 826 of file stm32373c_eval.c.
References heval_I2c2, and I2C2_Init().
Referenced by I2C2_ReadBuffer(), I2C2_ReadData(), I2C2_ReceiveData(), I2C2_WriteBuffer(), and I2C2_WriteData().
static void I2C2_Init | ( | void | ) | [static] |
I2C Bus initialization.
- Return values:
-
None
Definition at line 675 of file stm32373c_eval.c.
References EVAL_I2C2, heval_I2c2, I2C2_MspInit(), and I2C2_TIMING.
Referenced by AUDIO_IO_Init(), EEPROM_IO_Init(), HDMI_CEC_IO_Init(), I2C2_Error(), and TSENSOR_IO_Init().
static HAL_StatusTypeDef I2C2_IsDeviceReady | ( | uint16_t | DevAddress, |
uint32_t | Trials | ||
) | [static] |
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:
-
HAL status
Definition at line 817 of file stm32373c_eval.c.
References heval_I2c2, and I2c2Timeout.
Referenced by EEPROM_IO_IsDeviceReady(), and TSENSOR_IO_IsDeviceReady().
static void I2C2_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Initializes I2C2 MSP.
- Parameters:
-
hi2c I2C handle
- Return values:
-
None
Definition at line 641 of file stm32373c_eval.c.
References EVAL_I2C2_AF, EVAL_I2C2_CLK_ENABLE, EVAL_I2C2_FORCE_RESET, EVAL_I2C2_GPIO_CLK_ENABLE, EVAL_I2C2_GPIO_PORT, EVAL_I2C2_RELEASE_RESET, EVAL_I2C2_SCL_PIN, EVAL_I2C2_SDA_PIN, and EVAL_I2C2_SMBUS_PIN.
Referenced by I2C2_Init().
static HAL_StatusTypeDef I2C2_ReadBuffer | ( | uint16_t | Addr, |
uint8_t | Reg, | ||
uint16_t | RegSize, | ||
uint8_t * | pBuffer, | ||
uint16_t | Length | ||
) | [static] |
Reads buffer through I2C.
- Parameters:
-
Addr Device address on I2C Reg The target address to read RegSize The target register size (can be 8BIT or 16BIT) pBuffer The address to store the read data Length buffer size to be read
- Return values:
-
None
Definition at line 795 of file stm32373c_eval.c.
References heval_I2c2, I2C2_Error(), and I2c2Timeout.
Referenced by EEPROM_IO_ReadData(), and TSENSOR_IO_Read().
static uint8_t I2C2_ReadData | ( | uint16_t | Addr, |
uint8_t | Reg, | ||
uint16_t | RegSize | ||
) | [static] |
Read a register of the device through I2C.
- Parameters:
-
Addr Device address on I2C. Reg The target register address to read RegSize The target register size (can be 8BIT or 16BIT)
- Return values:
-
Read register value
Definition at line 770 of file stm32373c_eval.c.
References heval_I2c2, I2C2_Error(), and I2c2Timeout.
Referenced by AUDIO_IO_Read().
static HAL_StatusTypeDef I2C2_ReceiveData | ( | uint16_t | Addr, |
uint8_t * | pBuffer, | ||
uint16_t | Length | ||
) | [static] |
Read a register of the device through I2C.
- Parameters:
-
Addr Device address on I2C Bus. pBuffer The address to store the read data Length buffer size to be read
- Return values:
-
None
Definition at line 748 of file stm32373c_eval.c.
References heval_I2c2, I2C2_Error(), and I2c2Timeout.
Referenced by HDMI_CEC_IO_ReadData().
static HAL_StatusTypeDef I2C2_WriteBuffer | ( | uint16_t | Addr, |
uint8_t | Reg, | ||
uint16_t | RegSize, | ||
uint8_t * | pBuffer, | ||
uint16_t | Length | ||
) | [static] |
Write buffer through I2C.
- Parameters:
-
Addr Device address on I2C Bus. Reg The target register address to write RegSize The target register size (can be 8BIT or 16BIT) pBuffer The address of the data to be written Length buffer size to be written
- Return values:
-
HAL Status
Definition at line 726 of file stm32373c_eval.c.
References heval_I2c2, I2C2_Error(), and I2c2Timeout.
Referenced by EEPROM_IO_WriteData(), and TSENSOR_IO_Write().
static void I2C2_WriteData | ( | uint16_t | Addr, |
uint8_t | Reg, | ||
uint16_t | RegSize, | ||
uint8_t | Value | ||
) | [static] |
Write a value in a register of the device through I2C.
- Parameters:
-
Addr Device address on I2C Bus. Reg The target register address to write RegSize The target register size (can be 8BIT or 16BIT) Value The target register value to be written
- Return values:
-
None
Definition at line 703 of file stm32373c_eval.c.
References heval_I2c2, I2C2_Error(), and I2c2Timeout.
Referenced by AUDIO_IO_Write().
static void SPIx_Error | ( | void | ) | [static] |
SPI error treatment function.
- Return values:
-
None
Definition at line 942 of file stm32373c_eval.c.
References heval_Spi, and SPIx_Init().
Referenced by SPIx_Read(), and SPIx_Write().
static void SPIx_Init | ( | void | ) | [static] |
Initializes SPI HAL.
- Return values:
-
None
Definition at line 873 of file stm32373c_eval.c.
References EVAL_SPIx, heval_Spi, and SPIx_MspInit().
Referenced by LCD_IO_Init(), SD_IO_Init(), and SPIx_Error().
static void SPIx_MspInit | ( | SPI_HandleTypeDef * | hspi | ) | [static] |
Initializes SPI MSP.
- Parameters:
-
hspi SPI handle
- Return values:
-
None
Definition at line 844 of file stm32373c_eval.c.
References EVAL_SPIx_AF, EVAL_SPIx_CLK_ENABLE, EVAL_SPIx_FORCE_RESET, EVAL_SPIx_GPIO_CLK_ENABLE, EVAL_SPIx_GPIO_PORT, EVAL_SPIx_MISO_PIN, EVAL_SPIx_MOSI_PIN, EVAL_SPIx_RELEASE_RESET, and EVAL_SPIx_SCK_PIN.
Referenced by SPIx_Init().
static uint32_t SPIx_Read | ( | void | ) | [static] |
SPI Read 4 bytes from device.
- Return values:
-
Value read on the SPI
Definition at line 901 of file stm32373c_eval.c.
References heval_Spi, SPIx_Error(), and SpixTimeout.
Referenced by LCD_IO_ReadData(), and SD_IO_ReadByte().
static void SPIx_Write | ( | uint8_t | Value | ) | [static] |
SPI Write a byte to device.
- Parameters:
-
Value value to be written
- Return values:
-
None
Definition at line 924 of file stm32373c_eval.c.
References heval_Spi, SPIx_Error(), and SpixTimeout.
Referenced by LCD_IO_ReadData(), LCD_IO_WriteMultipleData(), LCD_IO_WriteReg(), and SD_IO_WriteByte().
Generated on Wed May 31 2017 11:20:44 for STM32373C_EVAL BSP User Manual by
