Macros | |
#define | __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SPI_STATE_RESET) |
Reset SPI handle state. More... | |
#define | __HAL_SPI_IS_ENABLE_IT(__HANDLE__, __INTERRUPT__) HAL_IS_BIT_SET((__HANDLE__)->Instance->INTE, (__INTERRUPT__)) |
Return true if the specified SPI interrupts is enabled. More... | |
#define | __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
Enable the specified SPI interrupts. More... | |
#define | __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
Disable the specified SPI interrupts. More... | |
#define | __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Check whether the specified SPI interrupt source is enabled or not. More... | |
#define | __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->STATUS) & (__FLAG__)) == (__FLAG__)) |
Check whether the specified SPI flag is set or not. More... | |
#define | __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__) |
Clear the SPI OVR pending flag. More... | |
#define | __HAL_SPI_CLEAR_FREFLAG(__HANDLE__) |
Clear the SPI FRE pending flag. More... | |
#define | __HAL_SPI_CLEAR_UDRFLAG(__HANDLE__) |
Clear the SPI UDR pending flag. More... | |
#define | __HAL_SPI_CLEAR_EXT_ERR_FLAG(__HANDLE__) |
Clear the SPI extend error flag. More... | |
#define | __HAL_SPI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_SSE) |
Enable the SPI peripheral. More... | |
#define | __HAL_SPI_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_SSE) |
Disable the SPI peripheral. More... | |
#define | __HAL_SPI_TAKE_CS(__HANDLE__) SET_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_HOLD_FRAME_LOW) |
Take SPI CS (to low). More... | |
#define | __HAL_SPI_RELEASE_CS(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_HOLD_FRAME_LOW) |
Release SPI CS (to high). More... | |
#define | __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__) |
Clear the SPI MODF pending flag. More... | |
SPI_Exported_Constants
#define __HAL_SPI_CLEAR_EXT_ERR_FLAG | ( | __HANDLE__ | ) |
Clear the SPI extend error flag.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_CLEAR_FREFLAG | ( | __HANDLE__ | ) |
Clear the SPI FRE pending flag.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_CLEAR_MODFFLAG | ( | __HANDLE__ | ) |
Clear the SPI MODF pending flag.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_CLEAR_OVRFLAG | ( | __HANDLE__ | ) |
Clear the SPI OVR pending flag.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_CLEAR_UDRFLAG | ( | __HANDLE__ | ) |
Clear the SPI UDR pending flag.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_DISABLE | ( | __HANDLE__ | ) | CLEAR_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_SSE) |
Disable the SPI peripheral.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
Disable the specified SPI interrupts.
__HANDLE__ | specifies the SPI handle. This parameter can be SPIx where x: 1, 2, or 3 to select the SPI peripheral. |
__INTERRUPT__ | specifies the interrupt source to disable. This parameter can be one of the following values:
|
None |
#define __HAL_SPI_ENABLE | ( | __HANDLE__ | ) | SET_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_SSE) |
Enable the SPI peripheral.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
Enable the specified SPI interrupts.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
__INTERRUPT__ | specifies the interrupt source to enable. This parameter can be one of the following values:
|
None |
#define __HAL_SPI_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((((__HANDLE__)->Instance->STATUS) & (__FLAG__)) == (__FLAG__)) |
Check whether the specified SPI flag is set or not.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
__FLAG__ | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of FLAG (TRUE or FALSE). |
#define __HAL_SPI_GET_IT_SOURCE | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Check whether the specified SPI interrupt source is enabled or not.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
__INTERRUPT__ | specifies the SPI interrupt source to check. This parameter can be one of the following values:
|
The | new state of IT (TRUE or FALSE). |
#define __HAL_SPI_IS_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | HAL_IS_BIT_SET((__HANDLE__)->Instance->INTE, (__INTERRUPT__)) |
Return true if the specified SPI interrupts is enabled.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
__INTERRUPT__ | specifies the interrupt source to enable. This parameter can be one of the following values:
|
None |
#define __HAL_SPI_RELEASE_CS | ( | __HANDLE__ | ) | CLEAR_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_HOLD_FRAME_LOW) |
Release SPI CS (to high).
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_RESET_HANDLE_STATE | ( | __HANDLE__ | ) | ((__HANDLE__)->State = HAL_SPI_STATE_RESET) |
Reset SPI handle state.
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |
#define __HAL_SPI_TAKE_CS | ( | __HANDLE__ | ) | SET_BIT((__HANDLE__)->Instance->TOP_CTRL, SPI_TOP_CTRL_HOLD_FRAME_LOW) |
Take SPI CS (to low).
__HANDLE__ | specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
None |