At that level I sort of agree but when people start assigning names to
individual bits in a large address space the value is lost.
On Jan 24, 2014 10:05 PM, "Chuck McManis" wrote:
> I agree with that in general, however I find that systems documentation
> generally refers to thing with their GPIO
I agree with that in general, however I find that systems documentation
generally refers to thing with their GPIO "pin" name, so the docs for the
Discovery board for example talk about the LED being connected to PD15.
As for the symbology, its a composition of [name][bit_number] so really the
only
I have to admit to searching out and doing cut and paste every time I
need to insert an action on a peripheral, so anything that is more
intuitive would be helpful. It needn't displace the API as it is now for
those who want to do kinky things like toggling multiple bits at once.
It's debatable
My feeling on this that there is questionable value in learning a large
dictionary of symbols versus learning the meaning of each bit. So, why not
use for example BIT2 for PA2 and PB2 etc.
On Jan 24, 2014 9:49 PM, "Chuck McManis" wrote:
> One of the things I did to make writing ARM code simpler w
One of the things I did to make writing ARM code simpler was to define an
enum called GPIO_PORT_PIN with the values PA0 .. PI15. These have the
values 0 .. 143.
Because of their numerical relation, you can do some math on them, like so
GPIO_BIT_NUMBER(PB6) == (PB6 % 16)
I exploit this in other w