RTEMS 6.1-rc1
Macros

Macros

#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
 Reset SPI handle state. More...
 
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
 Enable 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_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified SPI interrupt source is enabled 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_CLEAR_CRCERRFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_CRCEC)
 Clear the SPI CRCERR 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__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_OVRC)
 Clear the SPI OVR 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_UDRFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_UDRC)
 Clear the SPI UDR 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_TXTFFLAG(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TXTFC)
 Clear the SPI UDR 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_ENABLE(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CR1 , SPI_CR1_SPE)
 Enable the SPI peripheral. More...
 
#define __HAL_SPI_DISABLE(__HANDLE__)   CLEAR_BIT((__HANDLE__)->Instance->CR1 , SPI_CR1_SPE)
 Disable the SPI peripheral. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_SPI_CLEAR_CRCERRFLAG

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

Clear the SPI CRCERR pending flag.

Parameters
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __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
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __HAL_SPI_CLEAR_FREFLAG

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

Clear the SPI FRE pending flag.

Parameters
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __HAL_SPI_CLEAR_MODFFLAG

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

Clear the SPI MODF pending flag.

Parameters
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __HAL_SPI_CLEAR_OVRFLAG

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

Clear the SPI OVR pending flag.

Parameters
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __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
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __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
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __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
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __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
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __HAL_SPI_DISABLE

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

Disable the SPI peripheral.

Parameters
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __HAL_SPI_DISABLE_IT

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

Disable the specified SPI interrupts.

Parameters
__HANDLE__specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
__INTERRUPT__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

◆ __HAL_SPI_ENABLE

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

Enable the SPI peripheral.

Parameters
__HANDLE__specifies the SPI Handle.
Return values
None

◆ __HAL_SPI_ENABLE_IT

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

Enable the specified SPI interrupts.

Parameters
__HANDLE__specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
__INTERRUPT__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

◆ __HAL_SPI_GET_FLAG

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

Check whether the specified SPI flag is set or not.

Parameters
__HANDLE__specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
__FLAG__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).

◆ __HAL_SPI_GET_IT_SOURCE

#define __HAL_SPI_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)
Value:
((((__HANDLE__)->Instance->IER & \
(__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
@ RESET
Definition: xnandpsu_onfi.h:172

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

Parameters
__HANDLE__specifies the SPI Handle. This parameter can be SPI where x: 1, 2, 3, 4, 5 or 6 to select the SPI peripheral.
__INTERRUPT__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).

◆ __HAL_SPI_RESET_HANDLE_STATE

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

Reset SPI handle state.

Parameters
__HANDLE__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