@@ -32,11 +32,11 @@ use crate::{debug, warn};
32
32
///
33
33
/// If you're not sure how to get a [`SpiDevice`], you may use one of the implementations
34
34
/// in the [`embedded-hal-bus`] crate, providing a wrapped version of your platform's HAL-provided
35
- /// [`SpiBus`] and [`DelayUs `] as well as our [`DummyCsPin`] in the constructor.
35
+ /// [`SpiBus`] and [`DelayNs `] as well as our [`DummyCsPin`] in the constructor.
36
36
///
37
37
/// [`SpiDevice`]: embedded_hal::spi::SpiDevice
38
38
/// [`SpiBus`]: embedded_hal::spi::SpiBus
39
- /// [`DelayUs `]: embedded_hal::delay::DelayUs
39
+ /// [`DelayNs `]: embedded_hal::delay::DelayNs
40
40
/// [`embedded-hal-bus`]: https://docs.rs/embedded-hal-bus
41
41
pub struct DummyCsPin ;
42
42
@@ -71,7 +71,7 @@ pub struct SdCard<SPI, CS, DELAYER>
71
71
where
72
72
SPI : embedded_hal:: spi:: SpiDevice < u8 > ,
73
73
CS : embedded_hal:: digital:: OutputPin ,
74
- DELAYER : embedded_hal:: delay:: DelayUs ,
74
+ DELAYER : embedded_hal:: delay:: DelayNs ,
75
75
{
76
76
inner : RefCell < SdCardInner < SPI , CS , DELAYER > > ,
77
77
}
@@ -80,7 +80,7 @@ impl<SPI, CS, DELAYER> SdCard<SPI, CS, DELAYER>
80
80
where
81
81
SPI : embedded_hal:: spi:: SpiDevice < u8 > ,
82
82
CS : embedded_hal:: digital:: OutputPin ,
83
- DELAYER : embedded_hal:: delay:: DelayUs ,
83
+ DELAYER : embedded_hal:: delay:: DelayNs ,
84
84
{
85
85
/// Create a new SD/MMC Card driver using a raw SPI interface.
86
86
///
@@ -195,7 +195,7 @@ impl<SPI, CS, DELAYER> BlockDevice for SdCard<SPI, CS, DELAYER>
195
195
where
196
196
SPI : embedded_hal:: spi:: SpiDevice < u8 > ,
197
197
CS : embedded_hal:: digital:: OutputPin ,
198
- DELAYER : embedded_hal:: delay:: DelayUs ,
198
+ DELAYER : embedded_hal:: delay:: DelayNs ,
199
199
{
200
200
type Error = Error ;
201
201
@@ -246,7 +246,7 @@ struct SdCardInner<SPI, CS, DELAYER>
246
246
where
247
247
SPI : embedded_hal:: spi:: SpiDevice < u8 > ,
248
248
CS : embedded_hal:: digital:: OutputPin ,
249
- DELAYER : embedded_hal:: delay:: DelayUs ,
249
+ DELAYER : embedded_hal:: delay:: DelayNs ,
250
250
{
251
251
spi : SPI ,
252
252
cs : CS ,
@@ -259,7 +259,7 @@ impl<SPI, CS, DELAYER> SdCardInner<SPI, CS, DELAYER>
259
259
where
260
260
SPI : embedded_hal:: spi:: SpiDevice < u8 > ,
261
261
CS : embedded_hal:: digital:: OutputPin ,
262
- DELAYER : embedded_hal:: delay:: DelayUs ,
262
+ DELAYER : embedded_hal:: delay:: DelayNs ,
263
263
{
264
264
/// Read one or more blocks, starting at the given block index.
265
265
fn read ( & mut self , blocks : & mut [ Block ] , start_block_idx : BlockIdx ) -> Result < ( ) , Error > {
@@ -620,7 +620,7 @@ where
620
620
fn transfer_byte ( & mut self , out : u8 ) -> Result < u8 , Error > {
621
621
let mut read_buf = [ 0u8 ; 1 ] ;
622
622
self . spi
623
- . transfer ( & mut read_buf, & [ out] )
623
+ . transfer ( & mut read_buf, & [ out] )
624
624
. map_err ( |_| Error :: Transport ) ?;
625
625
Ok ( read_buf[ 0 ] )
626
626
}
@@ -791,7 +791,7 @@ impl Delay {
791
791
/// `Ok(())`.
792
792
fn delay < T > ( & mut self , delayer : & mut T , err : Error ) -> Result < ( ) , Error >
793
793
where
794
- T : embedded_hal:: delay:: DelayUs ,
794
+ T : embedded_hal:: delay:: DelayNs ,
795
795
{
796
796
if self . retries_left == 0 {
797
797
Err ( err)
0 commit comments