Skip to content
Snippets Groups Projects
Commit 30743dc6 authored by Benjamin Koch's avatar Benjamin Koch
Browse files

skip UART error that is caused by startup

parent b432e71a
No related branches found
No related tags found
No related merge requests found
...@@ -266,6 +266,13 @@ impl<H: RS485Handler> RS485<H> { ...@@ -266,6 +266,13 @@ impl<H: RS485Handler> RS485<H> {
pin_pad(&self.rx_pin).modify(|w| w.set_pue(true)); pin_pad(&self.rx_pin).modify(|w| w.set_pue(true));
} }
// This switching of RX function might have caused an error to be received. Let's skip that.
if true {
let mut rx_buf_one = [0; 1];
let rx_future = self.rx.read(&mut rx_buf_one);
let _ = select(rx_future, Timer::after(Duration::from_micros(10))).await;
}
info!("Program size for auto-baud: {}, for tx: {}, wait_for_not_idle is at: {}", info!("Program size for auto-baud: {}, for tx: {}, wait_for_not_idle is at: {}",
prg_autobaud.program.code.len(), prg_tx.program.code.len(), prg_autobaud.program.code.len(), prg_tx.program.code.len(),
prg_autobaud.public_defines.wait_for_not_idle); prg_autobaud.public_defines.wait_for_not_idle);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment