B-L475E-IOT01 BSP User Manual
|
Functions | |
uint32_t | BSP_GetVersion (void) |
This method returns the STM32L475E IOT01 BSP Driver revision. | |
void | BSP_LED_Init (Led_TypeDef Led) |
Configures LEDs. | |
void | BSP_LED_DeInit (Led_TypeDef Led) |
DeInit LEDs. | |
void | BSP_LED_On (Led_TypeDef Led) |
Turns selected LED On. | |
void | BSP_LED_Off (Led_TypeDef Led) |
Turns selected LED Off. | |
void | BSP_LED_Toggle (Led_TypeDef Led) |
Toggles the selected LED. | |
void | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode) |
Configures button GPIO and EXTI Line. | |
void | BSP_PB_DeInit (Button_TypeDef Button) |
Push Button DeInit. | |
uint32_t | BSP_PB_GetState (Button_TypeDef Button) |
Returns the selected button state. | |
void | BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *huart) |
Configures COM port. | |
void | BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart) |
DeInit COM port. | |
static void | I2Cx_MspInit (I2C_HandleTypeDef *i2c_handler) |
Initializes I2C MSP. | |
static void | I2Cx_MspDeInit (I2C_HandleTypeDef *i2c_handler) |
DeInitializes I2C MSP. | |
static void | I2Cx_Init (I2C_HandleTypeDef *i2c_handler) |
Initializes I2C HAL. | |
static void | I2Cx_DeInit (I2C_HandleTypeDef *i2c_handler) |
DeInitializes I2C HAL. | |
static HAL_StatusTypeDef | I2Cx_ReadMultiple (I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length) |
Reads multiple data. | |
static HAL_StatusTypeDef | I2Cx_WriteMultiple (I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length) |
Writes a value in a register of the device through BUS in using DMA mode. | |
static HAL_StatusTypeDef | I2Cx_IsDeviceReady (I2C_HandleTypeDef *i2c_handler, uint16_t DevAddress, uint32_t Trials) |
Checks if target device is ready for communication. | |
static void | I2Cx_Error (I2C_HandleTypeDef *i2c_handler, uint8_t Addr) |
Manages error callback by re-initializing I2C. |
Function Documentation
void BSP_COM_DeInit | ( | COM_TypeDef | COM, |
UART_HandleTypeDef * | huart | ||
) |
DeInit COM port.
- Parameters:
-
COM,: COM port to be configured. This parameter can be one of the following values: - COM1
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.
Definition at line 345 of file stm32l475e_iot01.c.
References COM_USART, and DISCOVERY_COMx_CLK_DISABLE.
void BSP_COM_Init | ( | COM_TypeDef | COM, |
UART_HandleTypeDef * | huart | ||
) |
Configures COM port.
- Parameters:
-
COM,: COM port to be configured. This parameter can be one of the following values: - COM1
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.
Definition at line 307 of file stm32l475e_iot01.c.
References COM_RX_AF, COM_RX_PIN, COM_RX_PORT, COM_TX_AF, COM_TX_PIN, COM_TX_PORT, COM_USART, DISCOVERY_COMx_CLK_ENABLE, DISCOVERY_COMx_RX_GPIO_CLK_ENABLE, and DISCOVERY_COMx_TX_GPIO_CLK_ENABLE.
uint32_t BSP_GetVersion | ( | void | ) |
This method returns the STM32L475E IOT01 BSP Driver revision.
- Return values:
-
version,: 0xXYZR (8bits for each decimal, R for RC)
Definition at line 149 of file stm32l475e_iot01.c.
References __STM32L475E_IOT01_BSP_VERSION.
void BSP_LED_DeInit | ( | Led_TypeDef | Led | ) |
DeInit LEDs.
- Parameters:
-
Led,: LED to be configured. This parameter can be one of the following values: - LED2
Definition at line 180 of file stm32l475e_iot01.c.
void BSP_LED_Init | ( | Led_TypeDef | Led | ) |
Configures LEDs.
- Parameters:
-
Led,: LED to be configured. This parameter can be one of the following values: - LED2
Definition at line 160 of file stm32l475e_iot01.c.
References GPIO_PIN, GPIO_PORT, and LEDx_GPIO_CLK_ENABLE.
void BSP_LED_Off | ( | Led_TypeDef | Led | ) |
Turns selected LED Off.
- Parameters:
-
Led,: LED to be set off This parameter can be one of the following values: - LED2
Definition at line 209 of file stm32l475e_iot01.c.
void BSP_LED_On | ( | Led_TypeDef | Led | ) |
Turns selected LED On.
- Parameters:
-
Led,: LED to be set on This parameter can be one of the following values: - LED2
Definition at line 198 of file stm32l475e_iot01.c.
void BSP_LED_Toggle | ( | Led_TypeDef | Led | ) |
Toggles the selected LED.
- Parameters:
-
Led,: LED to be toggled This parameter can be one of the following values: - LED2
Definition at line 220 of file stm32l475e_iot01.c.
void BSP_PB_DeInit | ( | Button_TypeDef | Button | ) |
Push Button DeInit.
- Parameters:
-
Button,: Button to be configured This parameter can be one of the following values: - BUTTON_WAKEUP: Wakeup Push Button
- Note:
- PB DeInit does not disable the GPIO clock
Definition at line 277 of file stm32l475e_iot01.c.
References BUTTON_IRQn, BUTTON_PIN, and BUTTON_PORT.
uint32_t BSP_PB_GetState | ( | Button_TypeDef | Button | ) |
Returns the selected button state.
- Parameters:
-
Button,: Button to be checked This parameter can be one of the following values: - BUTTON_WAKEUP: Wakeup Push Button
- Return values:
-
The Button GPIO pin value (GPIO_PIN_RESET = button pressed)
Definition at line 294 of file stm32l475e_iot01.c.
References BUTTON_PIN, and BUTTON_PORT.
void BSP_PB_Init | ( | Button_TypeDef | Button, |
ButtonMode_TypeDef | ButtonMode | ||
) |
Configures button GPIO and EXTI Line.
- Parameters:
-
Button,: Button to be configured This parameter can be one of the following values: - BUTTON_WAKEUP: Wakeup Push Button
ButtonMode,: Button mode This parameter can be one of the following values: - BUTTON_MODE_GPIO: Button will be used as simple IO
- BUTTON_MODE_EXTI: Button will be connected to EXTI line with interrupt generation capability
Definition at line 236 of file stm32l475e_iot01.c.
References BUTTON_IRQn, BUTTON_MODE_EXTI, BUTTON_MODE_GPIO, BUTTON_PIN, BUTTON_PORT, and USER_BUTTON_GPIO_CLK_ENABLE.
static void I2Cx_DeInit | ( | I2C_HandleTypeDef * | i2c_handler | ) | [static] |
DeInitializes I2C HAL.
- Parameters:
-
i2c_handler : I2C handler
- Return values:
-
None
Definition at line 458 of file stm32l475e_iot01.c.
References I2Cx_MspDeInit().
Referenced by SENSOR_IO_DeInit().
static void I2Cx_Error | ( | I2C_HandleTypeDef * | i2c_handler, |
uint8_t | Addr | ||
) | [static] |
Manages error callback by re-initializing I2C.
- Parameters:
-
i2c_handler : I2C handler Addr,: I2C Address
- Return values:
-
None
Definition at line 534 of file stm32l475e_iot01.c.
References I2Cx_Init().
Referenced by I2Cx_ReadMultiple(), and I2Cx_WriteMultiple().
static void I2Cx_Init | ( | I2C_HandleTypeDef * | i2c_handler | ) | [static] |
Initializes I2C HAL.
- Parameters:
-
i2c_handler : I2C handler
- Return values:
-
None
Configure Analogue filter
Definition at line 433 of file stm32l475e_iot01.c.
References DISCOVERY_I2Cx, and I2Cx_MspInit().
Referenced by I2Cx_Error(), and SENSOR_IO_Init().
static HAL_StatusTypeDef I2Cx_IsDeviceReady | ( | I2C_HandleTypeDef * | i2c_handler, |
uint16_t | DevAddress, | ||
uint32_t | Trials | ||
) | [static] |
Checks if target device is ready for communication.
- Note:
- This function is used with Memory devices
- Parameters:
-
i2c_handler : I2C handler DevAddress,: Target device address Trials,: Number of trials
- Return values:
-
HAL status
Definition at line 523 of file stm32l475e_iot01.c.
Referenced by SENSOR_IO_IsDeviceReady().
static void I2Cx_MspDeInit | ( | I2C_HandleTypeDef * | i2c_handler | ) | [static] |
DeInitializes I2C MSP.
- Parameters:
-
i2c_handler : I2C handler
- Return values:
-
None
Definition at line 414 of file stm32l475e_iot01.c.
References DISCOVERY_I2Cx_CLK_DISABLE, DISCOVERY_I2Cx_SCL_PIN, DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE, DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT, and DISCOVERY_I2Cx_SDA_PIN.
Referenced by I2Cx_DeInit().
static void I2Cx_MspInit | ( | I2C_HandleTypeDef * | i2c_handler | ) | [static] |
Initializes I2C MSP.
- Parameters:
-
i2c_handler : I2C handler
- Return values:
-
None
Definition at line 372 of file stm32l475e_iot01.c.
References DISCOVERY_I2Cx_CLK_ENABLE, DISCOVERY_I2Cx_ER_IRQn, DISCOVERY_I2Cx_EV_IRQn, DISCOVERY_I2Cx_FORCE_RESET, DISCOVERY_I2Cx_RELEASE_RESET, DISCOVERY_I2Cx_SCL_PIN, DISCOVERY_I2Cx_SCL_SDA_AF, DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE, DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT, and DISCOVERY_I2Cx_SDA_PIN.
Referenced by I2Cx_Init().
static HAL_StatusTypeDef I2Cx_ReadMultiple | ( | I2C_HandleTypeDef * | i2c_handler, |
uint8_t | Addr, | ||
uint16_t | Reg, | ||
uint16_t | MemAddress, | ||
uint8_t * | Buffer, | ||
uint16_t | Length | ||
) | [static] |
Reads multiple data.
- Parameters:
-
i2c_handler : I2C handler Addr,: I2C address Reg,: Reg address MemAddress,: memory address Buffer,: Pointer to data buffer Length,: Length of the data
- Return values:
-
HAL status
Definition at line 474 of file stm32l475e_iot01.c.
References I2Cx_Error().
Referenced by SENSOR_IO_Read(), and SENSOR_IO_ReadMultiple().
static HAL_StatusTypeDef I2Cx_WriteMultiple | ( | I2C_HandleTypeDef * | i2c_handler, |
uint8_t | Addr, | ||
uint16_t | Reg, | ||
uint16_t | MemAddress, | ||
uint8_t * | Buffer, | ||
uint16_t | Length | ||
) | [static] |
Writes a value in a register of the device through BUS in using DMA mode.
- Parameters:
-
i2c_handler : I2C handler Addr,: Device address on BUS Bus. Reg,: The target register address to write MemAddress,: memory address Buffer,: The target register value to be written Length,: buffer size to be written
- Return values:
-
HAL status
Definition at line 500 of file stm32l475e_iot01.c.
References I2Cx_Error().
Referenced by SENSOR_IO_Write(), and SENSOR_IO_WriteMultiple().
Generated on Thu Mar 16 2017 10:38:33 for B-L475E-IOT01 BSP User Manual by
