[En-Nut-Discussion] Unified GPIO implementation

Thiago A. Corrêa thiago.correa at gmail.com
Tue Oct 26 00:06:59 CEST 2010


Hi,

On Mon, Oct 25, 2010 at 4:57 PM, Ulrich Prinz <uprinz2 at netscape.net> wrote:
>> It isn't too much work to simply satisfy the specs. It can be
>> optimized on each platform later after the merge, as long as the
>> public interface doesn't change.
>>
> Hehe, that was the intention!
>

  Ok, I believe I've finished with "just satisfing the specs".
  Notice that NUTGPIO_PORTA == NUTGPIO_PORT now, so all ports are
shifted by 1 for some archs like ARM. For AVR32 it was already like
that, so I just removed a case in the switch that became duplicated.

  Could you take a look at it and see if that's what you intended?
  Next I can take advantage of the fact that NUTGPIO_PORTx is now
platform specific and make it &AVR32_GPIO.port[x] directly (make it
the register address). I think similar optimization can be made for
AVR 8 bits.

Kind Regards,
    Thiago A. Correa



More information about the En-Nut-Discussion mailing list