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

Add BAUDRATE_LITERAL flag, for the case of *BSDs where arbitrary baud… #169

Closed
wants to merge 1 commit into from

Conversation

kevans91
Copy link

@kevans91 kevans91 commented Oct 7, 2016

… rates are generally accepted

This is at the very least true for NetBSD, FreeBSD, and OpenBSD and likely covers any other *BSD you may come across, so we just do a catch-all (with explicit for these three cases) and can sort things out later if the fail or are reported.

This is implemented as a fallback alternative to the BAUDRATE_CONSTANTS because it does not need anything special for setting -- just set ispeed/ospeed to the baudrate and go about your business. Will it fail later? Possibly, but that's fairly rare.

This was tested on FreeBSD -CURRENT, but I've been doing this in non-Python land for a bit (still using termios) with Arduino-related stuff. =)

@zsquareplusc
Copy link
Member

Thanks, but I think there is a solution without adding a new concept (BAUDRATE_LITERAL). See my commit referenced above.

@kevans91
Copy link
Author

kevans91 commented Oct 9, 2016

Ah, great! Thank you. =) Definitely cleaner.

@kevans91 kevans91 closed this Oct 9, 2016
n-eq pushed a commit to n-eq/pyserial that referenced this pull request Aug 22, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants