linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Baltazár Radics" <baltazar.radics@gmail.com>
To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: 9 bit serial / non-blocking TCSADRAIN
Date: Thu, 05 May 2022 19:01:48 +0200	[thread overview]
Message-ID: <052a814001aaa46eab844f1d9693ddd9d731c164.camel@gmail.com> (raw)

Hello!

I want to use a raspberry pi's serial to communicate over a protocol
that uses 9-bit characters, so currently I'm using the stick parity
mode (CMSPAR) and toggling between odd and even parity, then using
tcsetattr with TCSADRAIN as the second argument, which blocks until all
bytes are transmitted. Is there a non-blocking api to do the same
thing, so I can use it from poll / select? (If there's a better way to
do 9 bit character size, that'd be even better. For my protocol, the
9th bit is only used to tell address bytes from data bytes, so I don't
have to change it often, so I guess my current method isn't too
horrible.)

Thanks!

             reply	other threads:[~2022-05-05 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 17:01 Baltazár Radics [this message]
2022-05-06 10:59 ` 9 bit serial / non-blocking TCSADRAIN David Laight

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=052a814001aaa46eab844f1d9693ddd9d731c164.camel@gmail.com \
    --to=baltazar.radics@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).