-
Notifications
You must be signed in to change notification settings - Fork 219
Open
Description
I am trying to read a success code that is sent to my ESP by a UART sensor. To do so, I use read_exact this way
fn read_success(uart: &mut UartDriver) -> anyhow::Result<()> {
let mut buffer = [0; 10];
uart.read_exact(&mut buffer)?;
assert_eq!(&buffer, b"$00023335&");
Ok(())
}
Can I set a read timeout in case the sensor never responds?
There seems to be uart_set_rx_timeout but I couldn’t find any function that does this in the wrappers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels