Skip to content

Commit

Permalink
fix: for blocking impl be sure to enable the interrupt and clear it
Browse files Browse the repository at this point in the history
  • Loading branch information
zpg6 committed Dec 29, 2024
1 parent fecb91c commit 473780c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,11 @@ where
///
/// Clears the break detection interrupt before returning.
pub fn wait_for_break(&mut self) {
// Enable the break detection interrupt
self.register_block()
.int_ena()
.write(|w| w.brk_det().bit(true));

while !self.register_block().int_raw().read().brk_det().bit() {
// Just busy waiting
}
Expand Down

0 comments on commit 473780c

Please sign in to comment.