[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Adding (some) Procyon AVRlibfunctionalitytoavr-libc

From: Frédéric Nadeau
Subject: Re: [avr-libc-dev] Adding (some) Procyon AVRlibfunctionalitytoavr-libc
Date: Sat, 19 Sep 2009 13:02:42 -0400

On Sat, Sep 19, 2009 at 12:25 PM, Ruud Vlaming <address@hidden> wrote:
> On Saturday 19 September 2009 17:41, Mike Perks wrote:

> I would say, don't spend your energy there. The number of devices is
> not that great, and once they are done, there done. I don't think
> you are going to beat the oldfashioned 'doing by hand' here.
> I least i didn't for the devices my Femto OS supports (44 ports).
> By hand you could define generic accessors which makes virtualized
> use of the libs possible. Don't try to be complete from the beginning,
> but let it grow, and dare to change it, without trying to be backward
> compatible. Then you probably end up with something beautiful.
I wrote a Phyton script earlier this year that would scan the AVR
Studio XML files and add some pin description to the header. Of course
since the XML are not that good it would require some proof reading,
plus the script yeld some wargning so it help to target specific file
to check.

If i'm not mistaken it can be found in the patch section of avr-libc.

My goal was to define pin, port and ddr register for specific function
so that for example you could setup the SPI MISO pin as input by doing
SPI_MOSI_DDR |= _BV(SPI_MOSI_BV); regardless of if MOSI is in the
lower or upper part of PORTB(at least for ATmega 128 and 32 it

Sure I got screwed when I discovered that few devices had 2 SPI port.
But as you said... Dare to change it.

Frédéric Nadeau ing. jr

reply via email to

[Prev in Thread] Current Thread [Next in Thread]