forgotten tests
This commit is contained in:
parent
b59de9bb38
commit
afcb875629
@ -21,7 +21,7 @@ mod tests {
|
||||
|
||||
let (rx, mut tx) = hil_test::common_test_pins!(peripherals);
|
||||
|
||||
let mut rx = UartRx::new(peripherals.UART1, uart::Config::default(), rx).unwrap();
|
||||
let mut rx = UartRx::new(peripherals.UART1, uart::Config::default()).unwrap().with_rx(rx);
|
||||
|
||||
// start reception
|
||||
_ = rx.read_byte(); // this will just return WouldBlock
|
||||
@ -29,7 +29,7 @@ mod tests {
|
||||
unsafe { tx.set_output_high(false, esp_hal::Internal::conjure()) };
|
||||
|
||||
// set up TX and send a byte
|
||||
let mut tx = UartTx::new(peripherals.UART0, uart::Config::default(), tx).unwrap();
|
||||
let mut tx = UartTx::new(peripherals.UART0, uart::Config::default()).unwrap().with_tx(tx);
|
||||
|
||||
tx.flush().unwrap();
|
||||
tx.write_bytes(&[0x42]).unwrap();
|
||||
|
||||
@ -28,8 +28,8 @@ mod tests {
|
||||
|
||||
let (rx, tx) = hil_test::common_test_pins!(peripherals);
|
||||
|
||||
let tx = UartTx::new(peripherals.UART0, uart::Config::default(), tx).unwrap();
|
||||
let rx = UartRx::new(peripherals.UART1, uart::Config::default(), rx).unwrap();
|
||||
let tx = UartTx::new(peripherals.UART0, uart::Config::default()).unwrap().with_tx(tx);
|
||||
let rx = UartRx::new(peripherals.UART1, uart::Config::default()).unwrap().with_rx(rx);
|
||||
|
||||
Context { rx, tx }
|
||||
}
|
||||
|
||||
@ -28,11 +28,13 @@ mod tests {
|
||||
|
||||
let (rx, tx) = hil_test::common_test_pins!(peripherals);
|
||||
|
||||
let tx = UartTx::new(peripherals.UART0, uart::Config::default(), tx)
|
||||
let tx = UartTx::new(peripherals.UART0, uart::Config::default())
|
||||
.unwrap()
|
||||
.with_tx(tx)
|
||||
.into_async();
|
||||
let rx = UartRx::new(peripherals.UART1, uart::Config::default(), rx)
|
||||
let rx = UartRx::new(peripherals.UART1, uart::Config::default())
|
||||
.unwrap()
|
||||
.with_rx(rx)
|
||||
.into_async();
|
||||
|
||||
Context { rx, tx }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user