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

Ref #46 - altered flush() for posx to use tcdrain rather than tcflush #47

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

euantorano
Copy link
Owner

Fixes #46 - Rather than using tcflush, use tcdrain.

The descriptions for the two functions are as follows:

  • tcdrain:

    waits until all output written to the object referred to by fd has been transmitted

  • tcflush:

    discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector

@euantorano
Copy link
Owner Author

Note: This has only been tested on my Mac, sending to a Windows laptop. I need to dig out some other machines to test on.

I also want to double check all the other flags we set, compared to pyserial: https://github.com/pyserial/pyserial/blob/master/serial/serialposix.py#L400

@euantorano euantorano marked this pull request as ready for review March 28, 2022 19:45
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.

Force synchronization of the serial port?
1 participant