[plug] Any kernel hackers out there...?

Harry McNally harrymc at decisions-and-designs.com.au
Wed Mar 6 13:55:29 WST 2002


On 06 Mar 2002 12:20:04 +0800 Kim Covil wrote:

> I will have a hunt
> around the serial driver again and see if I can find the output ring
> buffer... is there an input ring buffer too...? The read code is the
> part I am most stuck with I think...

Should be an input ring buffer. The output one is for efficient interrupt driven transmit and the input one catches characters under interrupt control so they are buffered for you and not lost. Pretty standard and not unique to Linux.

You will see some code in the driver that transfers characters in an ISR from the serial input register to the ring buffer. A simple idea might be to disable the interrupt and pinch the bit of code from the ISR that polls for received chars and then the bit that fetches the chars from the serial hardware. Stick that in a loop with a timer test to spin for (say) 10 milliseconds after transmit (the tuner might take longer than that to respond .. experiment). The driver source will tell you what to do. The timer code may not be as evident. This solution is untidy but not much different to sensing if hardware is present on the end of a driver I spose.

HTH
Harry

ps empegs ? .. and here's me thinking you're building the next big killer product at CSIRO ;-)



More information about the plug mailing list