linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: linux-serial@vger.kernel.org
Subject: Re: Add new ASYNC_SPD_WARP13?
Date: Wed, 6 Apr 2011 19:38:14 +0000 (UTC)	[thread overview]
Message-ID: <iniff6$62e$1@dough.gmane.org> (raw)
In-Reply-To: 20110406202347.61c5986e@lxorguk.ukuu.org.uk

On 2011-04-06, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> This raises a question I've been wondering about for some time.  While
>> the kernel and the serial driver API support arbitrary baud rates,
>> termios doesn't AFAICT.
>> 
>> How does one use the standard POSIX serial port API to obtain an
>> abritrary baud rate?
>
> The POSIX API is completely broken in this respect. So the kernel
> provides its own interface.
>
>> The only way I can find to get arbitrary baud rates from a user
>> perspective is to use the ASYNC_SPD_xxxx mechanism.
>
> Which is also not POSIX

Right.

> Simple example app:
>  
> http://www.kerneltrap.com/mailarchive/linux-usb/2008/10/2/3484644

Brilliant!

I've been looking for that (off and on) for months.  I knew that the
kernel/driver API supported arbitrary baud rates and that termios
didn't.  So I figured there must be an alternative to SPD_CUST, but
hadn't been able to figure out what it was.

I had found the BSD IOSSIOSPEED ioctl, but hadn't stumbled across the
Linux equivalent.

-- 
Grant Edwards               grant.b.edwards        Yow! Look DEEP into the
                                  at               OPENINGS!!  Do you see any
                              gmail.com            ELVES or EDSELS ... or a
                                                   HIGHBALL?? ...


      reply	other threads:[~2011-04-06 19:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 16:48 Add new ASYNC_SPD_WARP13? Grant Edwards
2011-04-06 16:53 ` Alan Cox
2011-04-06 17:06   ` Grant Edwards
2011-04-06 19:14     ` Alan Cox
2011-04-06 19:20       ` Grant Edwards
2011-04-06 17:14   ` Grant Edwards
2011-04-06 19:23     ` Alan Cox
2011-04-06 19:38       ` Grant Edwards [this message]

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='iniff6$62e$1@dough.gmane.org' \
    --to=grant.b.edwards@gmail.com \
    --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).