From bcbe3040a1eb9d96feae8f6d665bbbcc5ea41c4e Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 30 Apr 2023 04:14:07 +0200 Subject: [PATCH] tests/rp: fix buffered uart test the rp uart receive fifo is 32 entries deep, so the 31 byte test data fits into it without needing any buffering. extend to 48 bytes to fill the entire fifo and the 16 byte test buffer. --- tests/rp/src/bin/uart_buffered.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/rp/src/bin/uart_buffered.rs b/tests/rp/src/bin/uart_buffered.rs index bea9283e..a1f0e2bf 100644 --- a/tests/rp/src/bin/uart_buffered.rs +++ b/tests/rp/src/bin/uart_buffered.rs @@ -26,13 +26,13 @@ async fn main(_spawner: Spawner) { // bufferedUart. let data = [ - 1u8, 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, - 30, 31, + 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, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, ]; uart.write_all(&data).await.unwrap(); info!("Done writing"); - let mut buf = [0; 31]; + let mut buf = [0; 48]; uart.read_exact(&mut buf).await.unwrap(); assert_eq!(buf, data);