[En-Nut-Discussion] half duplex USART driver

Harald Kipp harald.kipp at egnite.de
Wed Apr 7 15:38:50 CEST 2004


Dusan,

Thanks for providing the fix. I already added it to 3.5.0,
but not yet to the 3.4 trunk. There will be at least two
other fixes and we will have an official 3.4.3 soon.

Regarding your question, how to specify different ports
for different hardware:

For the RS232 controls, I intended to use include/cfg/modem.h.
But frankly, I didn't used it myself yet. :-) In two
instances we wrote a complete self contained driver for
customers (who paid the code, so we can't publish it).

The main problem is, that it can't be made software
configurable without losing performance. If constants
are used in outb(), inb(), cbi(), sbi() etc. the
compiler is able to translate them into a single
machine instruction. Using constants requires to
recompile the related library.

Unless no one comes up with a better solution, I'd
continue on the initial track, using modem.h, but
change it somehow like

#if defined(ETHERNUT2)
#include <cfg/ethernut2.h>
#elif define(DUSAN_PERFMON)
#include <cfg/dfperfmon.h>
#....

and use
HWDEF=-DDUSAN_PERFMON

in UserConf.mk.

Harald

P.S. I believed, that I did add the flash file system
you contributed. But obviously I didn't. Sorry about
that and thanks for the reminder.




More information about the En-Nut-Discussion mailing list