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

making config more posix friendly. #38

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Cohors1316
Copy link
Contributor

@Cohors1316 Cohors1316 commented Dec 27, 2024

WIP.

Removed as many hardcoded values in favor of std.posix values wherever possible, such as VMIN/VSTOP/VSTART/VTIME. Linux itself has annoying differences between systems.

Removed baudmaps in favor of getSpeed(baudrate: u32) ?speed_t to handle every possible enum.
On miss will set mac_nonstandard_baud if macos, else return error.UnsupportedBaudrate.

Added safeSet function to check to see if a field is valid before setting it as termios seems to be all over the place.
Added every flag in zig lib for cflag and iflag, as well as what my current best guess is at what they should be.

Added timeout to Config, simple logic to support it in posix. Windows wip.

configureSerialPort should be pretty close to being system agnostic.

Few macs on the way for build runners

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.

1 participant