lkml.org 
[lkml]   [2004]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: synchronous serial port communication (16550A)
On Tue, Mar 23, 2004 at 11:09:33AM +0100, Christof wrote:
> To make the story short: I see a lot of garbage on the LCD.
> It looks like output would be buffered and all data would be sent at
> once without giving me the possibility to check if everything's
> allright. Sometimes I can send >400 Bytes and ioctl says that CTS is not
> asserted, altough it certainly is.

It probably isn't, at the time you check it. When you write a byte,
the call will generally return immediately because it'll be placed in
a buffer. Transmission has only just started, and you then go and check
the CTS line. Repeat multiple times on a slow enough baud rate, and
you'll end up queueing a lot of bytes.

You could write a byte, wait for it to complete by calling ioctl(TCSETSW)
without changing any parameters, and then read the CTS status.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.032 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site