aboutsummaryrefslogtreecommitdiff
path: root/tests/rp/src/bin/uart.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rp/src/bin/uart.rs')
-rw-r--r--tests/rp/src/bin/uart.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/rp/src/bin/uart.rs b/tests/rp/src/bin/uart.rs
index 67cfa6bc8..84744ab77 100644
--- a/tests/rp/src/bin/uart.rs
+++ b/tests/rp/src/bin/uart.rs
@@ -56,7 +56,7 @@ async fn main(_spawner: Spawner) {
56 56
57 { 57 {
58 let config = Config::default(); 58 let config = Config::default();
59 let mut uart = Uart::new_blocking(&mut uart, &mut tx, &mut rx, config); 59 let mut uart = Uart::new_blocking(uart.reborrow(), tx.reborrow(), rx.reborrow(), config);
60 60
61 // We can't send too many bytes, they have to fit in the FIFO. 61 // We can't send too many bytes, they have to fit in the FIFO.
62 // This is because we aren't sending+receiving at the same time. 62 // This is because we aren't sending+receiving at the same time.
@@ -69,7 +69,7 @@ async fn main(_spawner: Spawner) {
69 info!("test overflow detection"); 69 info!("test overflow detection");
70 { 70 {
71 let config = Config::default(); 71 let config = Config::default();
72 let mut uart = Uart::new_blocking(&mut uart, &mut tx, &mut rx, config); 72 let mut uart = Uart::new_blocking(uart.reborrow(), tx.reborrow(), rx.reborrow(), config);
73 73
74 let data = [ 74 let data = [
75 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 75 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
@@ -93,7 +93,7 @@ async fn main(_spawner: Spawner) {
93 info!("test break detection"); 93 info!("test break detection");
94 { 94 {
95 let config = Config::default(); 95 let config = Config::default();
96 let mut uart = Uart::new_blocking(&mut uart, &mut tx, &mut rx, config); 96 let mut uart = Uart::new_blocking(uart.reborrow(), tx.reborrow(), rx.reborrow(), config);
97 97
98 // break on empty fifo 98 // break on empty fifo
99 uart.send_break(20).await; 99 uart.send_break(20).await;
@@ -113,11 +113,11 @@ async fn main(_spawner: Spawner) {
113 // parity detection. here we bitbang to not require two uarts. 113 // parity detection. here we bitbang to not require two uarts.
114 info!("test parity error detection"); 114 info!("test parity error detection");
115 { 115 {
116 let mut pin = Output::new(&mut tx, Level::High); 116 let mut pin = Output::new(tx.reborrow(), Level::High);
117 let mut config = Config::default(); 117 let mut config = Config::default();
118 config.baudrate = 1000; 118 config.baudrate = 1000;
119 config.parity = Parity::ParityEven; 119 config.parity = Parity::ParityEven;
120 let mut uart = UartRx::new_blocking(&mut uart, &mut rx, config); 120 let mut uart = UartRx::new_blocking(uart.reborrow(), rx.reborrow(), config);
121 121
122 async fn chr(pin: &mut Output<'_>, v: u8, parity: u8) { 122 async fn chr(pin: &mut Output<'_>, v: u8, parity: u8) {
123 send(pin, v, Some(parity != 0)).await; 123 send(pin, v, Some(parity != 0)).await;
@@ -140,10 +140,10 @@ async fn main(_spawner: Spawner) {
140 // framing error detection. here we bitbang because there's no other way. 140 // framing error detection. here we bitbang because there's no other way.
141 info!("test framing error detection"); 141 info!("test framing error detection");
142 { 142 {
143 let mut pin = Output::new(&mut tx, Level::High); 143 let mut pin = Output::new(tx.reborrow(), Level::High);
144 let mut config = Config::default(); 144 let mut config = Config::default();
145 config.baudrate = 1000; 145 config.baudrate = 1000;
146 let mut uart = UartRx::new_blocking(&mut uart, &mut rx, config); 146 let mut uart = UartRx::new_blocking(uart.reborrow(), rx.reborrow(), config);
147 147
148 async fn chr(pin: &mut Output<'_>, v: u8, good: bool) { 148 async fn chr(pin: &mut Output<'_>, v: u8, good: bool) {
149 if good { 149 if good {