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

Fix Async UART #871

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Fix Async UART #871

merged 3 commits into from
Oct 25, 2023

Conversation

MabezDev
Copy link
Member

The uart handler was writing to the enable register instead of modify, which meant any wake would see the cleared enabled bit and think the event had occurred. This wasn't seen before the split of uart because it was only possible to listen to one thing at a time.

This PR also removes the ReadBufferFull error in favour of returning the max bytes in the buffer.

The serial examples have been updated actually to have some cross-task communication.

Thank you!

Thank you for your contribution.
Please make sure that your submission includes the following:

Must

  • The code compiles without errors or warnings.
  • All examples work.
  • cargo fmt was run.
  • Your changes were added to the CHANGELOG.md in the proper section.
  • You updated existing examples or added examples (if applicable).
  • Added examples are checked in CI

Nice to have

  • You add a description of your work to this PR.
  • You added proper docs for your newly added features and code.

Closes #850

The uart handler was `writing` to the enable register instead of
`modify`, which meant any wake would see the cleared enabled bit and
think the event had occurred. This wasn't seen before the split of uart
because it was only possible to listen to one thing at a time.

This PR also removes the ReadBufferFull error in favour of returning the
max bytes in the buffer.

The serial examples has been updated to actually have some cross task
communication.
Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM, and I tested on an ESP32 and an ESP32-C6 and both work, so the issues seems to be resolved. Thanks for the fix!

@jessebraham jessebraham merged commit 94a07da into esp-rs:main Oct 25, 2023
17 checks passed
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.

The embassy_serial example seems to be broken
2 participants