On Jan 8, 2018, at 17:23, Luke Kenneth Casson Leighton lkcl@lkcl.net wrote:
On Mon, Jan 8, 2018 at 11:24 PM, Richard Wilbur richard.wilbur@gmail.com wrote:
It all sounds like fun! What can I help with first?
well... perhaps... something simple like.. a simple program that tests GPIO, assuming that say 4 hard-wires are connected between 8 GPIOs in pairs, turning one into an input and the other an output, then setting 0 and 1 and seeing if it's read correctly... then inverting each pair (out becomes in, in becomes out) and re-running the test.
I'd recommend resistors instead of wires. Something like 10KΩ because then if they are accidentally misconnected, Vcc(5V?) to ground would only amount to 0.5mA which is unlikely to stress anything unduly. What kind of logic are these GPIO pins? (CMOS, TTL, etc.)
something in either c or python that uses the sunxi-3.4 gpio driver: https://github.com/linux-sunxi/linux-sunxi/blob/stage/sunxi-3.4/drivers/gpio...
that _should_ be exposed as /dev/gpio which should in turn appear in either /sys or /proc... it should be a standard interface, with a standard way to set which banks are activated... you might have to do some digging.
So there are 4 pairs or 8 GPIO lines to test? (I thought we had 14 lines dedicated to GPIO and two more that were going to be used as I2C for VGA? Are only 8 easy to test?) I'll assume I either get the connected pairs via an environment variable, the command line, or a file (filename passed on command line).