Macros
Collaboration diagram for SPI Exported Macros:

Macros

#define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__)   ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))
 Clear the SPI CRCERR pending flag. More...
 
#define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__)   ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))
 Clear the SPI CRCERR pending flag. More...
 
#define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__)   ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))
 Clear the SPI CRCERR pending flag. More...
 
#define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_CRCEC)
 Clear the SPI CRCERR pending flag. More...
 
#define __HAL_SPI_CLEAR_EOTFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_EOTC)
 Clear the SPI EOT pending flag. More...
 
#define __HAL_SPI_CLEAR_FREFLAG(__HANDLE__)
 Clear the SPI FRE pending flag. More...
 
#define __HAL_SPI_CLEAR_FREFLAG(__HANDLE__)
 Clear the SPI FRE pending flag. More...
 
#define __HAL_SPI_CLEAR_FREFLAG(__HANDLE__)
 Clear the SPI FRE pending flag. More...
 
#define __HAL_SPI_CLEAR_FREFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TIFREC)
 Clear the SPI FRE pending flag. More...
 
#define __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__)
 Clear the SPI MODF pending flag. More...
 
#define __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__)
 Clear the SPI MODF pending flag. More...
 
#define __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__)
 Clear the SPI MODF pending flag. More...
 
#define __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , (uint32_t)(SPI_IFCR_MODFC));
 Clear the SPI MODF pending flag. More...
 
#define __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__)
 Clear the SPI OVR pending flag. More...
 
#define __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__)
 Clear the SPI OVR pending flag. More...
 
#define __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__)
 Clear the SPI OVR pending flag. More...
 
#define __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_OVRC)
 Clear the SPI OVR pending flag. More...
 
#define __HAL_SPI_CLEAR_SUSPFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_SUSPC)
 Clear the SPI SUSP pending flag. More...
 
#define __HAL_SPI_CLEAR_TSERFFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TSERFC)
 Clear the SPI TSERF pending flag. More...
 
#define __HAL_SPI_CLEAR_TXTFFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TXTFC)
 Clear the SPI UDR pending flag. More...
 
#define __HAL_SPI_CLEAR_UDRFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_UDRC)
 Clear the SPI UDR pending flag. More...
 
#define __HAL_SPI_DISABLE(__HANDLE__)   CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
 Disable the SPI peripheral. More...
 
#define __HAL_SPI_DISABLE(__HANDLE__)   CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
 Disable the SPI peripheral. More...
 
#define __HAL_SPI_DISABLE(__HANDLE__)   CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
 Disable the SPI peripheral. More...
 
#define __HAL_SPI_DISABLE(__HANDLE__)   CLEAR_BIT((__HANDLE__)->Instance->CR1 , SPI_CR1_SPE)
 Disable the SPI peripheral. More...
 
#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)   CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
 Disable the specified SPI interrupts. More...
 
#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)   CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
 Disable the specified SPI interrupts. More...
 
#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)   CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
 Disable the specified SPI interrupts. More...
 
#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->IER &= (~(__INTERRUPT__)))
 Disable the specified SPI interrupts. More...
 
#define __HAL_SPI_ENABLE(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
 Enable the SPI peripheral. More...
 
#define __HAL_SPI_ENABLE(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
 Enable the SPI peripheral. More...
 
#define __HAL_SPI_ENABLE(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
 Enable the SPI peripheral. More...
 
#define __HAL_SPI_ENABLE(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CR1 , SPI_CR1_SPE)
 Enable the SPI peripheral. More...
 
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
 Enable the specified SPI interrupts. More...
 
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
 Enable the specified SPI interrupts. More...
 
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
 Enable the specified SPI interrupts. More...
 
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
 Enable the specified SPI interrupts. More...
 
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__)   ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
 Check whether the specified SPI flag is set or not. More...
 
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__)   ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
 Check whether the specified SPI flag is set or not. More...
 
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__)   ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
 Check whether the specified SPI flag is set or not. More...
 
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__)   ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
 Check whether the specified SPI flag is set or not. More...
 
#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified SPI interrupt source is enabled or not. More...
 
#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified SPI interrupt source is enabled or not. More...
 
#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
 Check whether the specified SPI interrupt source is enabled or not. More...
 
#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
 Check whether the specified SPI interrupt source is enabled or not. More...
 
#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
 Reset SPI handle state. More...
 
#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
 Reset SPI handle state. More...
 
#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
 Reset SPI handle state. More...
 
#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
 Reset SPI handle state. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_SPI_CLEAR_CRCERRFLAG [1/4]

#define __HAL_SPI_CLEAR_CRCERRFLAG (   __HANDLE__)    ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))

Clear the SPI CRCERR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 410 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_CRCERRFLAG [2/4]

#define __HAL_SPI_CLEAR_CRCERRFLAG (   __HANDLE__)    ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))

Clear the SPI CRCERR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 410 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_CRCERRFLAG [3/4]

#define __HAL_SPI_CLEAR_CRCERRFLAG (   __HANDLE__)    ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))

Clear the SPI CRCERR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 497 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_CRCERRFLAG [4/4]

#define __HAL_SPI_CLEAR_CRCERRFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_CRCEC)

Clear the SPI CRCERR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 759 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_EOTFLAG

#define __HAL_SPI_CLEAR_EOTFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_EOTC)

Clear the SPI EOT pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 789 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_FREFLAG [1/4]

#define __HAL_SPI_CLEAR_FREFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_fre = 0x00U; \
tmpreg_fre = (__HANDLE__)->Instance->SR; \
UNUSED(tmpreg_fre); \
}while(0U)

Clear the SPI FRE pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 443 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_FREFLAG [2/4]

#define __HAL_SPI_CLEAR_FREFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_fre = 0x00U; \
tmpreg_fre = (__HANDLE__)->Instance->SR; \
UNUSED(tmpreg_fre); \
}while(0U)

Clear the SPI FRE pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 443 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_FREFLAG [3/4]

#define __HAL_SPI_CLEAR_FREFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_fre = 0x00U; \
tmpreg_fre = (__HANDLE__)->Instance->SR; \
UNUSED(tmpreg_fre); \
}while(0U)

Clear the SPI FRE pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 530 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_FREFLAG [4/4]

#define __HAL_SPI_CLEAR_FREFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TIFREC)

Clear the SPI FRE pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 777 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_MODFFLAG [1/4]

#define __HAL_SPI_CLEAR_MODFFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_modf = 0x00U; \
tmpreg_modf = (__HANDLE__)->Instance->SR; \
CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE); \
UNUSED(tmpreg_modf); \
} while(0U)

Clear the SPI MODF pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 417 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_MODFFLAG [2/4]

#define __HAL_SPI_CLEAR_MODFFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_modf = 0x00U; \
tmpreg_modf = (__HANDLE__)->Instance->SR; \
CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE); \
UNUSED(tmpreg_modf); \
} while(0U)

Clear the SPI MODF pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 417 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_MODFFLAG [3/4]

#define __HAL_SPI_CLEAR_MODFFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_modf = 0x00U; \
tmpreg_modf = (__HANDLE__)->Instance->SR; \
CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE); \
UNUSED(tmpreg_modf); \
} while(0U)

Clear the SPI MODF pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 504 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_MODFFLAG [4/4]

#define __HAL_SPI_CLEAR_MODFFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , (uint32_t)(SPI_IFCR_MODFC));

Clear the SPI MODF pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 765 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_OVRFLAG [1/4]

#define __HAL_SPI_CLEAR_OVRFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_ovr = 0x00U; \
tmpreg_ovr = (__HANDLE__)->Instance->DR; \
tmpreg_ovr = (__HANDLE__)->Instance->SR; \
UNUSED(tmpreg_ovr); \
} while(0U)

Clear the SPI OVR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 430 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_OVRFLAG [2/4]

#define __HAL_SPI_CLEAR_OVRFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_ovr = 0x00U; \
tmpreg_ovr = (__HANDLE__)->Instance->DR; \
tmpreg_ovr = (__HANDLE__)->Instance->SR; \
UNUSED(tmpreg_ovr); \
} while(0U)

Clear the SPI OVR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 430 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_OVRFLAG [3/4]

#define __HAL_SPI_CLEAR_OVRFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg_ovr = 0x00U; \
tmpreg_ovr = (__HANDLE__)->Instance->DR; \
tmpreg_ovr = (__HANDLE__)->Instance->SR; \
UNUSED(tmpreg_ovr); \
} while(0U)

Clear the SPI OVR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 517 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_OVRFLAG [4/4]

#define __HAL_SPI_CLEAR_OVRFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_OVRC)

Clear the SPI OVR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 771 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_SUSPFLAG

#define __HAL_SPI_CLEAR_SUSPFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_SUSPC)

Clear the SPI SUSP pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 801 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_TSERFFLAG

#define __HAL_SPI_CLEAR_TSERFFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TSERFC)

Clear the SPI TSERF pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 807 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_TXTFFLAG

#define __HAL_SPI_CLEAR_TXTFFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TXTFC)

Clear the SPI UDR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 795 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_CLEAR_UDRFLAG

#define __HAL_SPI_CLEAR_UDRFLAG (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_UDRC)

Clear the SPI UDR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 783 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_DISABLE [1/4]

#define __HAL_SPI_DISABLE (   __HANDLE__)    CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)

Disable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 462 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_DISABLE [2/4]

#define __HAL_SPI_DISABLE (   __HANDLE__)    CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)

Disable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 462 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_DISABLE [3/4]

#define __HAL_SPI_DISABLE (   __HANDLE__)    CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)

Disable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 549 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_DISABLE [4/4]

#define __HAL_SPI_DISABLE (   __HANDLE__)    CLEAR_BIT((__HANDLE__)->Instance->CR1 , SPI_CR1_SPE)

Disable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 819 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_DISABLE_IT [1/4]

#define __HAL_SPI_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))

Disable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI handle. This parameter can be SPIx where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to disable. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
None

Definition at line 374 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_DISABLE_IT [2/4]

#define __HAL_SPI_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))

Disable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI handle. This parameter can be SPIx where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to disable. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
None

Definition at line 374 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_DISABLE_IT [3/4]

#define __HAL_SPI_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))

Disable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI handle. This parameter can be SPIx where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to disable. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
None

Definition at line 460 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_DISABLE_IT [4/4]

#define __HAL_SPI_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    ((__HANDLE__)->Instance->IER &= (~(__INTERRUPT__)))

Disable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to enable or disable. This parameter can be one of the following values:
  • SPI_IT_RXP : Rx-Packet available interrupt
  • SPI_IT_TXP : Tx-Packet space available interrupt
  • SPI_IT_DXP : Duplex Packet interrupt
  • SPI_IT_EOT : End of transfer interrupt
  • SPI_IT_TXTF : Transmission Transfer Filled interrupt
  • SPI_IT_UDR : Underrun interrupt
  • SPI_IT_OVR : Overrun interrupt
  • SPI_IT_CRCERR : CRC error interrupt
  • SPI_IT_FRE : TI mode frame format error interrupt
  • SPI_IT_MODF : Mode fault interrupt
  • SPI_IT_TSERF : Additional number of data reloaded interrupt
  • SPI_IT_ERR : Error interrupt
Return values
None

Definition at line 708 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_ENABLE [1/4]

#define __HAL_SPI_ENABLE (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)

Enable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 455 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_ENABLE [2/4]

#define __HAL_SPI_ENABLE (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)

Enable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 455 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_ENABLE [3/4]

#define __HAL_SPI_ENABLE (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)

Enable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 542 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_ENABLE [4/4]

#define __HAL_SPI_ENABLE (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->CR1 , SPI_CR1_SPE)

Enable the SPI peripheral.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle.
Return values
None

Definition at line 813 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_ENABLE_IT [1/4]

#define __HAL_SPI_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))

Enable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to enable. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
None

Definition at line 362 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_ENABLE_IT [2/4]

#define __HAL_SPI_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))

Enable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to enable. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
None

Definition at line 362 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_ENABLE_IT [3/4]

#define __HAL_SPI_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))

Enable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to enable. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
None

Definition at line 448 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_ENABLE_IT [4/4]

#define __HAL_SPI_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))

Enable the specified SPI interrupts.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to enable or disable. This parameter can be one of the following values:
  • SPI_IT_RXP : Rx-Packet available interrupt
  • SPI_IT_TXP : Tx-Packet space available interrupt
  • SPI_IT_DXP : Duplex Packet interrupt
  • SPI_IT_EOT : End of transfer interrupt
  • SPI_IT_TXTF : Transmission Transfer Filled interrupt
  • SPI_IT_UDR : Underrun interrupt
  • SPI_IT_OVR : Overrun interrupt
  • SPI_IT_CRCERR : CRC error interrupt
  • SPI_IT_FRE : TI mode frame format error interrupt
  • SPI_IT_MODF : Mode fault interrupt
  • SPI_IT_TSERF : Additional number of data reloaded interrupt
  • SPI_IT_ERR : Error interrupt
Return values
None

Definition at line 687 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_GET_FLAG [1/4]

#define __HAL_SPI_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Check whether the specified SPI flag is set or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • SPI_FLAG_RXNE: Receive buffer not empty flag
  • SPI_FLAG_TXE: Transmit buffer empty flag
  • SPI_FLAG_CRCERR: CRC error flag
  • SPI_FLAG_MODF: Mode fault flag
  • SPI_FLAG_OVR: Overrun flag
  • SPI_FLAG_BSY: Busy flag
  • SPI_FLAG_FRE: Frame format error flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 403 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_GET_FLAG [2/4]

#define __HAL_SPI_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Check whether the specified SPI flag is set or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • SPI_FLAG_RXNE: Receive buffer not empty flag
  • SPI_FLAG_TXE: Transmit buffer empty flag
  • SPI_FLAG_CRCERR: CRC error flag
  • SPI_FLAG_MODF: Mode fault flag
  • SPI_FLAG_OVR: Overrun flag
  • SPI_FLAG_BSY: Busy flag
  • SPI_FLAG_FRE: Frame format error flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 403 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_GET_FLAG [3/4]

#define __HAL_SPI_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Check whether the specified SPI flag is set or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • SPI_FLAG_RXNE: Receive buffer not empty flag
  • SPI_FLAG_TXE: Transmit buffer empty flag
  • SPI_FLAG_CRCERR: CRC error flag
  • SPI_FLAG_MODF: Mode fault flag
  • SPI_FLAG_OVR: Overrun flag
  • SPI_FLAG_BSY: Busy flag
  • SPI_FLAG_FRE: Frame format error flag
  • SPI_FLAG_FTLVL: SPI fifo transmission level
  • SPI_FLAG_FRLVL: SPI fifo reception level
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 490 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_GET_FLAG [4/4]

#define __HAL_SPI_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Check whether the specified SPI flag is set or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • SPI_FLAG_RXP : Rx-Packet available flag
  • SPI_FLAG_TXP : Tx-Packet space available flag
  • SPI_FLAG_DXP : Duplex Packet flag
  • SPI_FLAG_EOT : End of transfer flag
  • SPI_FLAG_TXTF : Transmission Transfer Filled flag
  • SPI_FLAG_UDR : Underrun flag
  • SPI_FLAG_OVR : Overrun flag
  • SPI_FLAG_CRCERR : CRC error flag
  • SPI_FLAG_FRE : TI mode frame format error flag
  • SPI_FLAG_MODF : Mode fault flag
  • SPI_FLAG_TSERF : Additional number of data reloaded flag
  • SPI_FLAG_SUSP : Transfer suspend complete flag
  • SPI_FLAG_TXC : TxFIFO transmission complete flag
  • SPI_FLAG_FRLVL : Fifo reception level flag
  • SPI_FLAG_RXWNE : RxFIFO word not empty flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 753 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_GET_IT_SOURCE [1/4]

#define __HAL_SPI_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)
Value:
((((__HANDLE__)->Instance->CR2\
& (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Check whether the specified SPI interrupt source is enabled or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the SPI interrupt source to check. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 386 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_GET_IT_SOURCE [2/4]

#define __HAL_SPI_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)
Value:
((((__HANDLE__)->Instance->CR2\
& (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Check whether the specified SPI interrupt source is enabled or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the SPI interrupt source to check. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 386 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_GET_IT_SOURCE [3/4]

#define __HAL_SPI_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)    ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Check whether the specified SPI interrupt source is enabled or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the SPI interrupt source to check. This parameter can be one of the following values:
  • SPI_IT_TXE: Tx buffer empty interrupt enable
  • SPI_IT_RXNE: RX buffer not empty interrupt enable
  • SPI_IT_ERR: Error interrupt enable
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 472 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_GET_IT_SOURCE [4/4]

#define __HAL_SPI_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)    ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Check whether the specified SPI interrupt source is enabled or not.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
<strong>INTERRUPT</strong>specifies the SPI interrupt source to check. This parameter can be one of the following values:
  • SPI_IT_RXP : Rx-Packet available interrupt
  • SPI_IT_TXP : Tx-Packet space available interrupt
  • SPI_IT_DXP : Duplex Packet interrupt
  • SPI_IT_EOT : End of transfer interrupt
  • SPI_IT_TXTF : Transmission Transfer Filled interrupt
  • SPI_IT_UDR : Underrun interrupt
  • SPI_IT_OVR : Overrun interrupt
  • SPI_IT_CRCERR : CRC error interrupt
  • SPI_IT_FRE : TI mode frame format error interrupt
  • SPI_IT_MODF : Mode fault interrupt
  • SPI_IT_TSERF : Additional number of data reloaded interrupt
  • SPI_IT_ERR : Error interrupt
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 729 of file stm32h7xx_hal_spi.h.

◆ __HAL_SPI_RESET_HANDLE_STATE [1/4]

#define __HAL_SPI_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_SPI_STATE_RESET)

Reset SPI handle state.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 349 of file stm32f411/stm32f411e-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_RESET_HANDLE_STATE [2/4]

#define __HAL_SPI_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_SPI_STATE_RESET)

Reset SPI handle state.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 349 of file stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h.

◆ __HAL_SPI_RESET_HANDLE_STATE [3/4]

#define __HAL_SPI_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_SPI_STATE_RESET)

Reset SPI handle state.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
Return values
None

Definition at line 435 of file stm32f7xx_hal_spi.h.

◆ __HAL_SPI_RESET_HANDLE_STATE [4/4]

#define __HAL_SPI_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_SPI_STATE_RESET)

Reset SPI handle state.

Parameters
<strong>HANDLE</strong>specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
Return values
None

Definition at line 665 of file stm32h7xx_hal_spi.h.

CLEAR_BIT
#define CLEAR_BIT(REG, BIT)
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:214
UNUSED
#define UNUSED(x)
Definition: porcupine/demo/c/dr_libs/old/dr.h:92
SPI_CR1_SPE
#define SPI_CR1_SPE
Definition: stm32f407xx.h:11459
RESET
@ RESET
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:187
SET
@ SET
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:188


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:07