GPS Device
Loading...
Searching...
No Matches
SPI Internal Helpers

Functions

static void spi_set_pclk (SPI_REGDEF_ts const *instance, EN_STATUS_te en_status)
 Enables or disables the peripheral clock for an SPI instance.

Detailed Description

Function Documentation

◆ spi_set_pclk()

void spi_set_pclk ( SPI_REGDEF_ts const * instance,
EN_STATUS_te en_status )
static

Enables or disables the peripheral clock for an SPI instance.

Routes to the appropriate RCC APB1 or APB2 clock enable/disable call:

  • SPI1, SPI4 are on APB2.
  • SPI2, SPI3 are on APB1.

Called by spi_init and spi_deinit.

Parameters
[in]instancePointer to the SPI peripheral instance.
[in]en_statusENABLE to enable the clock, DISABLE to disable it.

Definition at line 181 of file stm32f401re_spi.c.

181 {
182 if(instance == SPI1) {
184 }
185 else if(instance == SPI2) {
187 }
188 else if(instance == SPI3) {
190 }
191 else if(instance == SPI4) {
193 }
194}
void rcc_set_pclk_apb2(RCC_APB2ENR_te periph_position, EN_STATUS_te en_status)
Enables or disables the peripheral clock for an APB2 peripheral.
void rcc_set_pclk_apb1(RCC_APB1ENR_te periph_position, EN_STATUS_te en_status)
Enables or disables the peripheral clock for an APB1 peripheral.
#define SPI4
#define SPI3
#define SPI1
#define SPI2
@ RCC_APB2ENR_SPI1EN
@ RCC_APB2ENR_SPI4EN
@ RCC_APB1ENR_SPI3EN
@ RCC_APB1ENR_SPI2EN
Here is the call graph for this function:
Here is the caller graph for this function: