Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: uart break detection interrupt #2858

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3d14724
feat: uart break detection interrupt
zpg6 Dec 21, 2024
be1a908
format: run `cargo xtask fmt-packages`
zpg6 Dec 21, 2024
b7c3f70
docs: CHANGELOG entry
zpg6 Dec 21, 2024
3e52d6a
fix: no Result needed for `wait_for_break_async`
zpg6 Dec 21, 2024
44be3e6
fix: clarify added interrupt in changelog
zpg6 Dec 21, 2024
d1531ac
test: adding `uart_interrupts` example
zpg6 Dec 29, 2024
a38ed91
test: adds examples for blocking and async break detection w/o handlers
zpg6 Dec 29, 2024
118dce8
chore: format on register write statement
zpg6 Dec 29, 2024
735f527
chore: comment format
zpg6 Dec 29, 2024
fecb91c
chore: more formatting
zpg6 Dec 29, 2024
473780c
fix: for blocking impl be sure to enable the interrupt and clear it
zpg6 Dec 29, 2024
9d0c122
fix: flipped rx and tx in `Uart::new()`
zpg6 Dec 29, 2024
06cc4fd
fix: note only tested on `esp32`
zpg6 Dec 29, 2024
a19f915
fix: better handler debug output to demonstrate
zpg6 Dec 29, 2024
7c830df
fix: again more useful debug output
zpg6 Dec 30, 2024
af8a228
chore: formatting
zpg6 Dec 30, 2024
149c6b9
chore: format and debug output
zpg6 Dec 30, 2024
d344c91
docs: clarify interrupt every time a byte is received
zpg6 Dec 30, 2024
a2153e7
fmt: debug message too long
zpg6 Dec 30, 2024
f2c9d35
test: adds uart_brk_det HIL test
zpg6 Dec 30, 2024
ed719da
chore: embassy features not needed for blocking example
zpg6 Dec 30, 2024
fd52ecf
chore: revert to latest main
zpg6 Jan 26, 2025
1deff46
Merge branch 'main' into feat/uart/break-detection-interrupt
zpg6 Jan 26, 2025
cdb7bdc
feat: migrate to v0.23
zpg6 Jan 26, 2025
049ee95
chore: add back into changelog
zpg6 Jan 26, 2025
9f908e9
chore: fmt hil test
zpg6 Jan 26, 2025
772a297
fix: unused import
zpg6 Jan 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: format on register write statement
  • Loading branch information
zpg6 committed Dec 29, 2024
commit 118dce803f39956d2ad81c62280a2f29dc52ddba
6 changes: 4 additions & 2 deletions esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
@@ -975,7 +975,7 @@ where
/// Busy waits for a break condition to be detected on the RX line.
/// Condition is met when the receiver detects a NULL character (i.e. logic
/// 0 for one NULL character transmission) after stop bits.
///
///
/// Clears the break detection interrupt before returning.
pub fn wait_for_break(&mut self) {
while !self
@@ -989,7 +989,9 @@ where
}

// Clear the break detection interrupt
self.register_block().int_clr().write(|w| w.brk_det().clear_bit_by_one());
self.register_block()
.int_clr()
.write(|w| w.brk_det().clear_bit_by_one());
}

#[allow(clippy::useless_conversion)]
Loading