Re: gpio pin configuration.


Tomasz Bursztyka
 

Hi Marcus,

I've failed to parse exactly what you mean here, either:
- you are referring to the 0 << 12 vs 1 << 12 and suggesting that the
GPIO_DS_[01]_STANDARD serves no purpose since it conveys no additional
information over and above simply not specifying any flag at all.
or
- you are referring to the two groups of flags GPIO_DS_0_* and
GPIO_DS_1_*, in which case I failed to clearly articulate the
intention that the mode/behaviour of the pin should be independently
configurable depending whether it is currently outputting a 0 or
outputting a 1 (nrf5 HW is one example of HW that supports this degree
of flexibility).
It was just a naming proposal, instead of:

GPIO_DS_0_HIGH
GPIO_DS_0_DISCONNECT
and
GPIO_DS_1_HIGH
GPIO_DS_1_DISCONNECT

we would have:
GPIO_DS_DFLT_HIGH (or *_DEFAULT_*)
GPIO_DS_DFLT_DISCONNECT

and:
GPIO_DS_ALT_HIGH (or *_ALTERNATE_*)
GPIO_DS_ALT_DISCONNECT

Of course my naming proposal is bogus. If I understand, should it be
GPIO_DS_OUTPUT_<LOW/HIGH or 0/1>_<HIGH/DISCONNECT> or?

It's just the _0_ and _1_ alone that are not telling anything by themselves.

Tomasz

Join devel@lists.zephyrproject.org to automatically receive all group messages.