TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

Initialization and de-initialization functions

Initialization and de-initialization functions
[SPI Exported Functions]

Functions

ErrorStatus LL_SPI_DeInit (SPI_TypeDef *SPIx)
 De-initialize the SPI registers to their default reset values.
ErrorStatus LL_SPI_Init (SPI_TypeDef *SPIx, LL_SPI_InitTypeDef *SPI_InitStruct)
 Initialize the SPI registers according to the specified parameters in SPI_InitStruct.
void LL_SPI_StructInit (LL_SPI_InitTypeDef *SPI_InitStruct)
 Set each LL_SPI_InitTypeDef field to default value.

Function Documentation

ErrorStatus LL_SPI_DeInit ( SPI_TypeDef *  SPIx )

De-initialize the SPI registers to their default reset values.

Parameters:
SPIxSPI Instance
Return values:
AnErrorStatus enumeration value:

  • SUCCESS: SPI registers are de-initialized
  • ERROR: SPI registers are not de-initialized

Definition at line 151 of file stm32l4xx_ll_spi.c.

ErrorStatus LL_SPI_Init ( SPI_TypeDef *  SPIx,
LL_SPI_InitTypeDef SPI_InitStruct 
)

Initialize the SPI registers according to the specified parameters in SPI_InitStruct.

Note:
As some bits in SPI configuration registers can only be written when the SPI is disabled (SPI_CR1_SPE bit =0), SPI IP should be in disabled state prior calling this function. Otherwise, ERROR result will be returned.
Parameters:
SPIxSPI Instance
SPI_InitStructpointer to a LL_SPI_InitTypeDef structure
Return values:
AnErrorStatus enumeration value. (Return always SUCCESS)

Definition at line 206 of file stm32l4xx_ll_spi.c.

void LL_SPI_StructInit ( LL_SPI_InitTypeDef SPI_InitStruct )

Set each LL_SPI_InitTypeDef field to default value.

Parameters:
SPI_InitStructpointer to a LL_SPI_InitTypeDef structure whose fields will be set to default values.
Return values:
None

Definition at line 274 of file stm32l4xx_ll_spi.c.