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

More validation and # Errors entries #3074

Merged
merged 14 commits into from
Feb 6, 2025
Merged

Conversation

playfulFence
Copy link
Contributor

@playfulFence playfulFence commented Jan 30, 2025

Introduces more validation for SPI and UART, allows setting baudrate tolerance for UART config, adds more # Errors entries
closes #2839

esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
@playfulFence playfulFence force-pushed the upd/wtbeta branch 2 times, most recently from f76e5ef to 48d1182 Compare February 3, 2025 19:26
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Not sure if you're looking for review feedback now, but I guess you're gunna get it :D.

In general the approach looks sound. I think that we should document the specific variants that can be returned (this should be possible with rustdoc). We should probably mark the tolerance bits as unstable for now, just so we can give it some time to soak in. Finally, tests plz :D.

esp-hal/src/lcd_cam/cam.rs Outdated Show resolved Hide resolved
esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
@playfulFence playfulFence marked this pull request as ready for review February 5, 2025 17:46
@playfulFence playfulFence requested a review from MabezDev February 5, 2025 17:47
esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.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.

LGTM

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

Some formatting nitpicks

esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
esp-hal/src/spi/master.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
fmt

Rebase

dumb
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Thank you! This is looking good, most of my comments are related to the wording or layout, the validation code itself is looking solid!

esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
esp-hal/src/uart.rs Show resolved Hide resolved
esp-hal/src/uart.rs Outdated Show resolved Hide resolved
hil-test/tests/uart.rs Show resolved Hide resolved
unstable: macro -> feat
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@MabezDev MabezDev enabled auto-merge February 6, 2025 14:25
@MabezDev MabezDev added this pull request to the merge queue Feb 6, 2025
Merged via the queue into esp-rs:main with commit 477e1d6 Feb 6, 2025
27 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.

Peripheral drivers should validate configuration before applying it to hardware
6 participants