PER Firmware
Loading...
Searching...
No Matches
usart_priv.h File Reference
#include <sys/types.h>
#include "common/phal_G4/dma/dma.h"
#include "stm32g474xx.h"
#include "common/phal_G4/usart/usart.h"
Include dependency graph for usart_priv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PHAL_USART_HwMap_t
 

Functions

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)
 

Function Documentation

◆ PHAL_USART_priv_buildDma()

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.

Here is the caller graph for this function:

◆ PHAL_USART_priv_clearIdle()

void PHAL_USART_priv_clearIdle ( USART_TypeDef * periph)

Clear the IDLE flag alone (write-1-to-clear).

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ PHAL_USART_priv_enableIrq()

void PHAL_USART_priv_enableIrq ( PHAL_USART_Idx_t periph_idx)

Enable the USART global interrupt (carries IDLE and TC)

Here is the caller graph for this function:

◆ PHAL_USART_priv_finishTx()

void PHAL_USART_priv_finishTx ( USART_TypeDef * periph)

Acknowledge transmission-complete: disable TCIE and clear ISR.TC.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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).

Here is the caller graph for this function:

◆ PHAL_USART_priv_periph()

USART_TypeDef * PHAL_USART_priv_periph ( PHAL_USART_Idx_t periph_idx)

Get the peripheral instance for a slot (used by the interrupt handlers)

Here is the caller graph for this function:

◆ PHAL_USART_priv_startRx()

void PHAL_USART_priv_startRx ( USART_TypeDef * periph)

Enable the receiver and its DMA request line (CR1.RE, CR3.DMAR).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PHAL_USART_priv_startTx()

void PHAL_USART_priv_startTx ( USART_TypeDef * periph)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PHAL_USART_priv_stopRx()

void PHAL_USART_priv_stopRx ( USART_TypeDef * periph)

Disable the receiver and its DMA request line (CR1.RE, CR3.DMAR).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PHAL_USART_priv_txCompleteActive()

bool PHAL_USART_priv_txCompleteActive ( USART_TypeDef * periph)
Here is the caller graph for this function: