SUCCESS: SPI registers are de-initialized
ERROR: SPI registers are not de-initialized
LL_I2S_Init
ErrorStatus LL_I2S_Init (SPI_TypeDef * SPIx,
LL_I2S_InitTypeDef * I2S_InitStruct)
Initializes the SPI/I2S registers according to the specified
parameters in I2S_InitStruct.
SPIx: SPI Instance
I2S_InitStruct: pointer to a LL_I2S_InitTypeDef structure
An: ErrorStatus enumeration value:
SUCCESS: SPI registers are Initialized
ERROR: SPI registers are not Initialized
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.
LL_I2S_StructInit
void LL_I2S_StructInit (LL_I2S_InitTypeDef * I2S_InitStruct)
Set each LL_I2S_InitTypeDef field to default value.
I2S_InitStruct: pointer to a LL_I2S_InitTypeDef structure
whose fields will be set to default values.
LL_I2S_ConfigPrescaler
void LL_I2S_ConfigPrescaler (SPI_TypeDef * SPIx, uint32_t
PrescalerLinear, uint32_t PrescalerParity)
Set linear and parity prescaler.
SPIx: SPI Instance
PrescalerLinear: value: Min_Data=0x02 and
Max_Data=0xFF.
PrescalerParity: This parameter can be one of the following
values:
LL_I2S_PRESCALER_PARITY_EVEN
LL_I2S_PRESCALER_PARITY_ODD
To calculate value of PrescalerLinear(I2SDIV[7:0] bits) and
PrescalerParity(ODD bit) Check Audio frequency table and
formulas inside Reference Manual (SPI/I2S).