[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-rt
Subject:    [rtl] rt_com
From:       Jose Guilberto <guilbert () arctic ! nmt ! edu>
Date:       1999-09-29 16:15:59
[Download RAW message or body]


	Hello,

	I have some comments about rt_com. The following code that is
part of the rt_com isr, there is a check for data in the rt_com output
buffer. If there is data, the program sends it to the serial transmitter
buffer. If there is still more data available for transmission, it will
send data to the serial transmitter buffer, but it does not check that the
serial transmitter buffer is ready to receive new data. 

if( rt_com_irq_get( p, &data ) ) {
	/* data in output buffer */
	do {
	    outb(data,B+RT_COM_TXB);
	    sta = inb(B+RT_COM_LSR);
	} while(--loop > 0 && rt_com_irq_get(p,&data));
}

	Maybe after reading from B+RT_COM_LSR, --loop, and calling
rt_com_irq_get there is enough time for the serial hardware to send the
data and be ready to receive another byte, is that right? If the serial
port is working in FIFO mode, there is no problem, but if it is working
without it, could it be a problem?

	I think that the variable loop in the interrupt service routine is
to avoid the isr from executing too many times. Could it be possible to
use the "FIFO trigger level" to optimize transmission of data? To write
"FIFO trigger level" bytes to the transmitter buffer instead of loop
bytes? 
	
	Thank you for your help.

	Jose Guilberto

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic