STM32L476G-Discovery board drivers V1.0.0

Dependents:   DiscoLogger DISCO_L476VG_GlassLCD DISCO_L476VG_MicrophoneRecorder DISCO_L476VG_UART ... more

Embed: (wiki syntax)

« Back to documentation index

Exported Functions

Exported Functions
[STM32L476G-DISCOVERY Common]

Functions

uint32_t BSP_GetVersion (void)
 This method returns the STM32L476 DISCOVERY BSP Driver revision.
SupplyMode_TypeDef BSP_SupplyModeDetection (void)
 This method returns the STM32L476 DISCOVERY supply mode.
void BSP_LED_Init (Led_TypeDef Led)
 Configures LED GPIOs.
void BSP_LED_DeInit (Led_TypeDef Led)
 Unconfigures LED GPIOs.
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.
uint8_t BSP_JOY_Init (JOYMode_TypeDef Joy_Mode)
 Configures all buttons of the joystick in GPIO or EXTI modes.
void BSP_JOY_DeInit (void)
 Unonfigures all GPIOs used as buttons of the joystick.
JOYState_TypeDef BSP_JOY_GetState (void)
 Returns the current joystick status.

Function Documentation

uint32_t BSP_GetVersion ( void   )

This method returns the STM32L476 DISCOVERY BSP Driver revision.

Return values:
version: 0xXYZR (8bits for each decimal, R for RC)

Definition at line 275 of file stm32l476g_discovery.c.

void BSP_JOY_DeInit ( void   )

Unonfigures all GPIOs used as buttons of the joystick.

Return values:
None.

Definition at line 501 of file stm32l476g_discovery.c.

JOYState_TypeDef BSP_JOY_GetState ( void   )

Returns the current joystick status.

Return values:
Codeof the joystick key pressed This code can be one of the following values:

  • JOY_NONE
  • JOY_SEL
  • JOY_DOWN
  • JOY_LEFT
  • JOY_RIGHT
  • JOY_UP

Definition at line 526 of file stm32l476g_discovery.c.

uint8_t BSP_JOY_Init ( JOYMode_TypeDef  Joy_Mode )

Configures all buttons of the joystick in GPIO or EXTI modes.

Parameters:
Joy_Mode,:Joystick mode. This parameter can be one of the following values:

  • JOY_MODE_GPIO: Joystick pins will be used as simple IOs
  • JOY_MODE_EXTI: Joystick pins will be connected to EXTI line with interrupt generation capability
Return values:
HAL_OK,:if all initializations are OK. Other value if error.

Definition at line 461 of file stm32l476g_discovery.c.

void BSP_LED_DeInit ( Led_TypeDef  Led )

Unconfigures LED GPIOs.

Parameters:
Led,:Specifies the Led to be unconfigured. This parameter can be one of following parameters:

  • DISCO_LED4
  • DISCO_LED5
Return values:
NoneUnconfigures LED GPIOs.
Parameters:
Led,:Specifies the Led to be unconfigured. This parameter can be one of following parameters:

  • DISCO_LED3
  • DISCO_LED4
Return values:
None

Definition at line 372 of file stm32l476g_discovery.c.

void BSP_LED_Init ( Led_TypeDef  Led )

Configures LED GPIOs.

Parameters:
Led,:Specifies the Led to be configured. This parameter can be one of following parameters:

  • DISCO_LED4
  • DISCO_LED5
Return values:
NoneConfigures LED GPIOs.
Parameters:
Led,:Specifies the Led to be configured. This parameter can be one of following parameters:

  • DISCO_LED3
  • DISCO_LED4
Return values:
None

Definition at line 335 of file stm32l476g_discovery.c.

void BSP_LED_Off ( Led_TypeDef  Led )

Turns selected LED Off.

Parameters:
Led,:Specifies the Led to be set off. This parameter can be one of following parameters:

  • DISCO_LED4
  • DISCO_LED5
Return values:
NoneTurns selected LED Off.
Parameters:
Led,:Specifies the Led to be set off. This parameter can be one of following parameters:

  • DISCO_LED3
  • DISCO_LED4
Return values:
None

Definition at line 423 of file stm32l476g_discovery.c.

void BSP_LED_On ( Led_TypeDef  Led )

Turns selected LED On.

Parameters:
Led,:Specifies the Led to be set on. This parameter can be one of following parameters:

  • DISCO_LED4
  • DISCO_LED5
Return values:
NoneTurns selected LED On.
Parameters:
Led,:Specifies the Led to be set on. This parameter can be one of following parameters:

  • DISCO_LED3
  • DISCO_LED4
Return values:
None

Definition at line 399 of file stm32l476g_discovery.c.

void BSP_LED_Toggle ( Led_TypeDef  Led )

Toggles the selected LED.

Parameters:
Led,:Specifies the Led to be toggled. This parameter can be one of following parameters:

  • DISCO_LED4
  • DISCO_LED5
Return values:
NoneToggles the selected LED.
Parameters:
Led,:Specifies the Led to be toggled. This parameter can be one of following parameters:

  • DISCO_LED3
  • DISCO_LED4
Return values:
None

Definition at line 447 of file stm32l476g_discovery.c.

SupplyMode_TypeDef BSP_SupplyModeDetection ( void   )

This method returns the STM32L476 DISCOVERY supply mode.

Return values:
Codeof current supply mode This code can be one of following:

  • SUPPLY_MODE_EXTERNAL
  • SUPPLY_MODE_BATTERY

Definition at line 287 of file stm32l476g_discovery.c.