Macros

#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->state = HAL_SPI_STATE_RESET)
 Reset SPI handle states. More...
 
#define __HAL_SPI_ENABLE(__HANDLE__)   SET_BITS((__HANDLE__)->p_instance->SSI_EN, SPI_SSI_EN)
 Enable the specified SPI peripheral. More...
 
#define __HAL_SPI_DISABLE(__HANDLE__)   CLEAR_BITS((__HANDLE__)->p_instance->SSI_EN, SPI_SSI_EN)
 Disable the specified SPI peripheral. More...
 
#define __HAL_SPI_ENABLE_DMATX(__HANDLE__)   SET_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_TX_DMA_EN)
 Enable the SPI DMA TX Request. More...
 
#define __HAL_SPI_ENABLE_DMARX(__HANDLE__)   SET_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_RX_DMA_EN)
 Enable the SPI DMA RX Request. More...
 
#define __HAL_SPI_DISABLE_DMATX(__HANDLE__)   CLEAR_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_TX_DMA_EN)
 Disable the SPI DMA TX Request. More...
 
#define __HAL_SPI_DISABLE_DMARX(__HANDLE__)   CLEAR_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_RX_DMA_EN)
 Disable the SPI DMA RX Request. More...
 
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   SET_BITS((__HANDLE__)->p_instance->INT_MASK, (__INTERRUPT__))
 Enable the specified SPI interrupts. More...
 
#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)   CLEAR_BITS((__HANDLE__)->p_instance->INT_MASK, (__INTERRUPT__))
 Disable the specified SPI interrupts. More...
 
#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   (READ_BITS((__HANDLE__)->p_instance->INT_STAT, (__INTERRUPT__)) == (__INTERRUPT__))
 Check whether the specified SPI interrupt source is enabled or not. More...
 
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__)   ((READ_BITS((__HANDLE__)->p_instance->STAT, (__FLAG__)) != 0U) ? SET : RESET)
 Check whether the specified SPI flag is set or not. More...
 
#define __HAL_SPI_CLEAR_FLAG(__HANDLE__, __FLAG__)   READ_BITS((__HANDLE__)->p_instance->STAT, (__FLAG__))
 Clear the specified SPI flag. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_SPI_CLEAR_FLAG

#define __HAL_SPI_CLEAR_FLAG (   __HANDLE__,
  __FLAG__ 
)    READ_BITS((__HANDLE__)->p_instance->STAT, (__FLAG__))

Clear the specified SPI flag.

Parameters
__HANDLE__Specifies the SPI Handle.
__FLAG__Specifies the flag to clear. This parameter can be one of the following values:
Return values
None

Definition at line 536 of file hal_spi.h.

◆ __HAL_SPI_DISABLE

#define __HAL_SPI_DISABLE (   __HANDLE__)    CLEAR_BITS((__HANDLE__)->p_instance->SSI_EN, SPI_SSI_EN)

Disable the specified SPI peripheral.

Parameters
__HANDLE__Specifies the SPI Handle.
Return values
None

Definition at line 431 of file hal_spi.h.

◆ __HAL_SPI_DISABLE_DMARX

#define __HAL_SPI_DISABLE_DMARX (   __HANDLE__)    CLEAR_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_RX_DMA_EN)

Disable the SPI DMA RX Request.

Parameters
__HANDLE__Specifies the SPI Handle.
Return values
None

Definition at line 459 of file hal_spi.h.

◆ __HAL_SPI_DISABLE_DMATX

#define __HAL_SPI_DISABLE_DMATX (   __HANDLE__)    CLEAR_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_TX_DMA_EN)

Disable the SPI DMA TX Request.

Parameters
__HANDLE__Specifies the SPI Handle.
Return values
None

Definition at line 452 of file hal_spi.h.

◆ __HAL_SPI_DISABLE_IT

#define __HAL_SPI_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    CLEAR_BITS((__HANDLE__)->p_instance->INT_MASK, (__INTERRUPT__))

Disable the specified SPI interrupts.

Parameters
__HANDLE__Specifies the SPI handle.
__INTERRUPT__Specifies the interrupt source to disable. This parameter can be one of the following values:
Return values
None

Definition at line 489 of file hal_spi.h.

◆ __HAL_SPI_ENABLE

#define __HAL_SPI_ENABLE (   __HANDLE__)    SET_BITS((__HANDLE__)->p_instance->SSI_EN, SPI_SSI_EN)

Enable the specified SPI peripheral.

Parameters
__HANDLE__Specifies the SPI Handle.
Return values
None

Definition at line 424 of file hal_spi.h.

◆ __HAL_SPI_ENABLE_DMARX

#define __HAL_SPI_ENABLE_DMARX (   __HANDLE__)    SET_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_RX_DMA_EN)

Enable the SPI DMA RX Request.

Parameters
__HANDLE__Specifies the SPI Handle.
Return values
None

Definition at line 445 of file hal_spi.h.

◆ __HAL_SPI_ENABLE_DMATX

#define __HAL_SPI_ENABLE_DMATX (   __HANDLE__)    SET_BITS((__HANDLE__)->p_instance->DMA_CTRL, SPI_DMA_CTRL_TX_DMA_EN)

Enable the SPI DMA TX Request.

Parameters
__HANDLE__Specifies the SPI Handle.
Return values
None

Definition at line 438 of file hal_spi.h.

◆ __HAL_SPI_ENABLE_IT

#define __HAL_SPI_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    SET_BITS((__HANDLE__)->p_instance->INT_MASK, (__INTERRUPT__))

Enable the specified SPI interrupts.

Parameters
__HANDLE__Specifies the SPI Handle.
__INTERRUPT__Specifies the interrupt source to enable. This parameter can be one of the following values:
Return values
None

Definition at line 474 of file hal_spi.h.

◆ __HAL_SPI_GET_FLAG

#define __HAL_SPI_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((READ_BITS((__HANDLE__)->p_instance->STAT, (__FLAG__)) != 0U) ? SET : RESET)

Check whether the specified SPI flag is set or not.

Parameters
__HANDLE__Specifies the SPI Handle.
__FLAG__Specifies the flag to check. This parameter can be one of the following values:
Return values
Thenew state of __FLAG__ (TRUE or FALSE).

Definition at line 520 of file hal_spi.h.

◆ __HAL_SPI_GET_IT_SOURCE

#define __HAL_SPI_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)    (READ_BITS((__HANDLE__)->p_instance->INT_STAT, (__INTERRUPT__)) == (__INTERRUPT__))

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

Parameters
__HANDLE__Specifies the SPI Handle.
__INTERRUPT__Specifies the interrupt source to check. This parameter can be one of the following values:
Return values
Thenew state of __IT__ (TRUE or FALSE).

Definition at line 504 of file hal_spi.h.

◆ __HAL_SPI_RESET_HANDLE_STATE

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

Reset SPI handle states.

Parameters
__HANDLE__SPI handle.
Return values
None

Definition at line 417 of file hal_spi.h.