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

RMT: Use gpio::Level for carrier and pulse levels #2989

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

wisp3rwind
Copy link
Contributor

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the Migration Guide.
  • My changes are in accordance to the esp-rs API guidelines

Extra:

Pull Request Details 📖

Description

This changes the RMT configuration structs and PulseCodes to use gpio::Level instead of bool to specify output levels.

I found this much more descriptive and readable than bools. What do you think?

Testing

  • Tested that the embassy_hal_{r|t}x examples compile for riscv.
  • Tested a heavily modified RMT driver including this change in tx mode on an ESP Rust Board.

Copy link
Collaborator

@Dominaezzz Dominaezzz left a comment

Choose a reason for hiding this comment

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

LGTM

esp-hal/src/rmt.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

Thanks

@wisp3rwind
Copy link
Contributor Author

Rebased on main & squashed fixup commits.

@MabezDev MabezDev enabled auto-merge January 17, 2025 11:43
@MabezDev MabezDev added this pull request to the merge queue Jan 17, 2025
Merged via the queue into esp-rs:main with commit 2105ba0 Jan 17, 2025
28 checks passed
@wisp3rwind wisp3rwind deleted the rmt-config-level branch January 17, 2025 14:35
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.

4 participants