K 10 svn:author V 3 ian K 8 svn:date V 27 2017-06-28T20:28:47.083507Z K 7 svn:log V 445 Implement gpio input by reading the pad state register, not the data register. When a pin is set for input the value in the DR will be the same as the PSR. When a pin is set for output the value in the DR is the value output to the pad, and the value in the PSR is the actual electrical level sensed on the pad, and they can be different if the pad is configured for open-drain mode and some other entity on the board is driving the line low. END