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.
This commit is contained in:
pennae 2023-04-30 04:14:07 +02:00
parent ce04b732d1
commit bcbe3040a1

View File

@ -26,13 +26,13 @@ async fn main(_spawner: Spawner) {
// bufferedUart. // bufferedUart.
let data = [ 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, 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,
30, 31, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
]; ];
uart.write_all(&data).await.unwrap(); uart.write_all(&data).await.unwrap();
info!("Done writing"); info!("Done writing");
let mut buf = [0; 31]; let mut buf = [0; 48];
uart.read_exact(&mut buf).await.unwrap(); uart.read_exact(&mut buf).await.unwrap();
assert_eq!(buf, data); assert_eq!(buf, data);