Contains the BSP driver for the DISCO_F413ZH board.
Dependents: DISCO_F413ZH-LCD-demo DISCO_F413ZH-touch-screen-demo DISCO_F413ZH-SD-demo DISCO_F413ZH-PSRAM-demo ... more
STM32F413H Discovery Low Level Private Functions
[STM32F413H-DISCOVERY LOW LEVEL]
Functions | |
uint32_t | BSP_GetVersion (void) |
This method returns the STM32F413H DISCOVERY 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 | FMPI2Cx_MspInit (FMPI2C_HandleTypeDef *fmpi2c_handler) |
Initializes FMPI2C MSP. | |
static void | FMPI2Cx_Init (FMPI2C_HandleTypeDef *fmpi2c_handler) |
Initializes FMPI2C HAL. | |
static HAL_StatusTypeDef | FMPI2Cx_ReadMultiple (FMPI2C_HandleTypeDef *fmpi2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length) |
Reads multiple data. | |
static HAL_StatusTypeDef | FMPI2Cx_WriteMultiple (FMPI2C_HandleTypeDef *fmpi2c_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 void | FMPI2Cx_Error (FMPI2C_HandleTypeDef *fmpi2c_handler, uint8_t Addr) |
Manages error callback by re-initializing I2C. | |
static void | FMPI2Cx_DeInit (FMPI2C_HandleTypeDef *fmpi2c_handler) |
Deinitializes FMPI2C interface. | |
static void | FMC_BANK3_WriteData (uint16_t Data) |
Writes register value. | |
static void | FMC_BANK3_WriteReg (uint8_t Reg) |
Writes register address. | |
static uint16_t | FMC_BANK3_ReadData (void) |
Reads register value. | |
void | LCD_IO_WriteData (uint16_t RegValue) |
Writes data on LCD data register. | |
void | LCD_IO_WriteMultipleData (uint16_t *pData, uint32_t Size) |
Writes several data on LCD data register. | |
void | LCD_IO_WriteReg (uint8_t Reg) |
Writes register on LCD register. | |
uint16_t | LCD_IO_ReadData (void) |
Reads data from LCD data register. | |
void | LCD_IO_Delay (uint32_t Delay) |
LCD delay. | |
void | AUDIO_IO_Write (uint8_t Addr, uint16_t Reg, uint16_t Value) |
Writes a single data. | |
uint8_t | AUDIO_IO_Read (uint8_t Addr, uint16_t Reg) |
Reads a single data. | |
uint16_t | TS_IO_ReadMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length) |
Reads multiple data with I2C communication channel from TouchScreen. | |
void | TS_IO_WriteMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length) |
Writes multiple data with I2C communication channel from MCU to TouchScreen. | |
void | AUDIO_IO_Delay (uint32_t Delay) |
AUDIO Codec delay. | |
uint8_t | TS_IO_Read (uint8_t Addr, uint8_t Reg) |
Reads a single data. | |
void | TS_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value) |
Writes a single data. | |
void | TS_IO_Delay (uint32_t Delay) |
Delay function used in TouchScreen low level driver. |
Function Documentation
void AUDIO_IO_Delay | ( | uint32_t | Delay ) |
AUDIO Codec delay.
- Parameters:
-
Delay,: Delay in ms
Definition at line 836 of file stm32f413h_discovery.c.
uint16_t AUDIO_IO_Read | ( | uint8_t | Addr, |
uint16_t | Reg | ||
) |
Reads a single data.
- Parameters:
-
Addr,: I2C address Reg,: Reg address
- Return values:
-
Data to be read
Definition at line 790 of file stm32f413h_discovery.c.
void AUDIO_IO_Write | ( | uint8_t | Addr, |
uint16_t | Reg, | ||
uint16_t | Value | ||
) |
Writes a single data.
- Parameters:
-
Addr,: I2C address Reg,: Reg address Value,: Data to be written
Definition at line 773 of file stm32f413h_discovery.c.
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 380 of file stm32f413h_discovery.c.
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 342 of file stm32f413h_discovery.c.
uint32_t BSP_GetVersion | ( | void | ) |
This method returns the STM32F413H DISCOVERY BSP Driver revision.
- Return values:
-
version,: 0xXYZR (8bits for each decimal, R for RC)
Definition at line 179 of file stm32f413h_discovery.c.
void BSP_LED_DeInit | ( | Led_TypeDef | Led ) |
DeInit LEDs.
- Parameters:
-
Led,: LED to be configured. This parameter can be one of the following values: - LED3
- LED4
Definition at line 212 of file stm32f413h_discovery.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: - LED3
- LED4
Definition at line 191 of file stm32f413h_discovery.c.
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: - LED3
- LED4
Definition at line 243 of file stm32f413h_discovery.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: - LED3
- LED4
Definition at line 231 of file stm32f413h_discovery.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: - LED3
- LED4
Definition at line 255 of file stm32f413h_discovery.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 312 of file stm32f413h_discovery.c.
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 329 of file stm32f413h_discovery.c.
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 271 of file stm32f413h_discovery.c.
static uint16_t FMC_BANK3_ReadData | ( | void | ) | [static] |
Reads register value.
- Return values:
-
Read value
Definition at line 678 of file stm32f413h_discovery.c.
static void FMC_BANK3_WriteData | ( | uint16_t | Data ) | [static] |
Writes register value.
- Parameters:
-
Data,: Data to be written
Definition at line 656 of file stm32f413h_discovery.c.
static void FMC_BANK3_WriteReg | ( | uint8_t | Reg ) | [static] |
Writes register address.
- Parameters:
-
Reg,: Register to be written
Definition at line 667 of file stm32f413h_discovery.c.
static void FMPI2Cx_DeInit | ( | FMPI2C_HandleTypeDef * | fmpi2c_handler ) | [static] |
Deinitializes FMPI2C interface.
- Parameters:
-
fmpi2c_handler : FMPI2C handler
Definition at line 551 of file stm32f413h_discovery.c.
static void FMPI2Cx_Error | ( | FMPI2C_HandleTypeDef * | fmpi2c_handler, |
uint8_t | Addr | ||
) | [static] |
Manages error callback by re-initializing I2C.
- Parameters:
-
fmpi2c_handler : FMPI2C handler Addr,: I2C Address
- Return values:
-
None
Definition at line 538 of file stm32f413h_discovery.c.
static void FMPI2Cx_Init | ( | FMPI2C_HandleTypeDef * | fmpi2c_handler ) | [static] |
Initializes FMPI2C HAL.
- Parameters:
-
fmpi2c_handler : FMPI2C handler
Definition at line 452 of file stm32f413h_discovery.c.
static void FMPI2Cx_MspInit | ( | FMPI2C_HandleTypeDef * | fmpi2c_handler ) | [static] |
Initializes FMPI2C MSP.
- Parameters:
-
fmpi2c_handler : FMPI2C handler
Definition at line 406 of file stm32f413h_discovery.c.
static HAL_StatusTypeDef FMPI2Cx_ReadMultiple | ( | FMPI2C_HandleTypeDef * | fmpi2c_handler, |
uint8_t | Addr, | ||
uint16_t | Reg, | ||
uint16_t | MemAddress, | ||
uint8_t * | Buffer, | ||
uint16_t | Length | ||
) | [static] |
Reads multiple data.
- Parameters:
-
fmpi2c_handler : FMPI2C handler Addr,: I2C address Reg,: Reg address MemAddress,: Memory address Buffer,: Pointer to data buffer Length,: Length of the data
- Return values:
-
Number of read data
Definition at line 482 of file stm32f413h_discovery.c.
static HAL_StatusTypeDef FMPI2Cx_WriteMultiple | ( | FMPI2C_HandleTypeDef * | fmpi2c_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:
-
fmpi2c_handler : FMPI2C 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 512 of file stm32f413h_discovery.c.
void LCD_IO_Delay | ( | uint32_t | Delay ) |
uint16_t LCD_IO_ReadData | ( | void | ) |
Reads data from LCD data register.
- Return values:
-
Read data.
Definition at line 735 of file stm32f413h_discovery.c.
void LCD_IO_WriteData | ( | uint16_t | RegValue ) |
Writes data on LCD data register.
- Parameters:
-
RegValue,: Data to be written
Definition at line 700 of file stm32f413h_discovery.c.
void LCD_IO_WriteMultipleData | ( | uint16_t * | pData, |
uint32_t | Size | ||
) |
Writes several data on LCD data register.
- Parameters:
-
pData,: pointer on data to be written Size,: data amount in 16bits short unit
Definition at line 711 of file stm32f413h_discovery.c.
void LCD_IO_WriteReg | ( | uint8_t | Reg ) |
Writes register on LCD register.
- Parameters:
-
Reg,: Register to be written
Definition at line 725 of file stm32f413h_discovery.c.
void TS_IO_Delay | ( | uint32_t | Delay ) |
Delay function used in TouchScreen low level driver.
- Parameters:
-
Delay,: Delay in ms
Definition at line 900 of file stm32f413h_discovery.c.
uint8_t TS_IO_Read | ( | uint8_t | Addr, |
uint8_t | Reg | ||
) |
Reads a single data.
- Parameters:
-
Addr,: I2C address Reg,: Register address
- Return values:
-
Data to be read
Definition at line 876 of file stm32f413h_discovery.c.
uint16_t TS_IO_ReadMultiple | ( | uint8_t | Addr, |
uint8_t | Reg, | ||
uint8_t * | Buffer, | ||
uint16_t | Length | ||
) |
Reads multiple data with I2C communication channel from TouchScreen.
- Parameters:
-
Addr,: I2C address Reg,: Register address Buffer,: Pointer to data buffer Length,: Length of the data
- Return values:
-
Number of read data
Definition at line 814 of file stm32f413h_discovery.c.
void TS_IO_Write | ( | uint8_t | Addr, |
uint8_t | Reg, | ||
uint8_t | Value | ||
) |
Writes a single data.
- Parameters:
-
Addr,: I2C address Reg,: Reg address Value,: Data to be written
Definition at line 891 of file stm32f413h_discovery.c.
void TS_IO_WriteMultiple | ( | uint8_t | Addr, |
uint8_t | Reg, | ||
uint8_t * | Buffer, | ||
uint16_t | Length | ||
) |
Writes multiple data with I2C communication channel from MCU to TouchScreen.
- Parameters:
-
Addr,: I2C address Reg,: Register address Buffer,: Pointer to data buffer Length,: Length of the data
Definition at line 827 of file stm32f413h_discovery.c.
Generated on Tue Jul 12 2022 13:54:38 by 1.7.2