Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is max speed hardcoded as 230400? #7

Open
Shnatsel opened this issue Nov 28, 2015 · 2 comments
Open

Why is max speed hardcoded as 230400? #7

Shnatsel opened this issue Nov 28, 2015 · 2 comments

Comments

@Shnatsel
Copy link
Contributor

Looking at https://github.com/tonyg/erlang-serial/blob/master/c_src/serial.c#L88 maximum speed is hard-coded as 230400 baud, but there's no explanation given for said cap.

We might need speeds up to 460800 baud in the current project, so I wonder if there is a reason for the current speed limit?

@tonyg
Copy link
Owner

tonyg commented Nov 29, 2015

There is no reason other than "historical reasons" for the cap. A patch to add additional speeds would be welcome. (It's a shame the relevant ioctls don't permit easy mapping from a number to an ioctl constant, otherwise we could accept arbitrary speeds...)

@Shnatsel
Copy link
Contributor Author

Thanks for the pointer! I've found the same hardcoded constants in termios manpage so that's where the limitation seems to come from. I'll see if I find a way to set arbitrary speeds on modern systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants