I do not want to modify the output with x=!x and sending out x to the pin. The example seems to be for an OUTPUT drive. I would need an input.
I have an LED connected to the ground at the output of the Arduino Pin2 but I see that the LED glows always which suggests there is a PULL Up on the output pin, Should I explicitly write to GPIO1 bit to get rid of the pull up?