Skip to content

Commit a2db432

Browse files
committed
Formatting cleanup
1 parent f6cc259 commit a2db432

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/sdio.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,12 @@ impl Sdio {
316316
pub fn read_block(&mut self, blockaddr: u32, block: &mut [u8; 512]) -> Result<(), Error> {
317317
let card = self.card()?;
318318

319-
// Always write 1 block of 512 bytes
319+
// Always read 1 block of 512 bytes
320320
// SDSC cards are byte addressed hence the blockaddress is in multiples of 512 bytes
321321
let blockaddr = match card.capacity {
322322
CardCapacity::SDSC => blockaddr * 512,
323323
_ => blockaddr,
324324
};
325-
326325
self.cmd(cmd::set_block_length(512))?;
327326
self.start_datapath_transfer(512, 9, true);
328327
self.cmd(cmd::read_single_block(blockaddr))?;
@@ -365,7 +364,6 @@ impl Sdio {
365364
CardCapacity::SDSC => blockaddr * 512,
366365
_ => blockaddr,
367366
};
368-
369367
self.cmd(cmd::set_block_length(512))?;
370368
self.start_datapath_transfer(512, 9, false);
371369
self.cmd(cmd::write_single_block(blockaddr))?;

0 commit comments

Comments
 (0)