1.9.3.14 CANx_InterruptGet Function

C

The prototype of CANx_InterruptGet() varies based on device family. Refer to the generated header file for the actual prototype to be used.

bool CANx_InterruptGet(uint8_t fifoNum, CAN_FIFO_INTERRUPT_FLAG_MASK fifoInterruptFlagMask) // x - Instance of the CAN peripheral

bool CANx_InterruptGet(uint8_t fifoQueueNum, CANFD_FIFO_INTERRUPT_FLAG_MASK fifoInterruptFlagMask) // x - Instance of the CAN peripheral

bool CANx_InterruptGet(CAN_INTERRUPT_MASK interruptMask) // x - Instance of the CAN peripheral

Summary

Returns the Interrupt status.

Description

This routine returns the Interrupt status.

Precondition

CANx_Initialize must have been called for the associated CAN instance.

Parameters

Param Description
fifoNum FIFO number
fifoQueueNum FIFO/Queue number
fifoInterruptFlagMask FIFO interrupt flag mask
interruptMask Interrupt source number

Returns

true - Requested interrupt is occurred.

false - Requested interrupt is not occurred.

Example

if (CAN1_InterruptGet(1, CAN_FIFO_INTERRUPT_RXNEMPTYIF_MASK))
{
    // Interrupt occurred
}
if (CAN1_InterruptGet(1, CANFD_FIFO_INTERRUPT_TFNRFNIF_MASK))
{
    // Interrupt occurred
}
CAN_INTERRUPT_MASK interruptMask = CAN_INTERRUPT_RF0W_MASK;
if (CAN0_InterruptGet(interruptMask))
{
}
CAN_INTERRUPT_MASK interruptMask = CAN_INTERRUPT_MB0_MASK;
if (CAN0_InterruptGet(interruptMask))
{
    // Interrupt occurred
}

Remarks

None.