From 6bacae47c3955b3fc77729e63b5e5cbb57bd074d Mon Sep 17 00:00:00 2001 From: bjoernQ Date: Mon, 11 Nov 2024 10:48:37 +0100 Subject: [PATCH] Adapt test --- hil-test/tests/rmt.rs | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/hil-test/tests/rmt.rs b/hil-test/tests/rmt.rs index bcb2e3a2334..f591fc308ea 100644 --- a/hil-test/tests/rmt.rs +++ b/hil-test/tests/rmt.rs @@ -81,27 +81,12 @@ mod tests { } } - let mut tx_data = [PulseCode { - level1: true, - length1: 200, - level2: false, - length2: 50, - }; 20]; - - tx_data[tx_data.len() - 2] = PulseCode { - level1: true, - length1: 3000, - level2: false, - length2: 500, - }; - tx_data[tx_data.len() - 1] = PulseCode::default(); + let mut tx_data = [PulseCode::new(true, 200, false, 50); 20]; + + tx_data[tx_data.len() - 2] = PulseCode::new(true, 3000, false, 500); + tx_data[tx_data.len() - 1] = PulseCode::empty(); - let mut rcv_data = [PulseCode { - level1: false, - length1: 0, - level2: false, - length2: 0, - }; 20]; + let mut rcv_data: [u32; 20] = [PulseCode::empty(); 20]; let rx_transaction = rx_channel.receive(&mut rcv_data).unwrap(); let tx_transaction = tx_channel.transmit(&tx_data).unwrap(); @@ -143,12 +128,7 @@ mod tests { rmt.channel0.configure(tx, tx_config).unwrap() }; - let tx_data = [PulseCode { - level1: true, - length1: 200, - level2: false, - length2: 50, - }; 20]; + let tx_data = [PulseCode::new(true, 200, false, 50); 20]; let tx_transaction = tx_channel.transmit(&tx_data);