Skip to content

Conversation

@medusalix
Copy link
Contributor

I've noticed that the SerialPort::discard_buffers function doesn't work correctly on Linux systems. Due to the definition of the TCIFLUSH and TCOFLUSH flags, they can't be combined using a bitwise operation. This PR fixes the issue by using the TCIOFLUSH flag instead, which works on all platforms.

Combining the `TCIFLUSH` and `TCOFLUSH` flags doesn't work on Linux.
Use the `TCIOFLUSH` flag instead, which works on all platforms.
@de-vri-es
Copy link
Owner

Good catch! Thanks for the fix!

@de-vri-es de-vri-es merged commit daaf56f into de-vri-es:main Jul 31, 2025
7 checks passed
@de-vri-es
Copy link
Owner

Released as v0.2.30 🚀

Thanks again!

@de-vri-es
Copy link
Owner

Also released as part of serial2-tokio v0.1.16 🚀

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.

2 participants