Skip to content

Conversation

zpg6
Copy link
Contributor

@zpg6 zpg6 commented Oct 8, 2025

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 latest Migration Guide.
  • My changes are in accordance to the esp-rs developer guidelines

Extra:

Pull Request Details 📖

Description

Continuation of #3177 - aiming for 1.0

Testing

Need help with HIL testing

@zpg6 zpg6 mentioned this pull request Oct 8, 2025
6 tasks
Comment on lines 975 to 984
/// Waits for a break condition to be detected.
///
/// This is a blocking function that will continuously check for a break condition.
#[instability::unstable]
pub fn wait_for_break(&mut self) {
while !self.uart.info().brk_det().bit_is_set() {
// wait
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bugadani - I added wait_for_break to complete the HIL test but I would intend to use it more as an interrupt handler now that we have Rx event for break detection.

Do you approve of this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think doing both should be fine. This function has lower latency than any interrupt handler would, so it can probably stay and remain useful in this form.

It makes sense to add an UartInterrupt::Break variant.

It would be nice to have a wait_for_break_with_timeout variant, and an async fn wait_for_break_async, too.

@zpg6
Copy link
Contributor Author

zpg6 commented Oct 9, 2025

@bugadani - can you tell why this isn't compiling for me?

@bugadani
Copy link
Contributor

bugadani commented Oct 9, 2025

ESP32-C2, C3 and H2 don't have GPIO16 and 17

@zpg6
Copy link
Contributor Author

zpg6 commented Oct 15, 2025

@bugadani - can you help me understand why my HIL test is failling only on esp32, esp32c6, and esp32h2? Works on others

@bugadani
Copy link
Contributor

My guess is that you need to start waiting for a break condition before you stop sending it.

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