[En-Nut-Discussion] LCD driver
Harald Kipp
harald.kipp at egnite.de
Thu Nov 24 15:26:58 CET 2005
Bill,
At 08:55 24.11.2005 -0500, you wrote:
>I know I'm being obtuse, but how does one go about defining the ports/bits
>to use the LCD driver.
>
>My LCD has a different port configuration than the MediaNut. It is as simple
>as just modifying Medianut.h or creating a special include file for this
>device.
Please forget medianut.h. That was an early attempt without
future.
The recent idea is to have all port usage listed in a single
file, currently named avrpio.h. A default version is located
in include/cfg/arch/ within the source tree. If you do not
use the Configurator, you need to change this.
The Configurator will create the same file, but in the
build tree, which overrides the default one. All port
settings can be changed in the Configurator.
All this has grown to some sort of mess, because several
things didn't work as intended. For example, you can't
write
#define MYPORT PORTB
...
#ifdef MYPORT == PORTB
On the other hand, using variables instead of constants
for port addresses may produce less optimal code for some
reasons related to the AVR architecture.
Another issue is, that not all modules may have been
updated and may not include avrpio.h. To solve related compile
problems, some modules provide their own defaults by using
#ifndef MYPORT
#define MYPORT...
I'd prefer to remove them and force the modules to use
avrpio.h.
Now you are completely puzzled, right? Me too, me too...
Harald
More information about the En-Nut-Discussion
mailing list