|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Configuration of UART driver interface for hyperterminal communication. More...
Go to the source code of this file.
Functions | |
| UTIL_ADV_TRACE_Status_t | vcom_Init (void(*cb)(void *)) |
| Init the UART and associated DMA. | |
| UTIL_ADV_TRACE_Status_t | vcom_DeInit (void) |
| DeInit the UART and associated DMA. | |
| void | vcom_Trace (uint8_t *p_data, uint16_t size) |
send buffer p_data of size size to vcom in polling mode | |
| UTIL_ADV_TRACE_Status_t | vcom_Trace_DMA (uint8_t *p_data, uint16_t size) |
send buffer p_data of size size to vcom using DMA | |
| UTIL_ADV_TRACE_Status_t | vcom_ReceiveInit (void(*RxCb)(uint8_t *rxChar, uint16_t size, uint8_t error)) |
| init receiver of vcom | |
| void | vcom_Resume (void) |
| Resume the UART and associated DMA (used by LPM). | |
| void | HAL_UART_TxCpltCallback (UART_HandleTypeDef *huart) |
| void | HAL_UART_RxCpltCallback (UART_HandleTypeDef *huart) |
| int | HAL_UART_RxCharMT (UART_HandleTypeDef *huart, uint8_t charRx) |
| called if char is ready from UART | |
| UTIL_ADV_TRACE_Status_t | Uart_Info (const char *strInfo) |
| Write to UART1. | |
| UTIL_ADV_TRACE_Status_t | Uart_NextReceving () |
| continue with next reading if data arrived | |
| UTIL_ADV_TRACE_Status_t | Uart_StartReceving (UART_HandleTypeDef *uart) |
| start reading | |
Variables | |
| DMA_HandleTypeDef | hdma_usart1_tx |
| DMA handle. | |
| UART_HandleTypeDef | huart1 |
| UART handle. | |
| uint8_t | charRx |
| buffer to receive 1 character | |
| char | uart_req_buf [100] |
| char * | uart_req_w_ptr |
| static UART_HandleTypeDef * | _curUart = NULL |
| const UTIL_ADV_TRACE_Driver_s | UTIL_TraceDriver |
| Trace driver callbacks handler. | |
| static void(* | TxCpltCallback )(void *) |
| TX complete callback. | |
| static void(* | RxCpltCallback )(uint8_t *rxChar, uint16_t size, uint8_t error) |
| RX complete callback. | |
Configuration of UART driver interface for hyperterminal communication.
Copyright (c) 2026 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file usart_if.c.
| int HAL_UART_RxCharMT | ( | UART_HandleTypeDef * | huart, |
| uint8_t | charRx ) |
called if char is ready from UART
| -1 | - other UART, 0 - char is accepted, next receiving must start, 1 - data ready |
Definition at line 279 of file usart_if.c.
References _curUart, CFG_SEQ_Prio_0, CFG_SEQ_Task_Uart_RX, charRx, uart_req_buf, and uart_req_w_ptr.
Referenced by HAL_UART_RxCpltCallback().
| void HAL_UART_RxCpltCallback | ( | UART_HandleTypeDef * | huart | ) |
Definition at line 255 of file usart_if.c.
References charRx, HAL_UART_RxCharMT(), and RxCpltCallback.
| void HAL_UART_TxCpltCallback | ( | UART_HandleTypeDef * | huart | ) |
Definition at line 240 of file usart_if.c.
References TxCpltCallback.
Referenced by vcom_Trace_DMA().
| UTIL_ADV_TRACE_Status_t Uart_Info | ( | const char * | strInfo | ) |
Write to UART1.
Definition at line 299 of file usart_if.c.
References vcom_Trace().
Referenced by writeLogNL().
| UTIL_ADV_TRACE_Status_t Uart_NextReceving | ( | ) |
continue with next reading if data arrived
Definition at line 306 of file usart_if.c.
References uart_req_buf, and uart_req_w_ptr.
Referenced by Uart_RxProcessing(), and Uart_StartReceving().
| UTIL_ADV_TRACE_Status_t Uart_StartReceving | ( | UART_HandleTypeDef * | uart | ) |
start reading
| uart | - handle for the uart being used |
Definition at line 313 of file usart_if.c.
References _curUart, Uart_NextReceving(), and vcom_ReceiveInit().
Referenced by uart_Start().
| UTIL_ADV_TRACE_Status_t vcom_DeInit | ( | void | ) |
DeInit the UART and associated DMA.
Definition at line 120 of file usart_if.c.
References HAL_UART_MspDeInit(), and huart1.
| UTIL_ADV_TRACE_Status_t vcom_Init | ( | void(* | cb )(void *) | ) |
Init the UART and associated DMA.
| cb | TxCpltCallback |
Definition at line 105 of file usart_if.c.
References MX_DMA_Init(), MX_USART1_UART_Init(), and TxCpltCallback.
| UTIL_ADV_TRACE_Status_t vcom_ReceiveInit | ( | void(* | RxCb )(uint8_t *rxChar, uint16_t size, uint8_t error) | ) |
init receiver of vcom
| RxCb | callback when Rx char is received |
Definition at line 177 of file usart_if.c.
References charRx, huart1, and RxCpltCallback.
Referenced by Uart_StartReceving().
| void vcom_Resume | ( | void | ) |
Resume the UART and associated DMA (used by LPM).
Definition at line 217 of file usart_if.c.
References Error_Handler(), hdma_usart1_tx, and huart1.
Referenced by PWR_ExitStopMode().
| void vcom_Trace | ( | uint8_t * | p_data, |
| uint16_t | size ) |
send buffer p_data of size size to vcom in polling mode
| p_data | data to be sent |
| size | of buffer p_data to be sent |
Definition at line 145 of file usart_if.c.
References huart1.
Referenced by Uart_Info().
| UTIL_ADV_TRACE_Status_t vcom_Trace_DMA | ( | uint8_t * | p_data, |
| uint16_t | size ) |
send buffer p_data of size size to vcom using DMA
| p_data | data to be sent |
| size | of buffer p_data to be sent |
Definition at line 158 of file usart_if.c.
References HAL_UART_TxCpltCallback(), and huart1.
|
static |
Definition at line 48 of file usart_if.c.
Referenced by HAL_UART_RxCharMT(), and Uart_StartReceving().
| uint8_t charRx |
buffer to receive 1 character
Definition at line 42 of file usart_if.c.
Referenced by HAL_UART_RxCharMT(), HAL_UART_RxCpltCallback(), vcom_DMA_TX_IRQHandler(), and vcom_ReceiveInit().
|
static |
RX complete callback.
| rxChar | ptr of chars buffer sent by user |
| size | buffer size |
| error | errorcode |
Definition at line 91 of file usart_if.c.
Referenced by HAL_UART_RxCpltCallback(), and vcom_ReceiveInit().
|
static |
TX complete callback.
Definition at line 83 of file usart_if.c.
Referenced by HAL_UART_TxCpltCallback(), and vcom_Init().
| char uart_req_buf[100] |
Definition at line 46 of file usart_if.c.
Referenced by HAL_UART_RxCharMT(), and Uart_NextReceving().
| char* uart_req_w_ptr |
Definition at line 47 of file usart_if.c.
Referenced by HAL_UART_RxCharMT(), and Uart_NextReceving().
| const UTIL_ADV_TRACE_Driver_s UTIL_TraceDriver |
Trace driver callbacks handler.
Definition at line 56 of file usart_if.c.