Add getmode() function
A Python module to control the GPIO on a Raspberry Pi
Brought to you by:
croston
Originally created by: gc...@loowis.durge.org
As the setmode() function can be called at any time (to switch the numbering scheme between BCM and BOARD), for the sake of completeness it might be nice if there was a corresponding getmode() function (or property)?
Although if anybody *does* write a script with multiple setmode calls, they're obviously going to be confusing themselves with channel numbers ;-)
I think it would be easier to make the 'setmode()' return the current value, and make its parameter optional.
If the optional parameter is not provided, it just returns the current value
Diff:
getmode() function added to 0.5.11a2