|
STM32F103xB HAL User Manual
|
Header file of SPI LL module. More...
#include "stm32f1xx.h"Go to the source code of this file.
Data Structures | |
| struct | LL_SPI_InitTypeDef |
| SPI Init structures definition. More... | |
Defines | |
| #define | LL_SPI_SR_RXNE SPI_SR_RXNE |
| #define | LL_SPI_SR_TXE SPI_SR_TXE |
| #define | LL_SPI_SR_BSY SPI_SR_BSY |
| #define | LL_SPI_SR_CRCERR SPI_SR_CRCERR |
| #define | LL_SPI_SR_MODF SPI_SR_MODF |
| #define | LL_SPI_SR_OVR SPI_SR_OVR |
| #define | LL_SPI_SR_FRE SPI_SR_FRE |
| #define | LL_SPI_CR2_RXNEIE SPI_CR2_RXNEIE |
| #define | LL_SPI_CR2_TXEIE SPI_CR2_TXEIE |
| #define | LL_SPI_CR2_ERRIE SPI_CR2_ERRIE |
| #define | LL_SPI_MODE_MASTER (SPI_CR1_MSTR | SPI_CR1_SSI) |
| #define | LL_SPI_MODE_SLAVE 0x00000000U |
| #define | LL_SPI_PHASE_1EDGE 0x00000000U |
| #define | LL_SPI_PHASE_2EDGE (SPI_CR1_CPHA) |
| #define | LL_SPI_POLARITY_LOW 0x00000000U |
| #define | LL_SPI_POLARITY_HIGH (SPI_CR1_CPOL) |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV2 0x00000000U |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV4 (SPI_CR1_BR_0) |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV8 (SPI_CR1_BR_1) |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV16 (SPI_CR1_BR_1 | SPI_CR1_BR_0) |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV32 (SPI_CR1_BR_2) |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV64 (SPI_CR1_BR_2 | SPI_CR1_BR_0) |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV128 (SPI_CR1_BR_2 | SPI_CR1_BR_1) |
| #define | LL_SPI_BAUDRATEPRESCALER_DIV256 (SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0) |
| #define | LL_SPI_LSB_FIRST (SPI_CR1_LSBFIRST) |
| #define | LL_SPI_MSB_FIRST 0x00000000U |
| #define | LL_SPI_FULL_DUPLEX 0x00000000U |
| #define | LL_SPI_SIMPLEX_RX (SPI_CR1_RXONLY) |
| #define | LL_SPI_HALF_DUPLEX_RX (SPI_CR1_BIDIMODE) |
| #define | LL_SPI_HALF_DUPLEX_TX (SPI_CR1_BIDIMODE | SPI_CR1_BIDIOE) |
| #define | LL_SPI_NSS_SOFT (SPI_CR1_SSM) |
| #define | LL_SPI_NSS_HARD_INPUT 0x00000000U |
| #define | LL_SPI_NSS_HARD_OUTPUT (((uint32_t)SPI_CR2_SSOE << 16U)) |
| #define | LL_SPI_DATAWIDTH_8BIT 0x00000000U |
| #define | LL_SPI_DATAWIDTH_16BIT (SPI_CR1_DFF) |
| #define | LL_SPI_CRCCALCULATION_DISABLE 0x00000000U |
| #define | LL_SPI_CRCCALCULATION_ENABLE (SPI_CR1_CRCEN) |
| #define | LL_SPI_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) |
| Write a value in SPI register. | |
| #define | LL_SPI_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) |
| Read a value in SPI register. | |
Functions | |
| __STATIC_INLINE void | LL_SPI_Enable (SPI_TypeDef *SPIx) |
| Enable SPI peripheral. | |
| __STATIC_INLINE void | LL_SPI_Disable (SPI_TypeDef *SPIx) |
| Disable SPI peripheral. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsEnabled (SPI_TypeDef *SPIx) |
| Check if SPI peripheral is enabled. | |
| __STATIC_INLINE void | LL_SPI_SetMode (SPI_TypeDef *SPIx, uint32_t Mode) |
| Set SPI operation mode to Master or Slave. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetMode (SPI_TypeDef *SPIx) |
| Get SPI operation mode (Master or Slave) | |
| __STATIC_INLINE void | LL_SPI_SetClockPhase (SPI_TypeDef *SPIx, uint32_t ClockPhase) |
| Set clock phase. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetClockPhase (SPI_TypeDef *SPIx) |
| Get clock phase. | |
| __STATIC_INLINE void | LL_SPI_SetClockPolarity (SPI_TypeDef *SPIx, uint32_t ClockPolarity) |
| Set clock polarity. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetClockPolarity (SPI_TypeDef *SPIx) |
| Get clock polarity. | |
| __STATIC_INLINE void | LL_SPI_SetBaudRatePrescaler (SPI_TypeDef *SPIx, uint32_t BaudRate) |
| Set baud rate prescaler. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetBaudRatePrescaler (SPI_TypeDef *SPIx) |
| Get baud rate prescaler. | |
| __STATIC_INLINE void | LL_SPI_SetTransferBitOrder (SPI_TypeDef *SPIx, uint32_t BitOrder) |
| Set transfer bit order. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetTransferBitOrder (SPI_TypeDef *SPIx) |
| Get transfer bit order. | |
| __STATIC_INLINE void | LL_SPI_SetTransferDirection (SPI_TypeDef *SPIx, uint32_t TransferDirection) |
| Set transfer direction mode. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetTransferDirection (SPI_TypeDef *SPIx) |
| Get transfer direction mode. | |
| __STATIC_INLINE void | LL_SPI_SetDataWidth (SPI_TypeDef *SPIx, uint32_t DataWidth) |
| Set frame data width. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetDataWidth (SPI_TypeDef *SPIx) |
| Get frame data width. | |
| __STATIC_INLINE void | LL_SPI_EnableCRC (SPI_TypeDef *SPIx) |
| Enable CRC. | |
| __STATIC_INLINE void | LL_SPI_DisableCRC (SPI_TypeDef *SPIx) |
| Disable CRC. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsEnabledCRC (SPI_TypeDef *SPIx) |
| Check if CRC is enabled. | |
| __STATIC_INLINE void | LL_SPI_SetCRCNext (SPI_TypeDef *SPIx) |
| Set CRCNext to transfer CRC on the line. | |
| __STATIC_INLINE void | LL_SPI_SetCRCPolynomial (SPI_TypeDef *SPIx, uint32_t CRCPoly) |
| Set polynomial for CRC calculation. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetCRCPolynomial (SPI_TypeDef *SPIx) |
| Get polynomial for CRC calculation. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetRxCRC (SPI_TypeDef *SPIx) |
| Get Rx CRC. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetTxCRC (SPI_TypeDef *SPIx) |
| Get Tx CRC. | |
| __STATIC_INLINE void | LL_SPI_SetNSSMode (SPI_TypeDef *SPIx, uint32_t NSS) |
| Set NSS mode. | |
| __STATIC_INLINE uint32_t | LL_SPI_GetNSSMode (SPI_TypeDef *SPIx) |
| Get NSS mode. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsActiveFlag_RXNE (SPI_TypeDef *SPIx) |
| Check if Rx buffer is not empty. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsActiveFlag_TXE (SPI_TypeDef *SPIx) |
| Check if Tx buffer is empty. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsActiveFlag_CRCERR (SPI_TypeDef *SPIx) |
| Get CRC error flag. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsActiveFlag_MODF (SPI_TypeDef *SPIx) |
| Get mode fault error flag. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsActiveFlag_OVR (SPI_TypeDef *SPIx) |
| Get overrun error flag. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsActiveFlag_BSY (SPI_TypeDef *SPIx) |
| Get busy flag. | |
| __STATIC_INLINE void | LL_SPI_ClearFlag_CRCERR (SPI_TypeDef *SPIx) |
| Clear CRC error flag. | |
| __STATIC_INLINE void | LL_SPI_ClearFlag_MODF (SPI_TypeDef *SPIx) |
| Clear mode fault error flag. | |
| __STATIC_INLINE void | LL_SPI_ClearFlag_OVR (SPI_TypeDef *SPIx) |
| Clear overrun error flag. | |
| __STATIC_INLINE void | LL_SPI_ClearFlag_FRE (SPI_TypeDef *SPIx) |
| Clear frame format error flag. | |
| __STATIC_INLINE void | LL_SPI_EnableIT_ERR (SPI_TypeDef *SPIx) |
| Enable error interrupt. | |
| __STATIC_INLINE void | LL_SPI_EnableIT_RXNE (SPI_TypeDef *SPIx) |
| Enable Rx buffer not empty interrupt. | |
| __STATIC_INLINE void | LL_SPI_EnableIT_TXE (SPI_TypeDef *SPIx) |
| Enable Tx buffer empty interrupt. | |
| __STATIC_INLINE void | LL_SPI_DisableIT_ERR (SPI_TypeDef *SPIx) |
| Disable error interrupt. | |
| __STATIC_INLINE void | LL_SPI_DisableIT_RXNE (SPI_TypeDef *SPIx) |
| Disable Rx buffer not empty interrupt. | |
| __STATIC_INLINE void | LL_SPI_DisableIT_TXE (SPI_TypeDef *SPIx) |
| Disable Tx buffer empty interrupt. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsEnabledIT_ERR (SPI_TypeDef *SPIx) |
| Check if error interrupt is enabled. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsEnabledIT_RXNE (SPI_TypeDef *SPIx) |
| Check if Rx buffer not empty interrupt is enabled. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsEnabledIT_TXE (SPI_TypeDef *SPIx) |
| Check if Tx buffer empty interrupt. | |
| __STATIC_INLINE void | LL_SPI_EnableDMAReq_RX (SPI_TypeDef *SPIx) |
| Enable DMA Rx. | |
| __STATIC_INLINE void | LL_SPI_DisableDMAReq_RX (SPI_TypeDef *SPIx) |
| Disable DMA Rx. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsEnabledDMAReq_RX (SPI_TypeDef *SPIx) |
| Check if DMA Rx is enabled. | |
| __STATIC_INLINE void | LL_SPI_EnableDMAReq_TX (SPI_TypeDef *SPIx) |
| Enable DMA Tx. | |
| __STATIC_INLINE void | LL_SPI_DisableDMAReq_TX (SPI_TypeDef *SPIx) |
| Disable DMA Tx. | |
| __STATIC_INLINE uint32_t | LL_SPI_IsEnabledDMAReq_TX (SPI_TypeDef *SPIx) |
| Check if DMA Tx is enabled. | |
| __STATIC_INLINE uint32_t | LL_SPI_DMA_GetRegAddr (SPI_TypeDef *SPIx) |
| Get the data register address used for DMA transfer. | |
| __STATIC_INLINE uint8_t | LL_SPI_ReceiveData8 (SPI_TypeDef *SPIx) |
| Read 8-Bits in the data register. | |
| __STATIC_INLINE uint16_t | LL_SPI_ReceiveData16 (SPI_TypeDef *SPIx) |
| Read 16-Bits in the data register. | |
| __STATIC_INLINE void | LL_SPI_TransmitData8 (SPI_TypeDef *SPIx, uint8_t TxData) |
| Write 8-Bits in the data register. | |
| __STATIC_INLINE void | LL_SPI_TransmitData16 (SPI_TypeDef *SPIx, uint16_t TxData) |
| Write 16-Bits in the data register. | |
| 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. | |
Header file of SPI LL module.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
Definition in file stm32f1xx_ll_spi.h.
1.7.6.1