[En-Nut-Discussion] Nut/OS GPIO API Initial Design and Current Status
ulrich.prinz at googlemail.com
Mon Oct 15 00:16:57 CEST 2012
Am 14.10.2012 19:11, schrieb Harald Kipp:
> Hi Thiago,
> However, the original API provided GPIO_CFG_DISABLED, which attracts
> developers to enhance this with the type of peripheral function, that
> should be activated then. Today I see, that the introduction of
> GPIO_CFG_DISABLED was a mistake.
If you think about power management, GPIO_DISABLE makes sense. As if the
last pin of a port has been set to this value, the bank could disable
its clocks and safe power.
2nd there are some setups that can either be substituted across
different chip or they can be ignored.
So if a chip doesn't know about _DISABLED just ignore the value or at
least switch the pin to input or as open-drain and logic 1.
If a chip doesnt support _PUSHPULL, set it to _PULLUP
For the beginner it will work, for the advanced user it is fine too as
he never addresses these tokens. He read the manual and uses the
More information about the En-Nut-Discussion