main: use 10x nop delay for softspi

This commit is contained in:
Astro 2019-09-08 00:47:41 +02:00
parent 3bf1010969
commit 152bc7b98b
1 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,8 @@ fn main() -> ! {
// MISO // MISO
let pe5 = board::gpio::PE5.into_input(); let pe5 = board::gpio::PE5.into_input();
// max 2 MHz = 0.5 us // max 2 MHz = 0.5 us
let mut delay_fn = || delay.delay_us(1u32); // let mut delay_fn = || delay.delay_us(1u32);
let mut delay_fn = || for _ in 0..10 { cortex_m::asm::nop(); };
let spi = board::softspi::SyncSoftSpi::new( let spi = board::softspi::SyncSoftSpi::new(
board::softspi::SoftSpi::new(pb5, pe4, pe5), board::softspi::SoftSpi::new(pb5, pe4, pe5),
&mut delay_fn &mut delay_fn