Has anyone had a go at making a set of macros or defines in C to make the programming of the GPIO pins easier?
(Please note this blog is now very old – for FAR more up to date information, visit https://tech.scargill.net)
For people used to:
a cold sweat appears when confronted with
And if you’re only dealing with GPIO0 and GPIO2 then that’s not too hard, but we have commands to pull up pins, disable pull up, pull down, disable pull down, set as outputs etc…
Personally I’ve no idea which commands can be used on which pins and outside of GPIO0 and 2 I’m not even sure what commands CAN be used on which pins.
Is anyone aware of a simple concise set of documentation with examples for all the pins? Or has anyone done their own thing which would make life easier for others?
The nearest I’ve been able to find is this
and there are also some snippets of useful info here..
However I’m still not clear in my head what can and cannot be done with each pin.