MG32F10x Standard Peripherals Firmware Library
|
This file provides all the SPI firmware functions. More...
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_StructInit (SPI_InitTypeDef *SPI_InitStruct) |
Fills each SPI_InitStruct member with its default value. More... | |
void | SPI_Cmd (SPI_TypeDef *SPIx, FunctionalState NewState) |
Enables or disables the specified SPI peripheral. More... | |
void | SPI_TransferModeConfig (SPI_TypeDef *SPIx, uint16_t SPI_TransferMode) |
Configures the transfer mode. More... | |
void | SPI_SlaveOutputCmd (SPI_TypeDef *SPIx, FunctionalState NewState) |
Enables or disables the slave output (only used for SPISx). More... | |
void | SPI_NSSConfig (SPI_TypeDef *SPIx, uint32_t SPI_NSS, FunctionalState NewState) |
Enables or disables the specified slave select line (only used for SPIMx). More... | |
void | SPI_NSSToggleModeCmd (SPI_TypeDef *SPIx, FunctionalState NewState) |
Enables or disables the slave select toggle mode. More... | |
void | SPI_ReceiveDataLengthConfig (SPI_TypeDef *SPIx, uint32_t DataLength) |
Configures the number of data frames to be continuously received (only used for SPIMx). More... | |
void | SPI_MicrowireConfig (SPI_TypeDef *SPIx, SPI_MicrowireInitTypeDef *SPI_MicrowireInitStruct) |
Configures the Microwire frame format according to the specified parameters in the SPI_MicrowireInitStruct. More... | |
void | SPI_MicrowireStructInit (SPI_MicrowireInitTypeDef *SPI_MicrowireInitStruct) |
Fills each SPI_MicrowireInitStruct member with its default value. More... | |
void | SPI_SpiModeConfig (SPI_TypeDef *SPIx, uint32_t SPI_SpiMode) |
Configures the Spi Mode. More... | |
void | SPI_EnhancedSpiConfig (SPI_TypeDef *SPIx, SPI_EnhancedSpiInitTypeDef *SPI_EnhancedSpiInitStruct) |
Configures the Enhanced SPI Mode according to the specified parameters in the SPI_EnhancedSpiInitStruct (only used for QSPI). More... | |
void | SPI_EnhancedSpiStructInit (SPI_EnhancedSpiInitTypeDef *SPI_EnhancedSpiInitStruct) |
Fills each SPI_EnhancedSpiInitStruct member with its default value. More... | |
uint16_t | SPI_ReadData (SPI_TypeDef *SPIx) |
Read one data from Rx FIFO. More... | |
void | SPI_WriteData (SPI_TypeDef *SPIx, uint16_t Data) |
Write one data to Tx FIFO. More... | |
FlagStatus | SPI_GetFlagStatus (SPI_TypeDef *SPIx, uint8_t SPI_FLAG) |
Checks whether the specified SPIx flag is set or not. More... | |
void | SPI_ITConfig (SPI_TypeDef *SPIx, uint8_t SPI_IT, FunctionalState NewState) |
Enables or disables the specified SPI interrupts. More... | |
ITStatus | SPI_GetRawITStatus (SPI_TypeDef *SPIx, uint8_t SPI_IT) |
Checks whether the specified SPIx raw interrupt status. More... | |
ITStatus | SPI_GetITStatus (SPI_TypeDef *SPIx, uint8_t SPI_IT) |
Checks whether the specified SPIx interrupt has occurred or not. More... | |
void | SPI_ClearITPendingBit (SPI_TypeDef *SPIx, uint8_t SPI_IT) |
Clears the SPIx's interrupt pending bits. More... | |
void | SPI_RxFIFOThresholdConfig (SPI_TypeDef *SPIx, uint8_t Threshold) |
Configures the Rx FIFO threshold. More... | |
void | SPI_TxFIFOThresholdConfig (SPI_TypeDef *SPIx, uint8_t Threshold) |
Configures the Tx FIFO threshold. More... | |
uint8_t | SPI_GetRxFIFOLevel (SPI_TypeDef *SPIx) |
Returns the number of data can be read from Rx FIFO. More... | |
uint8_t | SPI_GetTxFIFOLevel (SPI_TypeDef *SPIx) |
Returns the number of data left in Tx FIFO. More... | |
void | SPI_DMARxReqLevelConfig (SPI_TypeDef *SPIx, uint8_t DMARxReqLevel) |
Configures the DMA Rx request level. More... | |
void | SPI_DMATxReqLevelConfig (SPI_TypeDef *SPIx, uint8_t DMATxReqLevel) |
Configures the DMA Tx request level. More... | |
void | SPI_DMACmd (SPI_TypeDef *SPIx, uint32_t SPI_DMAReq, FunctionalState NewState) |
Enables or disables the SPIx's DMA interface. More... | |
void | SPI_RxdSampleDelayConfig (SPI_TypeDef *SPIx, uint8_t DelayValue) |
Configures the rxd sample delay value. More... | |
This file provides all the SPI firmware functions.