|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Header for USART interface configuration. More...
Go to the source code of this file.
Macros | |
| #define | __USART_IF_H__ |
Functions | |
| UTIL_ADV_TRACE_Status_t | vcom_Init (void(*cb)(void *)) |
| Init the UART and associated DMA. | |
| UTIL_ADV_TRACE_Status_t | vcom_ReceiveInit (void(*RxCb)(uint8_t *rxChar, uint16_t size, uint8_t error)) |
| init receiver of vcom | |
| 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 | |
| void | vcom_IRQHandler (void) |
| last byte has been sent on the uart line | |
| void | vcom_DMA_TX_IRQHandler (void) |
| last byte has been sent from memory to uart data register | |
| void | vcom_Resume (void) |
| Resume the UART and associated DMA (used by LPM). | |
| UTIL_ADV_TRACE_Status_t | Uart_Info (const char *strInfo) |
| Write to UART1. | |
| UTIL_ADV_TRACE_Status_t | Uart_StartReceving (UART_HandleTypeDef *uart) |
| start reading | |
| UTIL_ADV_TRACE_Status_t | Uart_NextReceving () |
| continue with next reading if data arrived | |
| int | HAL_UART_RxCharMT (UART_HandleTypeDef *huart, uint8_t charRx) |
| called if char is ready from UART | |
Variables | |
| volatile uint8_t | uart_data_ready |
| char | uart_req_buf [] |
Header for USART interface configuration.
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.h.
| #define __USART_IF_H__ |
Definition at line 27 of file usart_if.h.
| 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().
| 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.
| void vcom_DMA_TX_IRQHandler | ( | void | ) |
last byte has been sent from memory to uart data register
References charRx.
| 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.
| void vcom_IRQHandler | ( | void | ) |
last byte has been sent on the uart line
| 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.
|
extern |
|
extern |
Definition at line 46 of file usart_if.c.
Referenced by HAL_UART_RxCharMT(), and Uart_NextReceving().