WebRadioApp  0.1
ew_bsp_console.c File Reference

This file is part of the interface (glue layer) between an Embedded Wizard generated UI application and the board support package (BSP) of a dedicated target. Please note: The implementation of this module is partially based on examples that are provided within the STM32 cube firmware. In case you want to adapt this module to your custom specific hardware, please adapt the hardware initialization code according your needs or integrate the generated initialization code created by using the tool CubeMX. This template is responsible to establish a console connection in order to send debug messages to a PC terminal tool, or to receive key events for the UI application. More...

#include "ewconfig.h"
#include "stm32h7xx_hal.h"
#include "stm32h747i_discovery.h"
#include "ew_bsp_console.h"
Include dependency graph for ew_bsp_console.c:

Macros

#define UART_PORTID   USART1
 
#define USARTx_CLK_ENABLE()   __HAL_RCC_USART1_CLK_ENABLE();
 
#define USARTx_RX_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOA_CLK_ENABLE()
 
#define USARTx_TX_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOA_CLK_ENABLE()
 
#define RCC_PERIPHCLK_USARTx   RCC_PERIPHCLK_USART1
 
#define RCC_USARTxCLKSOURCE_HSI   RCC_USART1CLKSOURCE_HSI
 
#define USARTx_FORCE_RESET()   __HAL_RCC_USART1_FORCE_RESET()
 
#define USARTx_RELEASE_RESET()   __HAL_RCC_USART1_RELEASE_RESET()
 
#define USARTx_TX_PIN   GPIO_PIN_9
 
#define USARTx_TX_GPIO_PORT   GPIOA
 
#define USARTx_TX_AF   GPIO_AF7_USART1
 
#define USARTx_RX_PIN   GPIO_PIN_10
 
#define USARTx_RX_GPIO_PORT   GPIOA
 
#define USARTx_RX_AF   GPIO_AF7_USART1
 

Functions

void HAL_UART_MspInit (UART_HandleTypeDef *huart)
 UART MSP Initialization - This function configures the hardware resources. More...
 
void HAL_UART_MspDeInit (UART_HandleTypeDef *huart)
 UART MSP Deinitialization - This function configures the hardware resources. More...
 
void EwBspConsoleInit (void)
 The function EwBspConsoleInit initializes a console connection via UART/USART interface used to print error and trace messages from an Embedded Wizard GUI application. This implementation uses the following configuration: More...
 
void EwBspConsoleDone (void)
 The function EwBspConsoleDone terminates a console connection. More...
 
void EwBspConsolePutCharacter (unsigned char aCharacter)
 The function EwBspConsolePutCharacter sends the given character to the console interface. More...
 
unsigned char EwBspConsoleGetCharacter (void)
 The function EwBspConsoleGetCharacter returns the current character from the console interface. If no character is available within the input buffer, 0 is returned. More...
 

Variables

UART_HandleTypeDef UART_Handle
 

Detailed Description

This file is part of the interface (glue layer) between an Embedded Wizard generated UI application and the board support package (BSP) of a dedicated target. Please note: The implementation of this module is partially based on examples that are provided within the STM32 cube firmware. In case you want to adapt this module to your custom specific hardware, please adapt the hardware initialization code according your needs or integrate the generated initialization code created by using the tool CubeMX. This template is responsible to establish a console connection in order to send debug messages to a PC terminal tool, or to receive key events for the UI application.

Author
Kevin Bello (k.bel.nosp@m.lo@t.nosp@m.um.de)
Version
0.1
Date
2021-04-17