From: Russell King <rmk@arm.linux.org.uk>
To: henrique.gobbi@cyclades.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Interpretation of termios flags on a serial driver
Date: Thu, 27 Mar 2003 00:24:44 +0000 [thread overview]
Message-ID: <20030327002444.M8871@flint.arm.linux.org.uk> (raw)
In-Reply-To: <3E81C846.6010901@cyclades.com>; from henrique2.gobbi@cyclades.com on Wed, Mar 26, 2003 at 03:33:26PM +0000
On Wed, Mar 26, 2003 at 03:33:26PM +0000, Henrique Gobbi wrote:
> Thanks for the feedback.
>
> > If PARENB is set you generate parity. It is ODD parity if PARODD
> > is set, otherwise it's EVEN. There is no provision to generate
> > "stick parity" even though most UARTS will do that. When you
> > generate parity, you can also ignore parity on received data if
> > you want. This is the IGNPAR flag.
>
> Ok. But, considering the 2 states of the flag IGNPAR, what should the
> driver do with the chars that are receiveid with wrong parity, send this
> data to the TTY with the flag TTY_PARITY or just discard this data ?
We follow POSIX, which says that if IGNPAR is set, bytes with framing
or parity errors (but not break's) are ignored. If IGNPAR is clear
and INPCK is set, check parity, and flag it via the TTY_PARITY flag.
If INPCK is clear, don't check parity at all.
Note that PARENB enables/disables the generation and reception of
parity. INPCK controls whether you detect received character parity
errors, and IGNPAR tells you what to do when a character with incorrect
parity is received.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-03-27 0:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-06 0:19 Kernel Boot Speedup Ro0tSiEgE LKML
2003-03-06 0:44 ` Andy Pfiffer
2003-03-06 1:35 ` Adam Sulmicki
2003-03-06 10:01 ` Helge Hafting
2003-03-06 10:40 ` John Bradford
2003-03-26 9:23 ` Daniel Phillips
2003-03-26 14:51 ` Interpretation of termios flags on a serial driver Henrique Gobbi
2003-03-26 23:18 ` Richard B. Johnson
2003-03-26 15:33 ` Henrique Gobbi
2003-03-27 0:24 ` Russell King [this message]
2003-03-27 1:41 ` Richard B. Johnson
2003-03-27 1:01 ` Robert White
-- strict thread matches above, loose matches on Subject: below --
2003-03-26 23:33 Ed Vance
2003-03-27 0:17 ` Henrique Gobbi
2003-03-27 0:59 Ed Vance
2003-03-27 19:06 ` David Lawyer
2003-03-27 16:41 Ed Vance
2003-03-27 17:00 Ed Vance
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=20030327002444.M8871@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=henrique.gobbi@cyclades.com \
--cc=linux-kernel@vger.kernel.org \
/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.