STM32F479xx 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 | SPI_CHECK_FLAG(__SR__, __FLAG__) |
Check whether the specified SPI flag is set or not. | |
#define | SPI_CHECK_IT_SOURCE(__CR2__, __INTERRUPT__) |
Check whether the specified SPI Interrupt is set or not. | |
#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_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_POLYNOMIAL(__POLYNOMIAL__) |
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 591 of file stm32f4xx_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 574 of file stm32f4xx_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 566 of file stm32f4xx_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 621 of file stm32f4xx_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 629 of file stm32f4xx_hal_spi.h.
Referenced by HAL_SPI_Init().
#define IS_SPI_DATASIZE | ( | __DATASIZE__ | ) |
(((__DATASIZE__) == SPI_DATASIZE_16BIT) || \ ((__DATASIZE__) == SPI_DATASIZE_8BIT))
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 558 of file stm32f4xx_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 536 of file stm32f4xx_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 544 of file stm32f4xx_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 550 of file stm32f4xx_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 637 of file stm32f4xx_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 605 of file stm32f4xx_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 528 of file stm32f4xx_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 Select management parameter. This parameter can be a value of SPI Slave Select Management |
None |
Definition at line 582 of file stm32f4xx_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 613 of file stm32f4xx_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 485 of file stm32f4xx_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 478 of file stm32f4xx_hal_spi.h.
Referenced by HAL_SPI_Transmit(), HAL_SPI_Transmit_DMA(), and HAL_SPI_Transmit_IT().
#define SPI_CHECK_FLAG | ( | __SR__, | |
__FLAG__ | |||
) |
((((__SR__) & ((__FLAG__) & SPI_FLAG_MASK)) == \ ((__FLAG__) & SPI_FLAG_MASK)) ? SET : RESET)
Check whether the specified SPI flag is set or not.
__SR__ | copy of SPI SR register. |
__FLAG__ | specifies the flag to check. This parameter can be one of the following values:
|
SET | or RESET. |
Definition at line 508 of file stm32f4xx_hal_spi.h.
Referenced by HAL_SPI_IRQHandler().
#define SPI_CHECK_IT_SOURCE | ( | __CR2__, | |
__INTERRUPT__ | |||
) |
((((__CR2__) & (__INTERRUPT__)) == \ (__INTERRUPT__)) ? SET : RESET)
Check whether the specified SPI Interrupt is set or not.
__CR2__ | copy of SPI CR2 register. |
__INTERRUPT__ | specifies the SPI interrupt source to check. This parameter can be one of the following values:
|
SET | or RESET. |
Definition at line 520 of file stm32f4xx_hal_spi.h.
Referenced by HAL_SPI_IRQHandler().
#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 492 of file stm32f4xx_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(), and SPI_WaitFlagStateUntilTimeout().