Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TUKS-COURSE-TIMER by
Configuration
[SPI Exported Functions]
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. |
Function Documentation
__STATIC_INLINE void LL_SPI_Disable | ( | SPI_TypeDef * | SPIx ) |
Disable SPI peripheral.
- Note:
- When disabling the SPI, follow the procedure described in the Reference Manual. CR1 SPE LL_SPI_Disable
- Parameters:
-
SPIx SPI Instance
- Return values:
-
None
Definition at line 390 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_Enable | ( | SPI_TypeDef * | SPIx ) |
Enable SPI peripheral CR1 SPE LL_SPI_Enable.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
None
Definition at line 378 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_GetBaudRatePrescaler | ( | SPI_TypeDef * | SPIx ) |
Get baud rate prescaler CR1 BR LL_SPI_GetBaudRatePrescaler.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_BAUDRATEPRESCALER_DIV2
- LL_SPI_BAUDRATEPRESCALER_DIV4
- LL_SPI_BAUDRATEPRESCALER_DIV8
- LL_SPI_BAUDRATEPRESCALER_DIV16
- LL_SPI_BAUDRATEPRESCALER_DIV32
- LL_SPI_BAUDRATEPRESCALER_DIV64
- LL_SPI_BAUDRATEPRESCALER_DIV128
- LL_SPI_BAUDRATEPRESCALER_DIV256
Definition at line 557 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_GetClockPhase | ( | SPI_TypeDef * | SPIx ) |
Get clock phase CR1 CPHA LL_SPI_GetClockPhase.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_PHASE_1EDGE
- LL_SPI_PHASE_2EDGE
Definition at line 488 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_GetClockPolarity | ( | SPI_TypeDef * | SPIx ) |
Get clock polarity CR1 CPOL LL_SPI_GetClockPolarity.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_POLARITY_LOW
- LL_SPI_POLARITY_HIGH
Definition at line 517 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_GetDataWidth | ( | SPI_TypeDef * | SPIx ) |
Get frame data width CR2 DS LL_SPI_GetDataWidth.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_DATAWIDTH_4BIT
- LL_SPI_DATAWIDTH_5BIT
- LL_SPI_DATAWIDTH_6BIT
- LL_SPI_DATAWIDTH_7BIT
- LL_SPI_DATAWIDTH_8BIT
- LL_SPI_DATAWIDTH_9BIT
- LL_SPI_DATAWIDTH_10BIT
- LL_SPI_DATAWIDTH_11BIT
- LL_SPI_DATAWIDTH_12BIT
- LL_SPI_DATAWIDTH_13BIT
- LL_SPI_DATAWIDTH_14BIT
- LL_SPI_DATAWIDTH_15BIT
- LL_SPI_DATAWIDTH_16BIT
Definition at line 671 of file stm32l4xx_ll_spi.h.
__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.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_MODE_MASTER
- LL_SPI_MODE_SLAVE
Definition at line 431 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOThreshold | ( | SPI_TypeDef * | SPIx ) |
Get threshold of RXFIFO that triggers an RXNE event CR2 FRXTH LL_SPI_GetRxFIFOThreshold.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_RX_FIFO_TH_HALF
- LL_SPI_RX_FIFO_TH_QUARTER
Definition at line 698 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_GetStandard | ( | SPI_TypeDef * | SPIx ) |
Get serial protocol used CR2 FRF LL_SPI_GetStandard.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_PROTOCOL_MOTOROLA
- LL_SPI_PROTOCOL_TI
Definition at line 459 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_GetTransferBitOrder | ( | SPI_TypeDef * | SPIx ) |
Get transfer bit order CR1 LSBFIRST LL_SPI_GetTransferBitOrder.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_LSB_FIRST
- LL_SPI_MSB_FIRST
Definition at line 585 of file stm32l4xx_ll_spi.h.
__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.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
Returned value can be one of the following values: - LL_SPI_FULL_DUPLEX
- LL_SPI_SIMPLEX_RX
- LL_SPI_HALF_DUPLEX_RX
- LL_SPI_HALF_DUPLEX_TX
Definition at line 622 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE uint32_t LL_SPI_IsEnabled | ( | SPI_TypeDef * | SPIx ) |
Check if SPI peripheral is enabled CR1 SPE LL_SPI_IsEnabled.
- Parameters:
-
SPIx SPI Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 401 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetBaudRatePrescaler | ( | SPI_TypeDef * | SPIx, |
uint32_t | BaudRate | ||
) |
Set baud rate prescaler.
- Note:
- These bits should not be changed when communication is ongoing. SPI BaudRate = fPCLK/Prescaler. CR1 BR LL_SPI_SetBaudRatePrescaler
- Parameters:
-
SPIx SPI Instance BaudRate This parameter can be one of the following values: - LL_SPI_BAUDRATEPRESCALER_DIV2
- LL_SPI_BAUDRATEPRESCALER_DIV4
- LL_SPI_BAUDRATEPRESCALER_DIV8
- LL_SPI_BAUDRATEPRESCALER_DIV16
- LL_SPI_BAUDRATEPRESCALER_DIV32
- LL_SPI_BAUDRATEPRESCALER_DIV64
- LL_SPI_BAUDRATEPRESCALER_DIV128
- LL_SPI_BAUDRATEPRESCALER_DIV256
- Return values:
-
None
Definition at line 538 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetClockPhase | ( | SPI_TypeDef * | SPIx, |
uint32_t | ClockPhase | ||
) |
Set clock phase.
- Note:
- This bit should not be changed when communication is ongoing. This bit is not used in SPI TI mode. CR1 CPHA LL_SPI_SetClockPhase
- Parameters:
-
SPIx SPI Instance ClockPhase This parameter can be one of the following values: - LL_SPI_PHASE_1EDGE
- LL_SPI_PHASE_2EDGE
- Return values:
-
None
Definition at line 475 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetClockPolarity | ( | SPI_TypeDef * | SPIx, |
uint32_t | ClockPolarity | ||
) |
Set clock polarity.
- Note:
- This bit should not be changed when communication is ongoing. This bit is not used in SPI TI mode. CR1 CPOL LL_SPI_SetClockPolarity
- Parameters:
-
SPIx SPI Instance ClockPolarity This parameter can be one of the following values: - LL_SPI_POLARITY_LOW
- LL_SPI_POLARITY_HIGH
- Return values:
-
None
Definition at line 504 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetDataWidth | ( | SPI_TypeDef * | SPIx, |
uint32_t | DataWidth | ||
) |
Set frame data width CR2 DS LL_SPI_SetDataWidth.
- Parameters:
-
SPIx SPI Instance DataWidth This parameter can be one of the following values: - LL_SPI_DATAWIDTH_4BIT
- LL_SPI_DATAWIDTH_5BIT
- LL_SPI_DATAWIDTH_6BIT
- LL_SPI_DATAWIDTH_7BIT
- LL_SPI_DATAWIDTH_8BIT
- LL_SPI_DATAWIDTH_9BIT
- LL_SPI_DATAWIDTH_10BIT
- LL_SPI_DATAWIDTH_11BIT
- LL_SPI_DATAWIDTH_12BIT
- LL_SPI_DATAWIDTH_13BIT
- LL_SPI_DATAWIDTH_14BIT
- LL_SPI_DATAWIDTH_15BIT
- LL_SPI_DATAWIDTH_16BIT
- Return values:
-
None
Definition at line 647 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetMode | ( | SPI_TypeDef * | SPIx, |
uint32_t | Mode | ||
) |
Set SPI operation mode to Master or Slave.
- Note:
- This bit should not be changed when communication is ongoing. CR1 MSTR LL_SPI_SetMode
CR1 SSI LL_SPI_SetMode
- Parameters:
-
SPIx SPI Instance Mode This parameter can be one of the following values: - LL_SPI_MODE_MASTER
- LL_SPI_MODE_SLAVE
- Return values:
-
None
Definition at line 417 of file stm32l4xx_ll_spi.h.
__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.
- Parameters:
-
SPIx SPI Instance Threshold This parameter can be one of the following values: - LL_SPI_RX_FIFO_TH_HALF
- LL_SPI_RX_FIFO_TH_QUARTER
- Return values:
-
None
Definition at line 685 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetStandard | ( | SPI_TypeDef * | SPIx, |
uint32_t | Standard | ||
) |
Set serial protocol used.
- Note:
- This bit should be written only when SPI is disabled (SPE = 0) for correct operation. CR2 FRF LL_SPI_SetStandard
- Parameters:
-
SPIx SPI Instance Standard This parameter can be one of the following values: - LL_SPI_PROTOCOL_MOTOROLA
- LL_SPI_PROTOCOL_TI
- Return values:
-
None
Definition at line 446 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetTransferBitOrder | ( | SPI_TypeDef * | SPIx, |
uint32_t | BitOrder | ||
) |
Set transfer bit order.
- Note:
- This bit should not be changed when communication is ongoing. This bit is not used in SPI TI mode. CR1 LSBFIRST LL_SPI_SetTransferBitOrder
- Parameters:
-
SPIx SPI Instance BitOrder This parameter can be one of the following values: - LL_SPI_LSB_FIRST
- LL_SPI_MSB_FIRST
- Return values:
-
None
Definition at line 572 of file stm32l4xx_ll_spi.h.
__STATIC_INLINE void LL_SPI_SetTransferDirection | ( | SPI_TypeDef * | SPIx, |
uint32_t | TransferDirection | ||
) |
Set transfer direction mode.
- Note:
- For Half-Duplex mode, Rx Direction is set by default. In master mode, the MOSI pin is used and in slave mode, the MISO pin is used for Half-Duplex. CR1 RXONLY LL_SPI_SetTransferDirection
CR1 BIDIMODE LL_SPI_SetTransferDirection
CR1 BIDIOE LL_SPI_SetTransferDirection
- Parameters:
-
SPIx SPI Instance TransferDirection This parameter can be one of the following values: - LL_SPI_FULL_DUPLEX
- LL_SPI_SIMPLEX_RX
- LL_SPI_HALF_DUPLEX_RX
- LL_SPI_HALF_DUPLEX_TX
- Return values:
-
None
Definition at line 605 of file stm32l4xx_ll_spi.h.
Generated on Tue Jul 12 2022 17:38:58 by
