aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src/bin/uart_buffered_split.rs
diff options
context:
space:
mode:
authorTimo Kröger <[email protected]>2023-01-01 22:02:45 +0100
committerTimo Kröger <[email protected]>2023-01-04 15:59:03 +0100
commita24037edf9d04087111c1d1dc71c92cc0ad83709 (patch)
treeac5e7af71600eda79098887bfa2ba5a17e5decd4 /examples/rp/src/bin/uart_buffered_split.rs
parent68c186309f5da13266118a5c6b90c9082f73cbfb (diff)
rp: Fix BufferedUart drop code
Only unregister the interrupt handler when both parts are inactive
Diffstat (limited to 'examples/rp/src/bin/uart_buffered_split.rs')
-rw-r--r--examples/rp/src/bin/uart_buffered_split.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rp/src/bin/uart_buffered_split.rs b/examples/rp/src/bin/uart_buffered_split.rs
index 36f31c906..a8a682274 100644
--- a/examples/rp/src/bin/uart_buffered_split.rs
+++ b/examples/rp/src/bin/uart_buffered_split.rs
@@ -29,7 +29,7 @@ async fn main(spawner: Spawner) {
29 let irq = interrupt::take!(UART0_IRQ); 29 let irq = interrupt::take!(UART0_IRQ);
30 let tx_buf = &mut singleton!([0u8; 16])[..]; 30 let tx_buf = &mut singleton!([0u8; 16])[..];
31 let rx_buf = &mut singleton!([0u8; 16])[..]; 31 let rx_buf = &mut singleton!([0u8; 16])[..];
32 let mut uart = BufferedUart::new(uart, irq, tx_pin, rx_pin, tx_buf, rx_buf, Config::default()); 32 let uart = BufferedUart::new(uart, irq, tx_pin, rx_pin, tx_buf, rx_buf, Config::default());
33 let (rx, mut tx) = uart.split(); 33 let (rx, mut tx) = uart.split();
34 34
35 unwrap!(spawner.spawn(reader(rx))); 35 unwrap!(spawner.spawn(reader(rx)));