[Top][All Lists]

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

Re: [avr-libc-dev] (Fwd) WinAVR 20030424

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] (Fwd) WinAVR 20030424
Date: Sat, 3 May 2003 09:55:35 +0200
User-agent: Mutt/1.2.5i

As E. Weddington wrote:

> 1.Corrections are needed to the io86r401.h file to match the latest
> data sheet (03/03) see attached edited file.

Eric, perhaps you can verify this against the datasheet, and commit?

> 2. The vectors of the AT86RF401 are 2 word vectors ( requires JMP,
> rather than RJMP) like the newer mega devices, even tho there would
> never be a requirement to address beyond the range of an rjmp :)

No idea about this...

> 3. A section of the interrupt.h file contains the following
> extern inline void enable_external_int (unsigned char ints)
> {
> #if defined(EIMSK)
>  EIMSK = ints;
> #elif defined(GIMSK)
>  GIMSK = ints;
> #elif defined(GICR)
>  GICR = ints;
> #else
> # error "No valid external interrupt control register defined."
> #endif
> }

I think we should completely deprecate that interface, and only make
it available for backwards compatibility as part of
<compat/interrupt.h> or something along that line.  These
enable_external_int() (and enable_timer_int()) interfaces are
fundamentally flawed anyway, in particular since you cannot add or
remove just /one/ interrupt, but have to provide the complete
interrupt mask anyway, so you need to explicitly know which other bits
are already set and must not be clobbered.

If at all, we should start with the long treatened <compat/io.h>
interface that defines the smallest common denominator for the various
AVR IO definitions.  That would be the place to say something like:

#if !defined(EIMSK) && defined(GIMSK)
#if !defined(EIMSK) && defined(GICR)
#define EIMSK GICR

thus supplying a common EIMSK pseudo-register independent of the
underlying AVR device (if possible at all).
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

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