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

sys/termios: add cross-platform API for arbitrary baud rates #1632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 13, 2022

  1. sys/termios: add cross-platform API for arbitrary baud rates

    This commit adds
    
        pub struct ArbitraryBaudRate(pub u32);
        impl TryFrom<ArbitraryBaudRate> for BaudRate { ... }
    
    such that arbitrary baud rates can be specified on systems that
    otherwise do not support it (e.g. Linux) via abstraction.
    
    The one problem I see with this implementation is the duplication of the
    BaudRate enum. Removing the duplication would require a new macro, which
    may be too complex for this feature to warrant implementation.
    tmplt committed Jan 13, 2022
    Copy the full SHA
    1543868 View commit details
    Browse the repository at this point in the history