TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

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

Embed: (wiki syntax)

« Back to documentation index

stm32l4xx_ll_spi.h File Reference

stm32l4xx_ll_spi.h File Reference

Header file of SPI LL module. More...

Go to the source code of this file.

Data Structures

struct  LL_SPI_InitTypeDef
 SPI Init structures definition. More...

Functions

__STATIC_INLINE void LL_SPI_Enable (SPI_TypeDef *SPIx)
 Enable SPI peripheral CR1 SPE LL_SPI_Enable.
__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 CR1 SPE LL_SPI_IsEnabled.
__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) CR1 MSTR LL_SPI_GetMode
CR1 SSI LL_SPI_GetMode.
__STATIC_INLINE void LL_SPI_SetStandard (SPI_TypeDef *SPIx, uint32_t Standard)
 Set serial protocol used.
__STATIC_INLINE uint32_t LL_SPI_GetStandard (SPI_TypeDef *SPIx)
 Get serial protocol used CR2 FRF LL_SPI_GetStandard.
__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 CR1 CPHA LL_SPI_GetClockPhase.
__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 CR1 CPOL LL_SPI_GetClockPolarity.
__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 CR1 BR LL_SPI_GetBaudRatePrescaler.
__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 CR1 LSBFIRST LL_SPI_GetTransferBitOrder.
__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 CR1 RXONLY LL_SPI_GetTransferDirection
CR1 BIDIMODE LL_SPI_GetTransferDirection
CR1 BIDIOE LL_SPI_GetTransferDirection.
__STATIC_INLINE void LL_SPI_SetDataWidth (SPI_TypeDef *SPIx, uint32_t DataWidth)
 Set frame data width CR2 DS LL_SPI_SetDataWidth.
__STATIC_INLINE uint32_t LL_SPI_GetDataWidth (SPI_TypeDef *SPIx)
 Get frame data width CR2 DS LL_SPI_GetDataWidth.
__STATIC_INLINE void LL_SPI_SetRxFIFOThreshold (SPI_TypeDef *SPIx, uint32_t Threshold)
 Set threshold of RXFIFO that triggers an RXNE event CR2 FRXTH LL_SPI_SetRxFIFOThreshold.
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOThreshold (SPI_TypeDef *SPIx)
 Get threshold of RXFIFO that triggers an RXNE event CR2 FRXTH LL_SPI_GetRxFIFOThreshold.
__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_SetCRCWidth (SPI_TypeDef *SPIx, uint32_t CRCLength)
 Set CRC Length.
__STATIC_INLINE uint32_t LL_SPI_GetCRCWidth (SPI_TypeDef *SPIx)
 Get CRC Length CR1 CRCL LL_SPI_GetCRCWidth.
__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 CRCPR CRCPOLY LL_SPI_SetCRCPolynomial.
__STATIC_INLINE uint32_t LL_SPI_GetCRCPolynomial (SPI_TypeDef *SPIx)
 Get polynomial for CRC calculation CRCPR CRCPOLY LL_SPI_GetCRCPolynomial.
__STATIC_INLINE uint32_t LL_SPI_GetRxCRC (SPI_TypeDef *SPIx)
 Get Rx CRC RXCRCR RXCRC LL_SPI_GetRxCRC.
__STATIC_INLINE uint32_t LL_SPI_GetTxCRC (SPI_TypeDef *SPIx)
 Get Tx CRC TXCRCR TXCRC LL_SPI_GetTxCRC.
__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 CR1 SSM LL_SPI_GetNSSMode
CR2 SSOE LL_SPI_GetNSSMode.
__STATIC_INLINE void LL_SPI_EnableNSSPulseMgt (SPI_TypeDef *SPIx)
 Enable NSS pulse management.
__STATIC_INLINE void LL_SPI_DisableNSSPulseMgt (SPI_TypeDef *SPIx)
 Disable NSS pulse management.
__STATIC_INLINE uint32_t LL_SPI_IsEnabledNSSPulse (SPI_TypeDef *SPIx)
 Check if NSS pulse is enabled.
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_RXNE (SPI_TypeDef *SPIx)
 Check if Rx buffer is not empty SR RXNE LL_SPI_IsActiveFlag_RXNE.
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_TXE (SPI_TypeDef *SPIx)
 Check if Tx buffer is empty SR TXE LL_SPI_IsActiveFlag_TXE.
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_CRCERR (SPI_TypeDef *SPIx)
 Get CRC error flag SR CRCERR LL_SPI_IsActiveFlag_CRCERR.
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_MODF (SPI_TypeDef *SPIx)
 Get mode fault error flag SR MODF LL_SPI_IsActiveFlag_MODF.
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_OVR (SPI_TypeDef *SPIx)
 Get overrun error flag SR OVR LL_SPI_IsActiveFlag_OVR.
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_BSY (SPI_TypeDef *SPIx)
 Get busy flag.
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_FRE (SPI_TypeDef *SPIx)
 Get frame format error flag SR FRE LL_SPI_IsActiveFlag_FRE.
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOLevel (SPI_TypeDef *SPIx)
 Get FIFO reception Level SR FRLVL LL_SPI_GetRxFIFOLevel.
__STATIC_INLINE uint32_t LL_SPI_GetTxFIFOLevel (SPI_TypeDef *SPIx)
 Get FIFO Transmission Level SR FTLVL LL_SPI_GetTxFIFOLevel.
__STATIC_INLINE void LL_SPI_ClearFlag_CRCERR (SPI_TypeDef *SPIx)
 Clear CRC error flag SR CRCERR LL_SPI_ClearFlag_CRCERR.
__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 CR2 RXNEIE LL_SPI_EnableIT_RXNE.
__STATIC_INLINE void LL_SPI_EnableIT_TXE (SPI_TypeDef *SPIx)
 Enable Tx buffer empty interrupt CR2 TXEIE LL_SPI_EnableIT_TXE.
__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 CR2 RXNEIE LL_SPI_DisableIT_RXNE.
__STATIC_INLINE void LL_SPI_DisableIT_TXE (SPI_TypeDef *SPIx)
 Disable Tx buffer empty interrupt CR2 TXEIE LL_SPI_DisableIT_TXE.
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_ERR (SPI_TypeDef *SPIx)
 Check if error interrupt is enabled CR2 ERRIE LL_SPI_IsEnabledIT_ERR.
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_RXNE (SPI_TypeDef *SPIx)
 Check if Rx buffer not empty interrupt is enabled CR2 RXNEIE LL_SPI_IsEnabledIT_RXNE.
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_TXE (SPI_TypeDef *SPIx)
 Check if Tx buffer empty interrupt CR2 TXEIE LL_SPI_IsEnabledIT_TXE.
__STATIC_INLINE void LL_SPI_EnableDMAReq_RX (SPI_TypeDef *SPIx)
 Enable DMA Rx CR2 RXDMAEN LL_SPI_EnableDMAReq_RX.
__STATIC_INLINE void LL_SPI_DisableDMAReq_RX (SPI_TypeDef *SPIx)
 Disable DMA Rx CR2 RXDMAEN LL_SPI_DisableDMAReq_RX.
__STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_RX (SPI_TypeDef *SPIx)
 Check if DMA Rx is enabled CR2 RXDMAEN LL_SPI_IsEnabledDMAReq_RX.
__STATIC_INLINE void LL_SPI_EnableDMAReq_TX (SPI_TypeDef *SPIx)
 Enable DMA Tx CR2 TXDMAEN LL_SPI_EnableDMAReq_TX.
__STATIC_INLINE void LL_SPI_DisableDMAReq_TX (SPI_TypeDef *SPIx)
 Disable DMA Tx CR2 TXDMAEN LL_SPI_DisableDMAReq_TX.
__STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_TX (SPI_TypeDef *SPIx)
 Check if DMA Tx is enabled CR2 TXDMAEN LL_SPI_IsEnabledDMAReq_TX.
__STATIC_INLINE void LL_SPI_SetDMAParity_RX (SPI_TypeDef *SPIx, uint32_t Parity)
 Set parity of Last DMA reception CR2 LDMARX LL_SPI_SetDMAParity_RX.
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_RX (SPI_TypeDef *SPIx)
 Get parity configuration for Last DMA reception CR2 LDMARX LL_SPI_GetDMAParity_RX.
__STATIC_INLINE void LL_SPI_SetDMAParity_TX (SPI_TypeDef *SPIx, uint32_t Parity)
 Set parity of Last DMA transmission CR2 LDMATX LL_SPI_SetDMAParity_TX.
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_TX (SPI_TypeDef *SPIx)
 Get parity configuration for Last DMA transmission CR2 LDMATX LL_SPI_GetDMAParity_TX.
__STATIC_INLINE uint32_t LL_SPI_DMA_GetRegAddr (SPI_TypeDef *SPIx)
 Get the data register address used for DMA transfer DR DR LL_SPI_DMA_GetRegAddr.
__STATIC_INLINE uint8_t LL_SPI_ReceiveData8 (SPI_TypeDef *SPIx)
 Read 8-Bits in the data register DR DR LL_SPI_ReceiveData8.
__STATIC_INLINE uint16_t LL_SPI_ReceiveData16 (SPI_TypeDef *SPIx)
 Read 16-Bits in the data register DR DR LL_SPI_ReceiveData16.
__STATIC_INLINE void LL_SPI_TransmitData8 (SPI_TypeDef *SPIx, uint8_t TxData)
 Write 8-Bits in the data register DR DR LL_SPI_TransmitData8.
__STATIC_INLINE void LL_SPI_TransmitData16 (SPI_TypeDef *SPIx, uint16_t TxData)
 Write 16-Bits in the data register DR DR LL_SPI_TransmitData16.
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.

Detailed Description

Header file of SPI LL module.

Author:
MCD Application Team
Version:
V1.5.1
Date:
31-May-2016
Attention:

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32l4xx_ll_spi.h.