[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] using UART to send from within SIGNAL(SIG_UART_RECV)
Re: [avr-gcc-list] using UART to send from within SIGNAL(SIG_UART_RECV) function
Tue, 2 Apr 2002 13:17:33 +0200
As Christoph Plattner wrote:
> No, in general, the idea is not bad !
> IMO it is necessary to give a transmitt character to the UART to send,
> for example to implement XON/XOFF !
But then, you need a buffered transmitter. Otherwise, you cannot
guarantee that the Rx interrupt service would not block indefinately
long (well, at the usual 9600 Bd, i'd consider 1 ms to flush the
hardware Tx buffer as `indefinately').
If you've got a memory-buffered UART handling, then you just put the
Xon/Xoff character into the queue, and can immediately return from Rx
> Bad design is, to do a busy waiting.
Unless you've got a memory-buffered UART driver, you cannot guarantee
to avoid busy waiting.
J"org Wunsch Unix support engineer
avr-gcc-list at http://avr1.org