Macros
SPI Exported Macros
Peripheral Driver » HAL Driver » SPI » Defines

## 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, SSI_SSIEN_EN)
| Enable the specified SPI peripheral. More...
#define | __HAL_SPI_DISABLE(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->SSI_EN, SSI_SSIEN_EN)
| Disable the specified SPI peripheral. More...
#define | __HAL_SPI_ENABLE_DMATX(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_TDMAE)
| Enable the SPI DMA TX Request. More...
#define | __HAL_SPI_ENABLE_DMARX(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_RDMAE)
| Enable the SPI DMA RX Request. More...
#define | __HAL_SPI_DISABLE_DMATX(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_TDMAE)
| Disable the SPI DMA TX Request. More...
#define | __HAL_SPI_DISABLE_DMARX(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_RDMAE)
| Disable the SPI DMA RX Request. More...
#define | __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BITS((__HANDLE__)->p_instance->INTMASK, (__INTERRUPT__))
| Enable the specified SPI interrupts. More...
#define | __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BITS((__HANDLE__)->p_instance->INTMASK, (__INTERRUPT__))
| Disable the specified SPI interrupts. More...
#define | __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (READ_BITS((__HANDLE__)->p_instance->INTSTAT, (__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__)) != 0) ? 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: SPI_FLAG_DCOL Data collision error flag SPI_FLAG_TXE Transmission error flag SPI_FLAG_RFF Rx FIFO full flag SPI_FLAG_RFNE Rx FIFO not empty flag SPI_FLAG_TFE Tx FIFO empty flag SPI_FLAG_TFNF Tx FIFO not full flag SPI_FLAG_BUSY Busy flag

Return values

  None |

Definition at line 454 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_DISABLE

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

Disable the specified SPI peripheral.

Parameters

  __HANDLE__ | Specifies the SPI Handle.

Return values

  None |

Definition at line 358 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_DISABLE_DMARX

#define __HAL_SPI_DISABLE_DMARX | ( |  | __HANDLE__ | ) | CLEAR_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_RDMAE)

Disable the SPI DMA RX Request.

Parameters

  __HANDLE__ | Specifies the SPI Handle.

Return values

  None |

Definition at line 382 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_DISABLE_DMATX

#define __HAL_SPI_DISABLE_DMATX | ( |  | __HANDLE__ | ) | CLEAR_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_TDMAE)

Disable the SPI DMA TX Request.

Parameters

  __HANDLE__ | Specifies the SPI Handle.

Return values

  None |

Definition at line 376 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_DISABLE_IT

#define __HAL_SPI_DISABLE_IT | ( |  | __HANDLE__,
|  |  | __INTERRUPT__
| ) |  | CLEAR_BITS((__HANDLE__)->p_instance->INTMASK, (__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: SPI_IT_MST Multi-Master Contention Interrupt enable SPI_IT_RXF Receive FIFO Full Interrupt enable SPI_IT_RXO Receive FIFO Overflow Interrupt enable SPI_IT_RXU Receive FIFO Underflow Interrupt enable SPI_IT_TXO Transmit FIFO Overflow Interrupt enable SPI_IT_TXE Transmit FIFO Empty Interrupt enable

Return values

  None |

Definition at line 410 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_ENABLE

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

Enable the specified SPI peripheral.

Parameters

  __HANDLE__ | Specifies the SPI Handle.

Return values

  None |

Definition at line 352 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_ENABLE_DMARX

#define __HAL_SPI_ENABLE_DMARX | ( |  | __HANDLE__ | ) | SET_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_RDMAE)

Enable the SPI DMA RX Request.

Parameters

  __HANDLE__ | Specifies the SPI Handle.

Return values

  None |

Definition at line 370 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_ENABLE_DMATX

#define __HAL_SPI_ENABLE_DMATX | ( |  | __HANDLE__ | ) | SET_BITS((__HANDLE__)->p_instance->DMAC, SSI_DMAC_TDMAE)

Enable the SPI DMA TX Request.

Parameters

  __HANDLE__ | Specifies the SPI Handle.

Return values

  None |

Definition at line 364 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_ENABLE_IT

#define __HAL_SPI_ENABLE_IT | ( |  | __HANDLE__,
|  |  | __INTERRUPT__
| ) |  | SET_BITS((__HANDLE__)->p_instance->INTMASK, (__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: SPI_IT_MST Multi-Master Contention Interrupt enable SPI_IT_RXF Receive FIFO Full Interrupt enable SPI_IT_RXO Receive FIFO Overflow Interrupt enable SPI_IT_RXU Receive FIFO Underflow Interrupt enable SPI_IT_TXO Transmit FIFO Overflow Interrupt enable SPI_IT_TXE Transmit FIFO Empty Interrupt enable

Return values

  None |

Definition at line 396 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_GET_FLAG

#define __HAL_SPI_GET_FLAG | ( |  | __HANDLE__,
|  |  | __FLAG__
| ) |  | ((READ_BITS((__HANDLE__)->p_instance->STAT, (__FLAG__)) != 0) ? 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: SPI_FLAG_DCOL Data collision error flag SPI_FLAG_TXE Transmission error flag SPI_FLAG_RFF Rx FIFO full flag SPI_FLAG_RFNE Rx FIFO not empty flag SPI_FLAG_TFE Tx FIFO empty flag SPI_FLAG_TFNF Tx FIFO not full flag SPI_FLAG_BUSY Busy flag

Return values

  The | new state of __FLAG__ (TRUE or FALSE).

Definition at line 439 of file gr55xx_hal_spi.h.

## ◆ __HAL_SPI_GET_IT_SOURCE

#define __HAL_SPI_GET_IT_SOURCE | ( |  | __HANDLE__,
|  |  | __INTERRUPT__
| ) |  | (READ_BITS((__HANDLE__)->p_instance->INTSTAT, (__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: SPI_IT_MST Multi-Master Contention Interrupt enable SPI_IT_RXF Receive FIFO Full Interrupt enable SPI_IT_RXO Receive FIFO Overflow Interrupt enable SPI_IT_RXU Receive FIFO Underflow Interrupt enable SPI_IT_TXO Transmit FIFO Overflow Interrupt enable SPI_IT_TXE Transmit FIFO Empty Interrupt enable

Return values

  The | new state of __IT__ (TRUE or FALSE).

Definition at line 424 of file gr55xx_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 346 of file gr55xx_hal_spi.h.