mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 00:02:28 +00:00
esp-hosted: smaller delay after transfer, makes slightly better perf.
This commit is contained in:
parent
0d02298ea6
commit
6e65282f18
@ -227,7 +227,12 @@ where
|
||||
}
|
||||
|
||||
self.spi.transfer(&mut rx_buf, &tx_buf).await.unwrap();
|
||||
let delay_until = Instant::now() + Duration::from_millis(1);
|
||||
|
||||
// The esp-hosted firmware deasserts the HANSHAKE pin a few us AFTER ending the SPI transfer
|
||||
// If we check it again too fast, we'll see it's high from the previous transfer, and if we send it
|
||||
// data it will get lost.
|
||||
// Make sure we check it after 100us at minimum.
|
||||
let delay_until = Instant::now() + Duration::from_micros(100);
|
||||
self.handle_rx(&mut rx_buf);
|
||||
Timer::at(delay_until).await;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user