[En-Nut-Discussion] Nut/OS GPIO API Initial Design and Current Status

Thiago A. Corrêa thiago.correa at gmail.com
Sun Oct 14 18:05:44 CEST 2012


Hi,

On Sun, Oct 14, 2012 at 8:50 AM, Harald Kipp <harald.kipp at egnite.de> wrote:
>
> And this is the point where I'm still missing an answer:
>
> Why the hell is the portable Gpio API used for drivers, which are not
> portable themselves?
>

In the case for AVR32 (where I suspect most of the calls you mention
comes from), each peripheral must initialize it's pin alternative
before use. The USART0 TX for instance can have as many as 4
alternative pins in the physical chip. This is done in the
Gpio{Port|Pin}ConfigSet. Since this is done only during
initialization, and that part is just as fast as you can't notice, it
just didn't matter if it could be faster or not. So it happens that
when porting I did not care to provide any AVR32 specific faster way
of doing that, the portable was just good enough.

Kind Regards,
     Thiago A. Correa


More information about the En-Nut-Discussion mailing list