avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] minor avr libc documentation gripe (fwd)


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] minor avr libc documentation gripe (fwd)
Date: Tue, 20 Jul 2004 17:41:48 +0200
User-agent: Mutt/1.4.2.1i

As Sean Midthun Pieper wrote:

> putc() written this way will break binary data transfers (attempt to
> transfer 0xa becomes transfer of 0xd 0xa. Hilarity ensues).

Yes, sure.  This example has been written solely with the intention in
mind to send text down the UART.

> Because putc()
> is frequently used for binary data transfers, in every other development
> enviroment for microcontrollers that I've used, it's been the user's
> responsibility to insert the \r if necessary (this changes in large part
> depending on the terminal being used and how it is configured).

So far, I've never attempted to abuse the UART for sending binary
streams.  Maybe that's because I come from a Unix world, where most of
the files have ASCII contents... :)  If at all, I'd perhaps even
consider using kermit protocol.

But you're right, the documentation should clarify that the suggested
(arguably very simple) uart_putchar() approach cannot be used when
binary transfers are desired.  (In that case, I'd rather expect the
user to create an interrupt-driven, buffered IO routine anyway.)

Please fill in a bug tracker on the avr-libc project page, to ensure
this issue will be dealt with.

-- 
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]