#include <sys/types.h>
#include "common/phal_G4/dma/dma.h"
#include "stm32g474xx.h"
#include "common/phal_G4/usart/usart.h"
Go to the source code of this file.
◆ PHAL_USART_priv_buildDma()
Fill the TX and RX DMA handles from the hardware map.
◆ PHAL_USART_priv_clearIdle()
| void PHAL_USART_priv_clearIdle |
( |
USART_TypeDef * | periph | ) |
|
Clear the IDLE flag alone (write-1-to-clear).
◆ PHAL_USART_priv_configure()
| void PHAL_USART_priv_configure |
( |
PHAL_USART_Idx_t | periph_idx, |
|
|
uint32_t | baud_rate, |
|
|
uint32_t | clock_rate ) |
Enable the clock, program 8N1 + baud, and enable the USART + TX-DMA interrupts.
◆ PHAL_USART_priv_enableIrq()
Enable the USART global interrupt (carries IDLE and TC)
◆ PHAL_USART_priv_finishTx()
| void PHAL_USART_priv_finishTx |
( |
USART_TypeDef * | periph | ) |
|
Acknowledge transmission-complete: disable TCIE and clear ISR.TC.
◆ PHAL_USART_priv_flushRx()
| void PHAL_USART_priv_flushRx |
( |
USART_TypeDef * | periph | ) |
|
Discard anything sitting in RDR and clear IDLE plus every RX error flag.
◆ PHAL_USART_priv_idleActive()
| bool PHAL_USART_priv_idleActive |
( |
const USART_TypeDef * | periph | ) |
|
return true if the IDLE-line flag is set (an RX frame just completed).
◆ PHAL_USART_priv_periph()
Get the peripheral instance for a slot (used by the interrupt handlers)
◆ PHAL_USART_priv_startRx()
| void PHAL_USART_priv_startRx |
( |
USART_TypeDef * | periph | ) |
|
Enable the receiver and its DMA request line (CR1.RE, CR3.DMAR).
◆ PHAL_USART_priv_startTx()
| void PHAL_USART_priv_startTx |
( |
USART_TypeDef * | periph | ) |
|
◆ PHAL_USART_priv_stopRx()
| void PHAL_USART_priv_stopRx |
( |
USART_TypeDef * | periph | ) |
|
Disable the receiver and its DMA request line (CR1.RE, CR3.DMAR).
◆ PHAL_USART_priv_txCompleteActive()
| bool PHAL_USART_priv_txCompleteActive |
( |
USART_TypeDef * | periph | ) |
|