|
PER Firmware
|
#include "common/phal_G4/usart/usart_priv.h"Functions | |
| static uint32_t | enterCritical (void) |
| static void | exitCritical (uint32_t previous_interrupt_mask) |
| USART_TypeDef * | PHAL_USART_priv_periph (PHAL_USART_Idx_t periph_idx) |
| Get the peripheral instance for a slot (used by the interrupt handlers) | |
| 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. | |
| void | PHAL_USART_priv_buildDma (PHAL_USART_Idx_t periph_idx, PHAL_DMA_Handle_t *tx_dma, PHAL_DMA_Handle_t *rx_dma) |
| Fill the TX and RX DMA handles from the hardware map. | |
| void | PHAL_USART_priv_startTx (USART_TypeDef *periph) |
| void | PHAL_USART_priv_finishTx (USART_TypeDef *periph) |
| Acknowledge transmission-complete: disable TCIE and clear ISR.TC. | |
| bool | PHAL_USART_priv_txCompleteActive (USART_TypeDef *periph) |
| void | PHAL_USART_priv_startRx (USART_TypeDef *periph) |
| Enable the receiver and its DMA request line (CR1.RE, CR3.DMAR). | |
| void | PHAL_USART_priv_stopRx (USART_TypeDef *periph) |
| Disable the receiver and its DMA request line (CR1.RE, CR3.DMAR). | |
| void | PHAL_USART_priv_flushRx (USART_TypeDef *periph) |
| Discard anything sitting in RDR and clear IDLE plus every RX error flag. | |
| bool | PHAL_USART_priv_idleActive (const USART_TypeDef *periph) |
| return true if the IDLE-line flag is set (an RX frame just completed). | |
| void | PHAL_USART_priv_clearIdle (USART_TypeDef *periph) |
| Clear the IDLE flag alone (write-1-to-clear). | |
| void | PHAL_USART_priv_enableIrq (PHAL_USART_Idx_t periph_idx) |
| Enable the USART global interrupt (carries IDLE and TC) | |
Variables | |
| static const PHAL_USART_HwMap_t | USART_MAP [NUM_USART] |
| static constexpr uint32_t | USART_PRIV_RX_FLAG_CLEAR_MSK |
|
inlinestatic |
|
inlinestatic |
| void PHAL_USART_priv_buildDma | ( | PHAL_USART_Idx_t | periph_idx, |
| PHAL_DMA_Handle_t * | tx_dma, | ||
| PHAL_DMA_Handle_t * | rx_dma ) |
Fill the TX and RX DMA handles from the hardware map.
| void PHAL_USART_priv_clearIdle | ( | USART_TypeDef * | periph | ) |
Clear the IDLE flag alone (write-1-to-clear).
| 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.
| void PHAL_USART_priv_enableIrq | ( | PHAL_USART_Idx_t | periph_idx | ) |
Enable the USART global interrupt (carries IDLE and TC)
| void PHAL_USART_priv_finishTx | ( | USART_TypeDef * | periph | ) |
Acknowledge transmission-complete: disable TCIE and clear ISR.TC.
| void PHAL_USART_priv_flushRx | ( | USART_TypeDef * | periph | ) |
Discard anything sitting in RDR and clear IDLE plus every RX error flag.
| bool PHAL_USART_priv_idleActive | ( | const USART_TypeDef * | periph | ) |
return true if the IDLE-line flag is set (an RX frame just completed).
| USART_TypeDef * PHAL_USART_priv_periph | ( | PHAL_USART_Idx_t | periph_idx | ) |
Get the peripheral instance for a slot (used by the interrupt handlers)
| void PHAL_USART_priv_startRx | ( | USART_TypeDef * | periph | ) |
Enable the receiver and its DMA request line (CR1.RE, CR3.DMAR).
| void PHAL_USART_priv_startTx | ( | USART_TypeDef * | periph | ) |
| void PHAL_USART_priv_stopRx | ( | USART_TypeDef * | periph | ) |
Disable the receiver and its DMA request line (CR1.RE, CR3.DMAR).
| bool PHAL_USART_priv_txCompleteActive | ( | USART_TypeDef * | periph | ) |
|
static |
|
staticconstexpr |