From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Christof <mail@pop2wap.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: synchronous serial port communication (16550A)
Date: Tue, 23 Mar 2004 10:31:02 +0000 [thread overview]
Message-ID: <20040323103102.B23349@flint.arm.linux.org.uk> (raw)
In-Reply-To: <40600CDD.5050807@pop2wap.net>; from mail@pop2wap.net on Tue, Mar 23, 2004 at 11:09:33AM +0100
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
next prev parent reply other threads:[~2004-03-23 10:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-23 10:09 synchronous serial port communication (16550A) Christof
2004-03-23 10:31 ` Russell King [this message]
2004-03-23 10:49 ` Miquel van Smoorenburg
[not found] <1CRaT-Zx-3@gated-at.bofh.it>
[not found] ` <1CRO7-1s4-19@gated-at.bofh.it>
2004-03-23 11:31 ` Christof
[not found] ` <1CRun-1dV-41@gated-at.bofh.it>
2004-03-23 11:33 ` Christof
[not found] <703905114@toto.iv>
2004-03-24 0:46 ` Peter Chubb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040323103102.B23349@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@pop2wap.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.