STM32F3xx_Nucleo_32 BSP User Manual
|
Functions | |
void | I2C1_Init (void) |
I2C Bus initialization. | |
void | I2C1_Error (void) |
Manages error callback by re-initializing I2C. | |
void | I2C1_MspInit (I2C_HandleTypeDef *hi2c) |
I2C MSP Initialization. | |
void | I2C1_Write (uint8_t Addr, uint8_t Reg, uint8_t Value) |
Writes a single data. | |
uint8_t | I2C1_Read (uint8_t Addr, uint8_t Reg) |
Reads a single data. | |
HAL_StatusTypeDef | I2C1_WriteBuffer (uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length) |
Write a value in a register of the device through BUS. | |
HAL_StatusTypeDef | I2C1_ReadBuffer (uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length) |
Reads multiple data on the BUS. | |
HAL_StatusTypeDef | I2C1_IsDeviceReady (uint16_t DevAddress, uint32_t Trials) |
Checks if target device is ready for communication. |
Function Documentation
void I2C1_Error | ( | void | ) |
Manages error callback by re-initializing I2C.
- Return values:
-
None
Definition at line 336 of file stm32f3xx_nucleo_32.c.
References I2C1_Init(), and nucleo32_I2c1.
Referenced by I2C1_Read(), I2C1_ReadBuffer(), I2C1_Write(), and I2C1_WriteBuffer().
void I2C1_Init | ( | void | ) |
I2C Bus initialization.
- Return values:
-
None
Definition at line 209 of file stm32f3xx_nucleo_32.c.
References BSP_I2C1, I2C1_MspInit(), I2C1_TIMING, and nucleo32_I2c1.
Referenced by BSP_DIGIT4_SEG7_Init(), and I2C1_Error().
HAL_StatusTypeDef I2C1_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:
-
HAL status
Definition at line 303 of file stm32f3xx_nucleo_32.c.
References I2c1Timeout, and nucleo32_I2c1.
void I2C1_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) |
I2C MSP Initialization.
- Parameters:
-
hi2c I2C handle
- Return values:
-
None
Definition at line 350 of file stm32f3xx_nucleo_32.c.
References BSP_I2C1_CLK_ENABLE, BSP_I2C1_FORCE_RESET, BSP_I2C1_GPIO_CLK_ENABLE, BSP_I2C1_GPIO_PORT, BSP_I2C1_RELEASE_RESET, BSP_I2C1_SCL_PIN, BSP_I2C1_SCL_SDA_AF, and BSP_I2C1_SDA_PIN.
Referenced by I2C1_Init().
uint8_t I2C1_Read | ( | uint8_t | Addr, |
uint8_t | Reg | ||
) |
Reads a single data.
- Parameters:
-
Addr I2C address Reg Register address
- Return values:
-
Read data
Definition at line 256 of file stm32f3xx_nucleo_32.c.
References I2C1_Error(), and nucleo32_I2c1.
HAL_StatusTypeDef I2C1_ReadBuffer | ( | uint16_t | Addr, |
uint8_t | Reg, | ||
uint16_t | RegSize, | ||
uint8_t * | pBuffer, | ||
uint16_t | Length | ||
) |
Reads multiple data on the BUS.
- Parameters:
-
Addr I2C Address Reg Reg Address RegSize The target register size (can be 8BIT or 16BIT) pBuffer pointer to read data buffer Length length of the data
- Return values:
-
0 if no problems to read multiple data
Definition at line 281 of file stm32f3xx_nucleo_32.c.
References I2C1_Error(), I2c1Timeout, and nucleo32_I2c1.
void I2C1_Write | ( | uint8_t | Addr, |
uint8_t | Reg, | ||
uint8_t | Value | ||
) |
Writes a single data.
- Parameters:
-
Addr I2C address Reg Register address Value Data to be written
- Return values:
-
None
Definition at line 236 of file stm32f3xx_nucleo_32.c.
References I2C1_Error(), and nucleo32_I2c1.
HAL_StatusTypeDef I2C1_WriteBuffer | ( | uint16_t | Addr, |
uint8_t | Reg, | ||
uint16_t | RegSize, | ||
uint8_t * | pBuffer, | ||
uint16_t | Length | ||
) |
Write a value in a register of the device through BUS.
- Parameters:
-
Addr Device address on BUS Bus. Reg The target register address to write RegSize The target register size (can be 8BIT or 16BIT) pBuffer The target register value to be written Length buffer size to be written
- Return values:
-
None
Definition at line 317 of file stm32f3xx_nucleo_32.c.
References I2C1_Error(), I2c1Timeout, and nucleo32_I2c1.
Referenced by BSP_DIGIT4_SEG7_Display(), and BSP_DIGIT4_SEG7_Init().
Generated on Wed May 31 2017 11:09:08 for STM32F3xx_Nucleo_32 BSP User Manual by 1.7.6.1