ST / BSP_B-L475E-IOT01

Dependents:   mbed-os-example-ble-Thermometer DISCO_L475VG_IOT01-Telegram-BOT DISCO_L475VG_IOT01-sche_cheveux DISCO_L475VG_IOT01-QSPI_FLASH_FILE_SYSTEM ... more

Embed: (wiki syntax)

« Back to documentation index

LOW LEVEL Private Functions

LOW LEVEL Private Functions
[LOW LEVEL]

Functions

uint32_t BSP_GetVersion (void)
 This method returns the STM32L475E IOT01 BSP Driver revision.
void BSP_LED_Init (Led_TypeDef Led)
 Initializes LED GPIO.
void BSP_LED_DeInit (Led_TypeDef Led)
 DeInitializes LED GPIO.
void BSP_LED_On (Led_TypeDef Led)
 Turns the selected LED On.
void BSP_LED_Off (Led_TypeDef Led)
 Turns the selected LED Off.
void BSP_LED_Toggle (Led_TypeDef Led)
 Toggles the selected LED.
void BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
 Initializes push button GPIO and EXTI Line.
void BSP_PB_DeInit (Button_TypeDef Button)
 DeInitializes push button.
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)
 DeInitializes 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 
)

DeInitializes COM port.

Parameters:
COMCOM port to be deinitialized. This parameter can be one of the following values:

  • COM1
huartPointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.

Definition at line 328 of file stm32l475e_iot01.c.

void BSP_COM_Init ( COM_TypeDef  COM,
UART_HandleTypeDef *  huart 
)

Configures COM port.

Parameters:
COMCOM port to be initialized. This parameter can be one of the following values:

  • COM1
huartPointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.

Definition at line 290 of file stm32l475e_iot01.c.

uint32_t BSP_GetVersion ( void   )

This method returns the STM32L475E IOT01 BSP Driver revision.

Return values:
version0xXYZR (8bits for each decimal, R for RC)

Definition at line 132 of file stm32l475e_iot01.c.

void BSP_LED_DeInit ( Led_TypeDef  Led )

DeInitializes LED GPIO.

Parameters:
LedLED to be deinitialized. This parameter can be one of the following values:

  • DISCO_LED2

Definition at line 163 of file stm32l475e_iot01.c.

void BSP_LED_Init ( Led_TypeDef  Led )

Initializes LED GPIO.

Parameters:
LedLED to be initialized. This parameter can be one of the following values:

  • DISCO_LED2

Definition at line 143 of file stm32l475e_iot01.c.

void BSP_LED_Off ( Led_TypeDef  Led )

Turns the selected LED Off.

Parameters:
LedLED to be set off This parameter can be one of the following values:

  • DISCO_LED2

Definition at line 192 of file stm32l475e_iot01.c.

void BSP_LED_On ( Led_TypeDef  Led )

Turns the selected LED On.

Parameters:
LedLED to be set on This parameter can be one of the following values:

  • DISCO_LED2

Definition at line 181 of file stm32l475e_iot01.c.

void BSP_LED_Toggle ( Led_TypeDef  Led )

Toggles the selected LED.

Parameters:
LedLED to be toggled This parameter can be one of the following values:

  • DISCO_LED2

Definition at line 203 of file stm32l475e_iot01.c.

void BSP_PB_DeInit ( Button_TypeDef  Button )

DeInitializes push button.

Parameters:
ButtonButton to be configured This parameter can be one of the following values:

  • BUTTON_USER User Push Button
Note:
PB DeInit does not disable the GPIO clock

Definition at line 260 of file stm32l475e_iot01.c.

uint32_t BSP_PB_GetState ( Button_TypeDef  Button )

Returns the selected button state.

Parameters:
ButtonButton to be checked This parameter can be one of the following values:

  • BUTTON_USER User Push Button
Return values:
TheButton GPIO pin value (GPIO_PIN_RESET = button pressed)

Definition at line 277 of file stm32l475e_iot01.c.

void BSP_PB_Init ( Button_TypeDef  Button,
ButtonMode_TypeDef  ButtonMode 
)

Initializes push button GPIO and EXTI Line.

Parameters:
ButtonButton to be configured This parameter can be one of the following values:

  • BUTTON_USER User Push Button
ButtonModeButton 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 219 of file stm32l475e_iot01.c.

static void I2Cx_DeInit ( I2C_HandleTypeDef *  i2c_handler ) [static]

DeInitializes I2C HAL.

Parameters:
i2c_handlerI2C handler
Return values:
None

Definition at line 441 of file stm32l475e_iot01.c.

static void I2Cx_Error ( I2C_HandleTypeDef *  i2c_handler,
uint8_t  Addr 
) [static]

Manages error callback by re-initializing I2C.

Parameters:
i2c_handlerI2C handler
AddrI2C Address
Return values:
None

Definition at line 517 of file stm32l475e_iot01.c.

static void I2Cx_Init ( I2C_HandleTypeDef *  i2c_handler ) [static]

Initializes I2C HAL.

Parameters:
i2c_handlerI2C handler
Return values:
None

Configure Analogue filter

Definition at line 416 of file stm32l475e_iot01.c.

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_handlerI2C handler
DevAddressTarget device address
TrialsNumber of trials
Return values:
HALstatus

Definition at line 506 of file stm32l475e_iot01.c.

static void I2Cx_MspDeInit ( I2C_HandleTypeDef *  i2c_handler ) [static]

DeInitializes I2C MSP.

Parameters:
i2c_handlerI2C handler
Return values:
None

Definition at line 397 of file stm32l475e_iot01.c.

static void I2Cx_MspInit ( I2C_HandleTypeDef *  i2c_handler ) [static]

Initializes I2C MSP.

Parameters:
i2c_handlerI2C handler
Return values:
None

Definition at line 355 of file stm32l475e_iot01.c.

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_handlerI2C handler
AddrI2C address
RegReg address
MemAddressmemory address
BufferPointer to data buffer
LengthLength of the data
Return values:
HALstatus

Definition at line 457 of file stm32l475e_iot01.c.

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_handlerI2C handler
AddrDevice address on BUS Bus.
RegThe target register address to write
MemAddressmemory address
BufferThe target register value to be written
Lengthbuffer size to be written
Return values:
HALstatus

Definition at line 483 of file stm32l475e_iot01.c.