[En-Nut-Discussion] Added AVR32 changes to the trunk

Thiago A. Corrêa thiago.correa at gmail.com
Thu Sep 2 22:52:33 CEST 2010


Hi Michael,

    I'm getting back into doing Nut/OS and AVR32 code. All changes
looks good, but I'm not sure I follow the rationale for using the
atmel gpio implementation.

On Thu, Sep 2, 2010 at 5:16 PM, Michael Fischer <fischermi at t-online.de> wrote:
>
>
> In case of the GPIO, here was a little problem. It was assumed that
> NUTGPIO_PORTA will be started by 0 and so on. But in reality it was 1.
> Therefore I added a "multiplexer" in the original gpio.c function from
> and renamed it to gpio_nutos.c. At the same time the original gpio.c from
> the Atmel SoftwareFramework was added. But only a few function will be used
> here. All the AVR32 devices which was using the Gpio function before use
> now the gpio_ function from the gpio.c. All the application can now use
> the NutOS Gpio function again. The "multiplexer" is get_avr32_bank and
> can be found in gpio_nutos.c.

Before we had a GpioPinConfigSet that would be part of the public API,
but the drivers were changed to calls to:

 gpio_enable_module_pin(unsigned int pin, unsigned int function)

Why use this instead of a public API? Many chips now have muxed
devices, so it's not a problem specific to the AVR32. I think we could
have a single code to handle that, both from the driver perspective
and the application code perspective.

> Yes I know, the original Atmel SoftwareFramework is not optimal in case
> of performance. But we have a starting point.
>
> Btw, I have replaced the old SoftwareFramework files by the new one from
> version 1.7.0.

There are not many files that came from the SF before. I will take a
look at them.

> Does anyone see problems with the 4th clause:
>
>  * 4. This software may only be redistributed and used in connection
>  * with an Atmel AVR product.
>

Up to version 1.3 or 1.4 there were no 4th clause, if it's problematic

Kind Regards,
    Thiago A. Correa



More information about the En-Nut-Discussion mailing list