[En-Nut-Discussion] LCD driver
William Basser
wbasser at cyberinteg.com
Thu Nov 24 18:45:46 CET 2005
Thanks.
I had to create a separate driver, this device is on a newer mega2560 device
and the LCD is attached to the upper ports which means SBI, CBI, OUT, INP
does not work on upper addresses.
Oh well!
-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Harald Kipp
Sent: Thursday, November 24, 2005 9:27 AM
To: wbasser at cyberinteg.com; Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] LCD driver
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
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
More information about the En-Nut-Discussion
mailing list