This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What is the reason to use '!(pinConfig & GPIO_CFG_IN_INT_ONLY)' here?

Other Parts Discussed in Thread: TM4C129XKCZAD

Hi,

I read GPIOTiva.c of TM4C1294 and I don't see the reason behind using the if condition in the code:

GPIO_PinConfig gpioPinConfigs[] = {
    /* Input pins */
    /* EK_TM4C1294XL_USR_SW1 */
    GPIOTiva_PJ_0 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING,
    /* EK_TM4C1294XL_USR_SW2 */
    GPIOTiva_PJ_1 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING,

    /* Output pins */
    /* EK_TM4C1294XL_USR_D1 */
    GPIOTiva_PN_1 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
    /* EK_TM4C1294XL_USR_D2 */
    GPIOTiva_PN_0 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
};
......
/*!
 *  @brief 'Or' in this GPIO_PinConfig definition to inform GPIO_setConfig()
 *  to only configure the interrupt attributes of a GPIO input pin.
 */
#define GPIO_CFG_IN_INT_ONLY       (((uint32_t) 1) << 27)                  /*! configure interrupt only */
......
void GPIO_setConfig(unsigned int index, GPIO_PinConfig pinConfig)
{
    unsigned int   key;
    Error_Block    eb;
    Hwi_Params     hwiParams;
    Hwi_Handle     handle;
    uint32_t       gpioBase;
    uint8_t        gpioDirection;
    uint8_t        gpioPin;
    uint8_t        gpioPortIntIdx;
    uint32_t       gpioPortIntBitMask;
    uint8_t        gpioStrength;
    uint8_t        gpioType;
    uint8_t        gpioTypeIdx;
    GPIO_PinConfig gpioPinConfig;
    PinConfig     *config = (PinConfig *) &GPIOTiva_config.pinConfigs[index];


    gpioBase = getGpioBaseAddr(config->port);
    gpioPin = config->pin;

    if (!(pinConfig & GPIO_CFG_IN_INT_ONLY)) {
        /* Get GPIO configuration settings */

#if defined(TIVAWARE)
        gpioStrength = getGpioStrength(pinConfig);
#endif
        gpioTypeIdx = getGpioTypeIndex(pinConfig);

I have browsed through GPIO chapter of 

Tiva™ TM4C129XKCZAD Microcontroller
DATA SHEET

I want to know the GPIO settings with the source c file. Could you tell me the reason to use that mask (GPIO_CFG_IN_INT_ONLY) in the condition line?

Thanks,