Jump to main content

##

# 2.110.77 SERCOMx_I2C_InterruptFlagsGet Function

## C

    /* x = SERCOM instance number */

    /* I2C slave with interrupt disabled */

    SERCOM_I2C_SLAVE_INTFLAG SERCOMx_I2C_InterruptFlagsGet(void)

## Summary

Returns the SERCOM I2C slave interrupt flags

## Description

This function returns the SERCOM I2C slave interrupt flags

## Precondition

SERCOMx_I2C_Initialize must have been called for the associated SERCOM I2C instance

## Parameters

None

## Returns

Param | Description
--- | ---
SERCOM_I2C_SLAVE_INTFLAG | Enum with possible interrupt flag values

## Example

    SERCOM_I2C_SLAVE_INTFLAG intFlags;

    intFlags = SERCOM0_I2C_InterruptFlagsGet();

    if (intFlags & SERCOM_I2C_SLAVE_INTFLAG_AMATCH)
    {
        // Address match interrupt flag is set
    }
    else if (intFlags & SERCOM_I2C_SLAVE_INTFLAG_DRDY)
    {
        // Data ready interrupt flag is set
    }
    else if (intFlags & SERCOM_I2C_SLAVE_INTFLAG_PREC)
    {
        // Stop bit received interrupt flag is set
    }

## Remarks

This API is available in I2C slave mode