[Top][All Lists]
[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)
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] using UART to send from within SIGNAL(SIG_UART_RECV) function |
Date: |
Tue, 2 Apr 2002 13:17:33 +0200 |
User-agent: |
Mutt/1.2.5i |
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
interrupt.
> 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
address@hidden http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org