[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bb788810d84d491aa6357d411895242b@AcuMS.aculab.com>
Date: Fri, 6 May 2022 10:59:22 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Baltazár Radics' <baltazar.radics@...il.com>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: 9 bit serial / non-blocking TCSADRAIN
From: Baltazár Radics
> Sent: 05 May 2022 18:02
>
> 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.)
Does anything give the option of generating non-hdlc synchronous data?
You might be able to use two bytes to generate a single 9-bit
async character or three bytes to generate two 9-bit characters.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists