STM32L486xx HAL User Manual
|
Defines | |
#define | SPI_1LINE_TX(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE) |
Set the SPI transmit-only mode. | |
#define | SPI_1LINE_RX(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE) |
Set the SPI receive-only mode. | |
#define | SPI_RESET_CRC(__HANDLE__) |
Reset the CRC calculation of the SPI. | |
#define | IS_SPI_MODE(__MODE__) |
Checks if SPI Mode parameter is in allowed range. | |
#define | IS_SPI_DIRECTION(__MODE__) |
Checks if SPI Direction Mode parameter is in allowed range. | |
#define | IS_SPI_DIRECTION_2LINES(__MODE__) ((__MODE__) == SPI_DIRECTION_2LINES) |
Checks if SPI Direction Mode parameter is 2 lines. | |
#define | IS_SPI_DIRECTION_2LINES_OR_1LINE(__MODE__) |
Checks if SPI Direction Mode parameter is 1 or 2 lines. | |
#define | IS_SPI_DATASIZE(__DATASIZE__) |
Checks if SPI Data Size parameter is in allowed range. | |
#define | IS_SPI_CPOL(__CPOL__) |
Checks if SPI Serial clock steady state parameter is in allowed range. | |
#define | IS_SPI_CPHA(__CPHA__) |
Checks if SPI Clock Phase parameter is in allowed range. | |
#define | IS_SPI_NSS(__NSS__) |
Checks if SPI Slave Select parameter is in allowed range. | |
#define | IS_SPI_NSSP(__NSSP__) |
Checks if SPI NSS Pulse parameter is in allowed range. | |
#define | IS_SPI_BAUDRATE_PRESCALER(__PRESCALER__) |
Checks if SPI Baudrate prescaler parameter is in allowed range. | |
#define | IS_SPI_FIRST_BIT(__BIT__) |
Checks if SPI MSB LSB transmission parameter is in allowed range. | |
#define | IS_SPI_TIMODE(__MODE__) |
Checks if SPI TI mode parameter is in allowed range. | |
#define | IS_SPI_CRC_CALCULATION(__CALCULATION__) |
Checks if SPI CRC calculation enabled state is in allowed range. | |
#define | IS_SPI_CRC_LENGTH(__LENGTH__) |
Checks if SPI CRC length is in allowed range. | |
#define | IS_SPI_CRC_POLYNOMIAL(__POLYNOMIAL__) (((__POLYNOMIAL__) >= 0x1U) && ((__POLYNOMIAL__) <= 0xFFFFU) && (((__POLYNOMIAL__)&0x1U) != 0U)) |
Checks if SPI polynomial value to be used for the CRC calculation, is in allowed range. | |
#define | IS_SPI_DMA_HANDLE(__HANDLE__) ((__HANDLE__) != NULL) |
Checks if DMA handle is valid. |
#define IS_SPI_BAUDRATE_PRESCALER | ( | __PRESCALER__ | ) |
(((__PRESCALER__) == SPI_BAUDRATEPRESCALER_2) || \ ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_4) || \ ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_8) || \ ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_16) || \ ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_32) || \ ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_64) || \ ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_128) || \ ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_256))
Checks if SPI Baudrate prescaler parameter is in allowed range.
__PRESCALER__ | specifies the SPI Baudrate prescaler. This parameter can be a value of SPI BaudRate Prescaler |
None |
Definition at line 685 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_CPHA | ( | __CPHA__ | ) |
(((__CPHA__) == SPI_PHASE_1EDGE) || \ ((__CPHA__) == SPI_PHASE_2EDGE))
Checks if SPI Clock Phase parameter is in allowed range.
__CPHA__ | specifies the SPI Clock Phase. This parameter can be a value of SPI Clock Phase |
None |
Definition at line 660 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_CPOL | ( | __CPOL__ | ) |
(((__CPOL__) == SPI_POLARITY_LOW) || \ ((__CPOL__) == SPI_POLARITY_HIGH))
Checks if SPI Serial clock steady state parameter is in allowed range.
__CPOL__ | specifies the SPI serial clock steady state. This parameter can be a value of SPI Clock Polarity |
None |
Definition at line 652 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_CRC_CALCULATION | ( | __CALCULATION__ | ) |
(((__CALCULATION__) == SPI_CRCCALCULATION_DISABLE) || \ ((__CALCULATION__) == SPI_CRCCALCULATION_ENABLE))
Checks if SPI CRC calculation enabled state is in allowed range.
__CALCULATION__ | specifies the SPI CRC calculation enable state. This parameter can be a value of SPI CRC Calculation |
None |
Definition at line 715 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_CRC_LENGTH | ( | __LENGTH__ | ) |
(((__LENGTH__) == SPI_CRC_LENGTH_DATASIZE) ||\ ((__LENGTH__) == SPI_CRC_LENGTH_8BIT) || \ ((__LENGTH__) == SPI_CRC_LENGTH_16BIT))
Checks if SPI CRC length is in allowed range.
__LENGTH__ | specifies the SPI CRC length. This parameter can be a value of SPI CRC Length |
None |
Definition at line 723 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_CRC_POLYNOMIAL | ( | __POLYNOMIAL__ | ) | (((__POLYNOMIAL__) >= 0x1U) && ((__POLYNOMIAL__) <= 0xFFFFU) && (((__POLYNOMIAL__)&0x1U) != 0U)) |
Checks if SPI polynomial value to be used for the CRC calculation, is in allowed range.
__POLYNOMIAL__ | specifies the SPI polynomial value to be used for the CRC calculation. This parameter must be a number between Min_Data = 0 and Max_Data = 65535 |
None |
Definition at line 732 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_DATASIZE | ( | __DATASIZE__ | ) |
(((__DATASIZE__) == SPI_DATASIZE_16BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_15BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_14BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_13BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_12BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_11BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_10BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_9BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_8BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_7BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_6BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_5BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_4BIT))
Checks if SPI Data Size parameter is in allowed range.
__DATASIZE__ | specifies the SPI Data Size. This parameter can be a value of SPI Data Size |
None |
Definition at line 633 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_DIRECTION | ( | __MODE__ | ) |
(((__MODE__) == SPI_DIRECTION_2LINES) || \ ((__MODE__) == SPI_DIRECTION_2LINES_RXONLY) || \ ((__MODE__) == SPI_DIRECTION_1LINE))
Checks if SPI Direction Mode parameter is in allowed range.
__MODE__ | specifies the SPI Direction Mode. This parameter can be a value of SPI Direction Mode |
None |
Definition at line 611 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_DIRECTION_2LINES | ( | __MODE__ | ) | ((__MODE__) == SPI_DIRECTION_2LINES) |
Checks if SPI Direction Mode parameter is 2 lines.
__MODE__ | specifies the SPI Direction Mode. |
None |
Definition at line 619 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_TransmitReceive(), HAL_SPI_TransmitReceive_DMA(), and HAL_SPI_TransmitReceive_IT().
#define IS_SPI_DIRECTION_2LINES_OR_1LINE | ( | __MODE__ | ) |
(((__MODE__) == SPI_DIRECTION_2LINES) || \ ((__MODE__) == SPI_DIRECTION_1LINE))
Checks if SPI Direction Mode parameter is 1 or 2 lines.
__MODE__ | specifies the SPI Direction Mode. |
None |
Definition at line 625 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Transmit(), HAL_SPI_Transmit_DMA(), and HAL_SPI_Transmit_IT().
#define IS_SPI_DMA_HANDLE | ( | __HANDLE__ | ) | ((__HANDLE__) != NULL) |
Checks if DMA handle is valid.
__HANDLE__ | specifies a DMA Handle. |
None |
Definition at line 738 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Receive_DMA(), HAL_SPI_Transmit_DMA(), and HAL_SPI_TransmitReceive_DMA().
#define IS_SPI_FIRST_BIT | ( | __BIT__ | ) |
(((__BIT__) == SPI_FIRSTBIT_MSB) || \ ((__BIT__) == SPI_FIRSTBIT_LSB))
Checks if SPI MSB LSB transmission parameter is in allowed range.
__BIT__ | specifies the SPI MSB LSB transmission (whether data transfer starts from MSB or LSB bit). This parameter can be a value of SPI MSB LSB Transmission |
None |
Definition at line 699 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_MODE | ( | __MODE__ | ) |
(((__MODE__) == SPI_MODE_SLAVE) || \ ((__MODE__) == SPI_MODE_MASTER))
Checks if SPI Mode parameter is in allowed range.
__MODE__ | specifies the SPI Mode. This parameter can be a value of SPI Mode |
None |
Definition at line 603 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_NSS | ( | __NSS__ | ) |
(((__NSS__) == SPI_NSS_SOFT) || \ ((__NSS__) == SPI_NSS_HARD_INPUT) || \ ((__NSS__) == SPI_NSS_HARD_OUTPUT))
Checks if SPI Slave Select parameter is in allowed range.
__NSS__ | specifies the SPI Slave Slelect management parameter. This parameter can be a value of SPI Slave Select Management |
None |
Definition at line 668 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_NSSP | ( | __NSSP__ | ) |
(((__NSSP__) == SPI_NSS_PULSE_ENABLE) || \ ((__NSSP__) == SPI_NSS_PULSE_DISABLE))
Checks if SPI NSS Pulse parameter is in allowed range.
__NSSP__ | specifies the SPI NSS Pulse Mode parameter. This parameter can be a value of SPI NSS Pulse Mode |
None |
Definition at line 677 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_TIMODE | ( | __MODE__ | ) |
(((__MODE__) == SPI_TIMODE_DISABLE) || \ ((__MODE__) == SPI_TIMODE_ENABLE))
Checks if SPI TI mode parameter is in allowed range.
__MODE__ | specifies the SPI TI mode. This parameter can be a value of SPI TI Mode |
None |
Definition at line 707 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define SPI_1LINE_RX | ( | __HANDLE__ | ) | CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE) |
Set the SPI receive-only mode.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
Definition at line 588 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Receive(), HAL_SPI_Receive_DMA(), and HAL_SPI_Receive_IT().
#define SPI_1LINE_TX | ( | __HANDLE__ | ) | SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE) |
Set the SPI transmit-only mode.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
Definition at line 581 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Transmit(), HAL_SPI_Transmit_DMA(), and HAL_SPI_Transmit_IT().
#define SPI_RESET_CRC | ( | __HANDLE__ | ) |
do{CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_CRCEN);\ SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_CRCEN);}while(0U)
Reset the CRC calculation of the SPI.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
Definition at line 595 of file stm32l4xx_hal_spi.h.
Referenced by HAL_SPI_Receive(), HAL_SPI_Receive_DMA(), HAL_SPI_Receive_IT(), HAL_SPI_Transmit(), HAL_SPI_Transmit_DMA(), HAL_SPI_Transmit_IT(), HAL_SPI_TransmitReceive(), HAL_SPI_TransmitReceive_DMA(), HAL_SPI_TransmitReceive_IT(), SPI_WaitFifoStateUntilTimeout(), and SPI_WaitFlagStateUntilTimeout().