forked from renet/ENC424J600
spi: add delay margin
This commit is contained in:
parent
bcb3eef8cd
commit
9d3d73479a
@ -133,7 +133,7 @@ impl <SPI: Transfer<u8>,
|
||||
// Disable chip select
|
||||
cortex_m::asm::delay(10_u32);
|
||||
self.nss.set_high();
|
||||
cortex_m::asm::delay(4_u32);
|
||||
cortex_m::asm::delay(5_u32);
|
||||
Ok(buf[2])
|
||||
},
|
||||
// TODO: Maybe too naive?
|
||||
@ -141,7 +141,7 @@ impl <SPI: Transfer<u8>,
|
||||
// Disable chip select
|
||||
cortex_m::asm::delay(10_u32);
|
||||
self.nss.set_high();
|
||||
cortex_m::asm::delay(4_u32);
|
||||
cortex_m::asm::delay(5_u32);
|
||||
Err(SpiPortError::TransferError)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user