Volt-free contact sensing?

Can the two GPIOs on the Fastrack be used to sense a simple open/close contact?

ie, no externally applied voltage, just the contact connected between the two GPIOs

GPIO4 -------+
             |
             |
             \
              \   Contact
               \
             |
             |
GPIO5 -------+

Could I then set one GPIO as an output, the other as an input, and detect whether the contact is open or closed?

Would I need to drive the output High or Low?

This would rely upon a GPIO set for input giving a defined value when open-circuit, and the other GPIO driving it to the opposite state when the contact closes.
Would this work?

I am doing exactly that since November.
I did some experiments and end up with the following procedure.

  • Configure GPIO5 as OUTPUT and GPIO4 as INPUT.
  • Turn GPIO5 ON (this answers one of you questions)
  • Open/Close the circuit and view result in GPIO4.
    When done this way, the experiment works.

Curiously, If I use GPIO4 and GPIO5 the way around, by some reason, the state of GPIO5 has nothing to do with the state of the field loop.