summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/rp/src/bin/uart_buffered.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/rp/src/bin/uart_buffered.rs b/tests/rp/src/bin/uart_buffered.rs
index a0a3df8d..4313ee3d 100644
--- a/tests/rp/src/bin/uart_buffered.rs
+++ b/tests/rp/src/bin/uart_buffered.rs
@@ -25,10 +25,16 @@ async fn main(_spawner: Spawner) {
let mut state = State::new();
let mut uart = BufferedUart::new(&mut state, uart, irq, tx_buf, rx_buf);
- let data = [0xC0, 0xDE];
+ // Make sure we send more bytes than fits in the FIFO, to test the actual
+ // bufferedUart.
+
+ let data = [
+ 1_u8, 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,
+ ];
uart.write(&data).await.unwrap();
- let mut buf = [0; 2];
+ let mut buf = [0; 32];
uart.read(&mut buf).await.unwrap();
assert_eq!(buf, data);