Jump to main content

# 3.3.4.20 EMAFE_EnableInterrupt Function

## C

    void EMAFE_EnableInterrupt (uint32_t mask);

## Summary

Sets the interrupt source of the EMAFE peripheral.

## Description

Enables interrupt sources. The mask parameter can combine different interrupt sources.

## Precondition

EMAFE callback function must be previously registered.

## Parameters

Parameters | Description
--- | ---
mask | Bit mask to indicate the interrupts to be enabled

## Returns

None.

## Example

    EMAFE_CallbackRegister(_appEmafeCallback);
    EMAFE_EnableFilter(EMAFE_MR_LPF_ON2_Msk);
    EMAFE_EnableDMAChannel(EMAFE_MR_DMACH2_Msk);
    EMAFE_DMATransfer(false, EMAFE_PTCR_RXTDIS_Msk);
    EMAFE_DMASetup(pSamplesBuffer, APP_SAMPLE_CHANNELS, NULL, 0);
    EMAFE_DMATransfer(true, EMAFE_PTCR_RXTEN_Msk);
    EMAFE_EnableInterrupt(EMAFE_IER_ENDRX_Msk);

## Remarks

Mask Value | Description
--- | ---
EMAFE_IER_DRDY_Msk | Data Ready Interrupt Enable
EMAFE_IER_RXUDR_Msk | Receive Underflow Flow Interrupt Enable
EMAFE_IER_RXFULL_Msk | Receive FIFO Full Interrupt Enable
EMAFE_IER_RXEMPTY_Msk | Receive FIFO Empty Interrupt Enable
EMAFE_IER_CHCHG_Msk | Channel Data Change Interrupt Enable
EMAFE_IER_CHDIFF_Msk | Comparison Flag Interrupt Enable
EMAFE_IER_PARERROR_Msk | Parity Error Interrupt Enable
EMAFE_IER_ENDRX_Msk | PDC Receive Transfer End Interrupt Enable
EMAFE_IER_RXBUFF_Msk | PDC Receive Buffer Full Interrupt Enable
EMAFE_IER_CHAEVT_Msk | Channel A Event Interrupt Enable
EMAFE_IER_CHBEVT_Msk | Channel B Event Interrupt Enable

Rev: E