[En-Nut-Discussion] Ethernut, UART HW Flowcontrol and maybe Bluetooth
Matthias Ringwald
mringwal at inf.ethz.ch
Wed Dec 10 13:05:53 CET 2003
>
>> how fast (@cpu speed) do people use the uarts without handshake (@cpu
>> speed) ?
>> is anybody interested in those changes?
>
> Too late. :-) But I'm interested in any comments.
>
> I hate to publish unfinished code, but in this case I'll
> make an exception. Note, I made many changes since my last
> test, so it may not even work. Only USART0 comments may be
> wrong, wrong paths etc. etc.
>
Thanks for your code. It looks much better than mine..
It did spoil everything with IFDEFS..
> Btw. Any idea anyone, how to add UART1 without copying code
> or spoil the code with ifdefs? Nah...no code in include
> files. I fear that this may confuse other tools like debuggers.
What about:
having one source file that uses one uart. usartavr.c
all registers are defined by a textual macro called UARTNR
than you can have uasrt0avr.c like
#define UARTNR 0
#include "usartavr.c"
and the other with
#define UARTNR 1
#include "usartavr.c"
better or worse than the other two options ?
matthias
More information about the En-Nut-Discussion
mailing list