Skip to content

Commit ffed79e

Browse files
committed
fix: don't wait for not busy if CMD0 or CMD12
Also remove unused AcquireOpt option
1 parent 3be7da4 commit ffed79e

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/sdmmc.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,11 @@ impl Delay {
129129
pub struct AcquireOpts {
130130
/// Some cards don't support CRC mode. At least a 512MiB Transcend one.
131131
pub require_crc: bool,
132-
/// Some cards should send CMD0 after an idle state to avoid being stuck in [`TimeoutWaitNotBusy`].
133-
/// See [this conversation](https://github.com/rust-embedded-community/embedded-sdmmc-rs/issues/33#issue-803000031)
134-
/// and [this one])(https://github.com/rust-embedded-community/embedded-sdmmc-rs/pull/32#issue-802999340).
135-
pub skip_wait_not_busy: bool,
136132
}
137133

138134
impl Default for AcquireOpts {
139135
fn default() -> Self {
140-
AcquireOpts {
141-
require_crc: true,
142-
skip_wait_not_busy: false,
143-
}
136+
AcquireOpts { require_crc: true }
144137
}
145138
}
146139

@@ -311,7 +304,9 @@ where
311304

312305
/// Perform a command.
313306
fn card_command(&self, command: u8, arg: u32) -> Result<u8, Error> {
314-
self.wait_not_busy()?;
307+
if command != CMD0 && command != CMD12 {
308+
self.wait_not_busy()?;
309+
}
315310

316311
let mut buf = [
317312
0x40 | command,

0 commit comments

Comments
 (0)