MG32L003 Standard Peripherals Firmware Library
|
Functions | |
void | SPI_DeInit (SPI_TypeDef *SPIx) |
Deinitializes the SPIx peripheral registers to their default reset values. More... | |
void | SPI_Init (SPI_TypeDef *SPIx, SPI_InitTypeDef *SPI_InitStruct) |
Initializes the SPIx peripheral according to the specified parameters in the SPI_InitStruct. More... | |
void | SPI_Cmd (SPI_TypeDef *SPIx, FunctionalState NewState) |
Enables or disables the specified SPI peripheral. More... | |
void | SPI_NSSConfig (SPI_TypeDef *SPIx, FunctionalState NewState) |
Enables or disables the specified slave select line. More... | |
uint8_t | SPI_ReadData (SPI_TypeDef *SPIx) |
Read one data from DATA register. More... | |
void | SPI_WriteData (SPI_TypeDef *SPIx, uint8_t Data) |
Write one data to DATA register. More... | |
FlagStatus | SPI_GetFlagStatus (SPI_TypeDef *SPIx, uint8_t SPI_FLAG) |
Checks whether the specified SPIx flag is set or not. More... | |
void SPI_Cmd | ( | SPI_TypeDef * | SPIx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified SPI peripheral.
SPIx | Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. |
NewState | new state of the SPIx peripheral. This parameter can be: ENABLE or DISABLE. |
None |
void SPI_DeInit | ( | SPI_TypeDef * | SPIx | ) |
Deinitializes the SPIx peripheral registers to their default reset values.
SPIx | Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. |
None |
FlagStatus SPI_GetFlagStatus | ( | SPI_TypeDef * | SPIx, |
uint8_t | SPI_FLAG | ||
) |
Checks whether the specified SPIx flag is set or not.
SPIx | Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. |
SPI_FLAG | specifies the SPI flag to check. This parameter can be one of the following values:
|
The | new state of SPI_FLAG (SET or RESET). |
void SPI_Init | ( | SPI_TypeDef * | SPIx, |
SPI_InitTypeDef * | SPI_InitStruct | ||
) |
Initializes the SPIx peripheral according to the specified parameters in the SPI_InitStruct.
SPIx | Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. |
SPI_InitStruct | pointer to a SPI_InitTypeDef structure that contains the configuration information for the specified SPI peripheral. |
None |
void SPI_NSSConfig | ( | SPI_TypeDef * | SPIx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified slave select line.
SPIx | Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. |
NewState | new state of the slave select line. This parameter can be: ENABLE or DISABLE. |
None |
uint8_t SPI_ReadData | ( | SPI_TypeDef * | SPIx | ) |
Read one data from DATA register.
SPIx | Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. |
The | read data. |
void SPI_WriteData | ( | SPI_TypeDef * | SPIx, |
uint8_t | Data | ||
) |
Write one data to DATA register.
SPIx | Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. |
Data | The data to write. |
None |