|
PER Firmware
|
Internal G4 SPI helpers and DMA configuration macros. More...
#include "common/phal_G4/dma/dma.h"#include "common/phal_G4/spi/spi.h"#include "common/phal_G4/gpio/gpio.h"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. | |
Internal G4 SPI helpers and DMA configuration macros.
| 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)
| void PHAL_SPI_priv_configCR1 | ( | SPI_InitConfig_t * | cfg, |
| uint32_t | f_div ) |
Configure the SPI CR1 register.
| void PHAL_SPI_priv_configCR2 | ( | SPI_InitConfig_t * | cfg | ) |
Configure the SPI CR2 register.
| void PHAL_SPI_priv_Disable | ( | SPI_InitConfig_t * | spi | ) |
Disable the SPI peripheral.
| void PHAL_SPI_priv_Enable | ( | SPI_InitConfig_t * | spi | ) |
Enable the SPI peripheral.
| void PHAL_SPI_priv_enableClock | ( | const SPI_TypeDef * | periph | ) |
Enable the peripheral clock for an SPI instance.
| void PHAL_SPI_priv_enableDMA_RX | ( | SPI_InitConfig_t * | cfg | ) |
Enable SPI receive DMA requests.
| void PHAL_SPI_priv_enableDMA_TX | ( | SPI_InitConfig_t * | cfg | ) |
Enable SPI transmit 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.