PER Firmware
Loading...
Searching...
No Matches
spi_priv.h File Reference

Internal G4 SPI helpers and DMA configuration macros. More...

Include dependency graph for spi_priv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void PHAL_SPI_priv_enableClock (const SPI_TypeDef *periph)
 Enable the peripheral clock for an SPI instance.
 
void PHAL_SPI_priv_configCR1 (SPI_InitConfig_t *cfg, uint32_t f_div)
 Configure the SPI CR1 register.
 
uint32_t PHAL_SPI_priv_calcBaudRatePrescaler (uint32_t data_rate, const SPI_TypeDef *periph)
 Calculate the SPI baud-rate prescaler.
 
void PHAL_SPI_priv_configCR2 (SPI_InitConfig_t *cfg)
 Configure the SPI CR2 register.
 
void PHAL_SPI_priv_enableDMA_TX (SPI_InitConfig_t *cfg)
 Enable SPI transmit DMA requests.
 
void PHAL_SPI_priv_enableDMA_RX (SPI_InitConfig_t *cfg)
 Enable SPI receive DMA requests.
 
void PHAL_SPI_priv_handleTxComplete (SPI_InitConfig_t *transfer)
 Handle DMA transmit-complete interrupts.
 
void PHAL_SPI_priv_resetTransferState (SPI_InitConfig_t *cfg)
 Reset the internal SPI transfer state.
 
void PHAL_SPI_priv_Enable (SPI_InitConfig_t *spi)
 Enable the SPI peripheral.
 
void PHAL_SPI_priv_Disable (SPI_InitConfig_t *spi)
 Disable the SPI peripheral.
 

Detailed Description

Internal G4 SPI helpers and DMA configuration macros.

Author
Shriya Balu (balu@.nosp@m.purd.nosp@m.ue.ed.nosp@m.u)
Ronak Jain (jain7.nosp@m.17@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ PHAL_SPI_priv_calcBaudRatePrescaler()

uint32_t PHAL_SPI_priv_calcBaudRatePrescaler ( uint32_t data_rate,
const SPI_TypeDef * periph )

Calculate the SPI baud-rate prescaler.

See RM0440 42.9.1 SPI control register 1 (SPIx_CR1)

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

◆ PHAL_SPI_priv_configCR1()

void PHAL_SPI_priv_configCR1 ( SPI_InitConfig_t * cfg,
uint32_t f_div )

Configure the SPI CR1 register.

Here is the caller graph for this function:

◆ PHAL_SPI_priv_configCR2()

void PHAL_SPI_priv_configCR2 ( SPI_InitConfig_t * cfg)

Configure the SPI CR2 register.

Here is the caller graph for this function:

◆ PHAL_SPI_priv_Disable()

void PHAL_SPI_priv_Disable ( SPI_InitConfig_t * spi)

Disable the SPI peripheral.

◆ PHAL_SPI_priv_Enable()

void PHAL_SPI_priv_Enable ( SPI_InitConfig_t * spi)

Enable the SPI peripheral.

Here is the caller graph for this function:

◆ PHAL_SPI_priv_enableClock()

void PHAL_SPI_priv_enableClock ( const SPI_TypeDef * periph)

Enable the peripheral clock for an SPI instance.

Here is the caller graph for this function:

◆ PHAL_SPI_priv_enableDMA_RX()

void PHAL_SPI_priv_enableDMA_RX ( SPI_InitConfig_t * cfg)

Enable SPI receive DMA requests.

Here is the caller graph for this function:

◆ PHAL_SPI_priv_enableDMA_TX()

void PHAL_SPI_priv_enableDMA_TX ( SPI_InitConfig_t * cfg)

Enable SPI transmit DMA requests.

Here is the caller graph for this function:

◆ PHAL_SPI_priv_handleTxComplete()

void PHAL_SPI_priv_handleTxComplete ( SPI_InitConfig_t * transfer)

Handle DMA transmit-complete interrupts.

Here is the call graph for this function:

◆ PHAL_SPI_priv_resetTransferState()

void PHAL_SPI_priv_resetTransferState ( SPI_InitConfig_t * cfg)

Reset the internal SPI transfer state.

Here is the caller graph for this function: