Non-standard baud rates in OS X | IOSSIOSPEED IOCTL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Non-standard baud rates in OS X | IOSSIOSPEED IOCTL

bruce
Apple have define an IOCTL (since Tiger) called IOSSIOSPEED which
facilitates non-standard baud rates.

They publish a C example which explains it:

http://developer.apple.com/library/mac/#samplecode/SerialPortSample/Introduction/Intro.html

Attached is a patch for FPC's darwin RTL which adds this IOCTL.

I think it's correct (i.e. it evaluates to the same value, 0x80045402,
as some C I threw together using Apple's headers, see attached).

I've appended this definition in termios.inc as this seems the most
appropriate place for it. Jonas?

Cheers, Bruce.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

termios.inc.patch (570 bytes) Download Attachment
IOSSIOSPEED.c (456 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Non-standard baud rates in OS X | IOSSIOSPEED IOCTL

bruce
I can now confirm that the ioctl definition I used is correct, tested on
a Snow Leopard system with an FT232RL chip USB/Serial chip.

Cheers, Bruce.

On 08/15/11 15:23, Bruce Tulloch wrote:

> Apple have define an IOCTL (since Tiger) called IOSSIOSPEED which
> facilitates non-standard baud rates.
>
> They publish a C example which explains it:
>
> http://developer.apple.com/library/mac/#samplecode/SerialPortSample/Introduction/Intro.html
>
> Attached is a patch for FPC's darwin RTL which adds this IOCTL.
>
> I think it's correct (i.e. it evaluates to the same value, 0x80045402,
> as some C I threw together using Apple's headers, see attached).
>
> I've appended this definition in termios.inc as this seems the most
> appropriate place for it. Jonas?
>
> Cheers, Bruce.
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal