This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_gpio_cfg_output() and GPIO_PIN_CNF_INPUT_Connect

In this function in nrf_gpio.h, why is there a GPIO_PIN_CNF_INPUT_Connect value there?

Shouldn't that be GPIO_PIN_CNF_INPUT_Disconnect, or does it not really matter?

static __INLINE void nrf_gpio_cfg_output(uint32_t pin_number)
{
    /*lint -e{845} // A zero has been given as right argument to operator '|'" */
    NRF_GPIO->PIN_CNF[pin_number] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)
                                            | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos)
                                            | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos)
                                            | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos)
                                            | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos);
}
Related