STM32L0xx_Nucleo_32 BSP User Manual: Exported Functions

STM32L0xx Nucleo 32 BSP Drivers

STM32L0xx_Nucleo_32 BSP User Manual
Exported Functions

Functions

uint32_t BSP_GetVersion (void)
 This method returns the STM32L0XX NUCLEO BSP Driver revision.
void BSP_LED_Init (Led_TypeDef Led)
 Configures LED GPIO.
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 (void)
 Configures joystick available on adafruit 1.8" TFT shield managed through ADC to detect motion.
JOYState_TypeDef BSP_JOY_GetState (void)
 Returns the Joystick key pressed.

Function Documentation

uint32_t BSP_GetVersion ( void  )

This method returns the STM32L0XX NUCLEO BSP Driver revision.

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

Definition at line 148 of file stm32l0xx_nucleo_32.c.

References __STM32L0XX_NUCLEO_32_BSP_VERSION.

Returns the Joystick key pressed.

Note:
To know which Joystick key is pressed we need to detect the voltage level on each key output
  • None : 3.3 V / 4095
  • SEL : 1.055 V / 1308
  • DOWN : 0.71 V / 88
  • LEFT : 3.0 V / 3720
  • RIGHT : 0.595 V / 737
  • UP : 1.65 V / 2046
Return values:
JOYState_TypeDef,:Code of the Joystick key pressed.

Definition at line 896 of file stm32l0xx_nucleo_32.c.

References hnucleo_Adc, JOY_DOWN, JOY_LEFT, JOY_NONE, JOY_RIGHT, JOY_SEL, and JOY_UP.

uint8_t BSP_JOY_Init ( void  )

Configures joystick available on adafruit 1.8" TFT shield managed through ADC to detect motion.

Return values:
Joystickstatus(0=> success, 1=> fail)

Definition at line 867 of file stm32l0xx_nucleo_32.c.

References ADCx_Init(), hnucleo_Adc, and sConfig.

void BSP_LED_Init ( Led_TypeDef  Led)

Configures LED GPIO.

Parameters:
Led,:Specifies the Led to be configured. This parameter can be one of following parameters:
  • LED3
Return values:
None

Definition at line 160 of file stm32l0xx_nucleo_32.c.

References LED_PIN, LED_PORT, and LEDx_GPIO_CLK_ENABLE.

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:
  • LED3
Return values:
None

Definition at line 196 of file stm32l0xx_nucleo_32.c.

References LED_PIN, and LED_PORT.

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:
  • LED3
Return values:
None

Definition at line 184 of file stm32l0xx_nucleo_32.c.

References LED_PIN, and LED_PORT.

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:
  • LED3
Return values:
None

Definition at line 208 of file stm32l0xx_nucleo_32.c.

References LED_PIN, and LED_PORT.

Generated on Mon Aug 28 2017 14:48:51 for STM32L0xx_Nucleo_32 BSP User Manual by   doxygen 1.7.6.1