Macros
Collaboration diagram for CAN Exported Macros:

Macros

#define __HAL_CAN_CANCEL_TRANSMIT(__HANDLE__, __TRANSMITMAILBOX__)
 Cancel a transmit request. More...
 
#define __HAL_CAN_CLEAR_FLAG(__HANDLE__, __FLAG__)
 Clear the specified CAN pending flag. More...
 
#define __HAL_CAN_DBG_FREEZE(__HANDLE__, __NEWSTATE__)
 Enable or disable the DBG Freeze for CAN. More...
 
#define __HAL_CAN_DISABLE_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->IER) &= ~(__INTERRUPT__))
 Disable the specified CAN interrupts. More...
 
#define __HAL_CAN_ENABLE_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->IER) |= (__INTERRUPT__))
 Enable the specified CAN interrupts. More...
 
#define __HAL_CAN_FIFO_RELEASE(__HANDLE__, __FIFONUMBER__)
 Release the specified receive FIFO. More...
 
#define __HAL_CAN_GET_FLAG(__HANDLE__, __FLAG__)
 Check whether the specified CAN flag is set or not. More...
 
#define __HAL_CAN_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
 Check if the specified CAN interrupt source is enabled or disabled. More...
 
#define __HAL_CAN_MSG_PENDING(__HANDLE__, __FIFONUMBER__)
 Return the number of pending received messages. More...
 
#define __HAL_CAN_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_CAN_STATE_RESET)
 Reset CAN handle state. More...
 
#define __HAL_CAN_TRANSMIT_STATUS(__HANDLE__, __TRANSMITMAILBOX__)
 Check the transmission status of a CAN Frame. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_CAN_CANCEL_TRANSMIT

#define __HAL_CAN_CANCEL_TRANSMIT (   __HANDLE__,
  __TRANSMITMAILBOX__ 
)
Value:
(((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((__HANDLE__)->Instance->TSR = CAN_TSR_ABRQ0) :\
((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((__HANDLE__)->Instance->TSR = CAN_TSR_ABRQ1) :\
((__HANDLE__)->Instance->TSR = CAN_TSR_ABRQ2))

Cancel a transmit request.

Parameters
<strong>HANDLE</strong>CAN Handle
<strong>TRANSMITMAILBOX</strong>the number of the mailbox that is used for transmission.
Return values
None

Definition at line 617 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_CLEAR_FLAG

#define __HAL_CAN_CLEAR_FLAG (   __HANDLE__,
  __FLAG__ 
)
Value:
((((__FLAG__) >> 8U) == 5U)? (((__HANDLE__)->Instance->TSR) = (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
(((__FLAG__) >> 8U) == 2U)? (((__HANDLE__)->Instance->RF0R) = (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
(((__FLAG__) >> 8U) == 4U)? (((__HANDLE__)->Instance->RF1R) = (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
(((__HANDLE__)->Instance->MSR) = (1U << ((__FLAG__) & CAN_FLAG_MASK))))

Clear the specified CAN pending flag.

Parameters
<strong>HANDLE</strong>CAN Handle.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • CAN_TSR_RQCP0: Request MailBox0 Flag
  • CAN_TSR_RQCP1: Request MailBox1 Flag
  • CAN_TSR_RQCP2: Request MailBox2 Flag
  • CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag
  • CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag
  • CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag
  • CAN_FLAG_TME0: Transmit mailbox 0 empty Flag
  • CAN_FLAG_TME1: Transmit mailbox 1 empty Flag
  • CAN_FLAG_TME2: Transmit mailbox 2 empty Flag
  • CAN_FLAG_FMP0: FIFO 0 Message Pending Flag
  • CAN_FLAG_FF0: FIFO 0 Full Flag
  • CAN_FLAG_FOV0: FIFO 0 Overrun Flag
  • CAN_FLAG_FMP1: FIFO 1 Message Pending Flag
  • CAN_FLAG_FF1: FIFO 1 Full Flag
  • CAN_FLAG_FOV1: FIFO 1 Overrun Flag
  • CAN_FLAG_WKU: Wake up Flag
  • CAN_FLAG_SLAK: Sleep acknowledge Flag
  • CAN_FLAG_SLAKI: Sleep acknowledge Flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 574 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_DBG_FREEZE

#define __HAL_CAN_DBG_FREEZE (   __HANDLE__,
  __NEWSTATE__ 
)
Value:
(((__NEWSTATE__) == ENABLE)? \
((__HANDLE__)->Instance->MCR |= CAN_MCR_DBF) : ((__HANDLE__)->Instance->MCR &= ~CAN_MCR_DBF))

Enable or disable the DBG Freeze for CAN.

Parameters
<strong>HANDLE</strong>CAN Handle
<strong>NEWSTATE</strong>new state of the CAN peripheral. This parameter can be: ENABLE (CAN reception/transmission is frozen during debug. Reception FIFOs can still be accessed/controlled normally) or DISABLE (CAN is working during debug).
Return values
None

Definition at line 631 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_DISABLE_IT

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

Disable the specified CAN interrupts.

Parameters
<strong>HANDLE</strong>CAN handle
<strong>INTERRUPT</strong>CAN Interrupt
Return values
None

Definition at line 505 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_ENABLE_IT

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

Enable the specified CAN interrupts.

Parameters
<strong>HANDLE</strong>CAN handle
<strong>INTERRUPT</strong>CAN Interrupt
Return values
None

Definition at line 497 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_FIFO_RELEASE

#define __HAL_CAN_FIFO_RELEASE (   __HANDLE__,
  __FIFONUMBER__ 
)
Value:
(((__FIFONUMBER__) == CAN_FIFO0)? \
((__HANDLE__)->Instance->RF0R = CAN_RF0R_RFOM0) : ((__HANDLE__)->Instance->RF1R = CAN_RF1R_RFOM1))

Release the specified receive FIFO.

Parameters
<strong>HANDLE</strong>CAN handle
<strong>FIFONUMBER</strong>Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
Return values
None

Definition at line 608 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_GET_FLAG

#define __HAL_CAN_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)
Value:
((((__FLAG__) >> 8U) == 5U)? ((((__HANDLE__)->Instance->TSR) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
(((__FLAG__) >> 8U) == 2U)? ((((__HANDLE__)->Instance->RF0R) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
(((__FLAG__) >> 8U) == 4U)? ((((__HANDLE__)->Instance->RF1R) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
(((__FLAG__) >> 8U) == 1U)? ((((__HANDLE__)->Instance->MSR) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
((((__HANDLE__)->Instance->ESR) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))))

Check whether the specified CAN flag is set or not.

Parameters
<strong>HANDLE</strong>CAN Handle
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • CAN_TSR_RQCP0: Request MailBox0 Flag
  • CAN_TSR_RQCP1: Request MailBox1 Flag
  • CAN_TSR_RQCP2: Request MailBox2 Flag
  • CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag
  • CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag
  • CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag
  • CAN_FLAG_TME0: Transmit mailbox 0 empty Flag
  • CAN_FLAG_TME1: Transmit mailbox 1 empty Flag
  • CAN_FLAG_TME2: Transmit mailbox 2 empty Flag
  • CAN_FLAG_FMP0: FIFO 0 Message Pending Flag
  • CAN_FLAG_FF0: FIFO 0 Full Flag
  • CAN_FLAG_FOV0: FIFO 0 Overrun Flag
  • CAN_FLAG_FMP1: FIFO 1 Message Pending Flag
  • CAN_FLAG_FF1: FIFO 1 Full Flag
  • CAN_FLAG_FOV1: FIFO 1 Overrun Flag
  • CAN_FLAG_WKU: Wake up Flag
  • CAN_FLAG_SLAK: Sleep acknowledge Flag
  • CAN_FLAG_SLAKI: Sleep acknowledge Flag
  • CAN_FLAG_EWG: Error Warning Flag
  • CAN_FLAG_EPV: Error Passive Flag
  • CAN_FLAG_BOF: Bus-Off Flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 543 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_GET_IT_SOURCE

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

Check if the specified CAN interrupt source is enabled or disabled.

Parameters
<strong>HANDLE</strong>CAN Handle
<strong>INTERRUPT</strong>specifies the CAN interrupt source to check. This parameter can be one of the following values:
  • CAN_IT_TME: Transmit mailbox empty interrupt enable
  • CAN_IT_FMP0: FIFO0 message pending interrupt enable
  • CAN_IT_FMP1: FIFO1 message pending interrupt enable
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 589 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_MSG_PENDING

#define __HAL_CAN_MSG_PENDING (   __HANDLE__,
  __FIFONUMBER__ 
)
Value:
(((__FIFONUMBER__) == CAN_FIFO0)? \
((uint8_t)((__HANDLE__)->Instance->RF0R&0x03U)) : ((uint8_t)((__HANDLE__)->Instance->RF1R&0x03U)))

Return the number of pending received messages.

Parameters
<strong>HANDLE</strong>CAN handle
<strong>FIFONUMBER</strong>Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
Return values
Thenumber of pending message.

Definition at line 513 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_RESET_HANDLE_STATE

#define __HAL_CAN_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_CAN_STATE_RESET)

Reset CAN handle state.

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

Definition at line 489 of file stm32f7xx_hal_can_legacy.h.

◆ __HAL_CAN_TRANSMIT_STATUS

#define __HAL_CAN_TRANSMIT_STATUS (   __HANDLE__,
  __TRANSMITMAILBOX__ 
)
Value:
(((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP0 | CAN_TSR_TXOK0 | CAN_TSR_TME0)) == (CAN_TSR_RQCP0 | CAN_TSR_TXOK0 | CAN_TSR_TME0)) :\
((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP1 | CAN_TSR_TXOK1 | CAN_TSR_TME1)) == (CAN_TSR_RQCP1 | CAN_TSR_TXOK1 | CAN_TSR_TME1)) :\
((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)) == (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)))

Check the transmission status of a CAN Frame.

Parameters
<strong>HANDLE</strong>CAN Handle
<strong>TRANSMITMAILBOX</strong>the number of the mailbox that is used for transmission.
Return values
Thenew status of transmission (TRUE or FALSE).

Definition at line 597 of file stm32f7xx_hal_can_legacy.h.

CAN_TXMAILBOX_0
#define CAN_TXMAILBOX_0
Definition: stm32f7xx_hal_can_legacy.h:469
CAN_TSR_RQCP2
#define CAN_TSR_RQCP2
Definition: stm32f407xx.h:1858
CAN_TSR_TXOK0
#define CAN_TSR_TXOK0
Definition: stm32f407xx.h:1831
CAN_TSR_TME1
#define CAN_TSR_TME1
Definition: stm32f407xx.h:1883
ENABLE
@ ENABLE
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:194
CAN_TSR_ABRQ1
#define CAN_TSR_ABRQ1
Definition: stm32f407xx.h:1855
CAN_RF1R_RFOM1
#define CAN_RF1R_RFOM1
Definition: stm32f407xx.h:1927
CAN_FIFO0
#define CAN_FIFO0
Definition: stm32f7xx_hal_can_legacy.h:389
CAN_TSR_TXOK2
#define CAN_TSR_TXOK2
Definition: stm32f407xx.h:1861
CAN_TSR_ABRQ0
#define CAN_TSR_ABRQ0
Definition: stm32f407xx.h:1840
CAN_RF0R_RFOM0
#define CAN_RF0R_RFOM0
Definition: stm32f407xx.h:1913
CAN_TSR_TME0
#define CAN_TSR_TME0
Definition: stm32f407xx.h:1880
CAN_TSR_ABRQ2
#define CAN_TSR_ABRQ2
Definition: stm32f407xx.h:1870
CAN_FLAG_MASK
#define CAN_FLAG_MASK
Definition: stm32f7xx_hal_can_legacy.h:711
CAN_TSR_TME2
#define CAN_TSR_TME2
Definition: stm32f407xx.h:1886
CAN_MCR_DBF
#define CAN_MCR_DBF
Definition: stm32f407xx.h:1795
CAN_TXMAILBOX_1
#define CAN_TXMAILBOX_1
Definition: stm32f7xx_hal_can_legacy.h:470
CAN_TSR_RQCP1
#define CAN_TSR_RQCP1
Definition: stm32f407xx.h:1843
CAN_TSR_TXOK1
#define CAN_TSR_TXOK1
Definition: stm32f407xx.h:1846
CAN_TSR_RQCP0
#define CAN_TSR_RQCP0
Definition: stm32f407xx.h:1828


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