STM32L0538-Discovery BSP User Manual
|
Modules | |
STM32L0538_DISCOVERY_LOW_LEVEL | |
This file provides set of firmware functions to manage Leds and push-button available on STM32L0538-Discovery Kit from STMicroelectronics. | |
STM32L0538_DISCOVERY_EPD | |
STM32L053_DISCOVERY_EPD | |
FONTS | |
This file provides text Font12 for STM32L0538-Discovery's EPD driver. | |
Functions | |
static void | SPIx_Init (void) |
SPIx Bus initialization. | |
static void | SPIx_Write (uint8_t Value) |
SPI Write a byte to device. | |
static uint32_t | SPIx_Read (void) |
SPI Read 4 bytes from device. | |
static void | SPIx_Error (void) |
SPI error treatment function. | |
static void | SPIx_MspInit (SPI_HandleTypeDef *hspi) |
SPI MSP Init. | |
void | EPD_IO_Init (void) |
Configures the EPD SPI interface. | |
void | EPD_IO_WriteData (uint16_t RegValue) |
Write register value. | |
void | EPD_IO_WriteReg (uint8_t Reg) |
Writes command to selected EPD register. | |
uint16_t | EPD_IO_ReadData (void) |
Reads data from EPD data register. | |
void | EPD_Delay (uint32_t Delay) |
Wait for loop in ms. | |
uint32_t | BSP_GetVersion (void) |
This method returns the STM32L0538 DISCO 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. | |
void | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode) |
Configures Button GPIO and EXTI Line. | |
uint32_t | BSP_PB_GetState (Button_TypeDef Button) |
Returns the selected Button state. | |
Variables | |
GPIO_TypeDef * | GPIO_PORT [LEDn] |
const uint16_t | GPIO_PIN [LEDn] |
GPIO_TypeDef * | BUTTON_PORT [BUTTONn] = {KEY_BUTTON_GPIO_PORT} |
const uint16_t | BUTTON_PIN [BUTTONn] = {KEY_BUTTON_PIN} |
const uint8_t | BUTTON_IRQn [BUTTONn] = {KEY_BUTTON_EXTI_IRQn} |
static SPI_HandleTypeDef | SpiHandle |
Function Documentation
uint32_t BSP_GetVersion | ( | void | ) |
This method returns the STM32L0538 DISCO BSP Driver revision.
- Parameters:
-
None
- Return values:
-
version,: 0xXYZR (8bits for each decimal, R for RC)
Definition at line 134 of file stm32l0538_discovery.c.
References __STM32L0538_DISCO_BSP_VERSION.
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
- LED4
- Return values:
-
None
Definition at line 147 of file stm32l0538_discovery.c.
References GPIO_PIN, GPIO_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
- LED4
- Return values:
-
None
Definition at line 186 of file stm32l0538_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: - LED3
- LED4
- Return values:
-
None
Definition at line 173 of file stm32l0538_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: - LED3
- LED4
- Return values:
-
None
Definition at line 199 of file stm32l0538_discovery.c.
uint32_t BSP_PB_GetState | ( | Button_TypeDef | Button | ) |
Returns the selected Button state.
- Parameters:
-
Button,: Specifies the Button to be checked. This parameter should be: BUTTON_KEY
- Return values:
-
The Button GPIO pin value.
Definition at line 252 of file stm32l0538_discovery.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,: Specifies the Button to be configured. This parameter should be: BUTTON_KEY Button_Mode,: Specifies Button mode. This parameter can be one of following parameters: - BUTTON_MODE_GPIO: Button will be used as simple IO
- BUTTON_MODE_EXTI: Button will be connected to EXTI line with interrupt generation capability
- Return values:
-
None
Definition at line 215 of file stm32l0538_discovery.c.
References BUTTON_IRQn, BUTTON_MODE_EXTI, BUTTON_MODE_GPIO, BUTTON_PIN, BUTTON_PORT, and BUTTONx_GPIO_CLK_ENABLE.
void EPD_Delay | ( | uint32_t | Delay | ) |
Wait for loop in ms.
- Parameters:
-
Delay in ms.
- Return values:
-
None
Definition at line 502 of file stm32l0538_discovery.c.
Referenced by BSP_EPD_CloseChargePump(), BSP_EPD_RefreshDisplay(), and EPD_IO_Init().
void EPD_IO_Init | ( | void | ) |
Configures the EPD SPI interface.
- Parameters:
-
None
- Return values:
-
None
Definition at line 389 of file stm32l0538_discovery.c.
References EPD_BUSY_GPIO_CLK_ENABLE, EPD_BUSY_GPIO_PORT, EPD_BUSY_PIN, EPD_CS_GPIO_CLK_ENABLE, EPD_CS_GPIO_PORT, EPD_CS_HIGH, EPD_CS_LOW, EPD_CS_PIN, EPD_DC_GPIO_CLK_ENABLE, EPD_DC_GPIO_PORT, EPD_DC_PIN, EPD_Delay(), EPD_PWR_GPIO_CLK_ENABLE, EPD_PWR_GPIO_PORT, EPD_PWR_LOW, EPD_PWR_PIN, EPD_RESET_GPIO_CLK_ENABLE, EPD_RESET_GPIO_PORT, EPD_RESET_HIGH, EPD_RESET_PIN, and SPIx_Init().
uint16_t EPD_IO_ReadData | ( | void | ) |
Reads data from EPD data register.
- Parameters:
-
None
- Return values:
-
Read data.
Definition at line 485 of file stm32l0538_discovery.c.
References EPD_CS_HIGH, EPD_CS_LOW, and SPIx_Read().
void EPD_IO_WriteData | ( | uint16_t | RegValue | ) |
Write register value.
- Parameters:
-
None
- Return values:
-
None
Definition at line 445 of file stm32l0538_discovery.c.
References EPD_CS_HIGH, EPD_CS_LOW, EPD_DC_HIGH, and SPIx_Write().
void EPD_IO_WriteReg | ( | uint8_t | Reg | ) |
Writes command to selected EPD register.
- Parameters:
-
Reg,: Address of the selected register.
- Return values:
-
None
Definition at line 465 of file stm32l0538_discovery.c.
References EPD_CS_HIGH, EPD_CS_LOW, EPD_DC_LOW, and SPIx_Write().
static void SPIx_Error | ( | void | ) | [static] |
SPI error treatment function.
- Parameters:
-
None
- Return values:
-
None
Definition at line 341 of file stm32l0538_discovery.c.
References SpiHandle, and SPIx_Init().
Referenced by SPIx_Read(), and SPIx_Write().
static void SPIx_Init | ( | void | ) | [static] |
SPIx Bus initialization.
- Parameters:
-
None
- Return values:
-
None
Definition at line 267 of file stm32l0538_discovery.c.
References DISCOVERY_SPIx, SpiHandle, and SPIx_MspInit().
Referenced by EPD_IO_Init(), and SPIx_Error().
static void SPIx_MspInit | ( | SPI_HandleTypeDef * | hspi | ) | [static] |
SPI MSP Init.
- Parameters:
-
hspi,: SPI handle
- Return values:
-
None
Definition at line 355 of file stm32l0538_discovery.c.
References DISCOVERY_SPIx_AF, DISCOVERY_SPIx_CLK_ENABLE, DISCOVERY_SPIx_GPIO_CLK_ENABLE, DISCOVERY_SPIx_GPIO_PORT, DISCOVERY_SPIx_MOSI_PIN, and DISCOVERY_SPIx_SCK_PIN.
Referenced by SPIx_Init().
static uint32_t SPIx_Read | ( | void | ) | [static] |
SPI Read 4 bytes from device.
- Parameters:
-
ReadSize Number of bytes to read (max 4 bytes)
- Return values:
-
Value read on the SPI
Definition at line 299 of file stm32l0538_discovery.c.
References SpiHandle, SPIx_Error(), and SPIx_TIMEOUT_MAX.
Referenced by EPD_IO_ReadData().
static void SPIx_Write | ( | uint8_t | Value | ) | [static] |
SPI Write a byte to device.
- Parameters:
-
Value,: value to be written
- Return values:
-
None
Definition at line 322 of file stm32l0538_discovery.c.
References SpiHandle, SPIx_Error(), and SPIx_TIMEOUT_MAX.
Referenced by EPD_IO_WriteData(), and EPD_IO_WriteReg().
Variable Documentation
const uint8_t BUTTON_IRQn[BUTTONn] = {KEY_BUTTON_EXTI_IRQn} |
Definition at line 99 of file stm32l0538_discovery.c.
Referenced by BSP_PB_Init().
const uint16_t BUTTON_PIN[BUTTONn] = {KEY_BUTTON_PIN} |
Definition at line 98 of file stm32l0538_discovery.c.
Referenced by BSP_PB_GetState(), and BSP_PB_Init().
GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {KEY_BUTTON_GPIO_PORT} |
Definition at line 97 of file stm32l0538_discovery.c.
Referenced by BSP_PB_GetState(), and BSP_PB_Init().
Definition at line 94 of file stm32l0538_discovery.c.
Referenced by BSP_LED_Init(), BSP_LED_Off(), BSP_LED_On(), and BSP_LED_Toggle().
Definition at line 91 of file stm32l0538_discovery.c.
Referenced by BSP_LED_Init(), BSP_LED_Off(), BSP_LED_On(), and BSP_LED_Toggle().
SPI_HandleTypeDef SpiHandle [static] |
Definition at line 101 of file stm32l0538_discovery.c.
Referenced by SPIx_Error(), SPIx_Init(), SPIx_Read(), and SPIx_Write().
Generated on Mon Aug 28 2017 14:51:54 for STM32L0538-Discovery BSP User Manual by 1.7.6.1