Skip to content

Commit 7e33906

Browse files
author
Simon Struck
committed
Annotate readme_test.rs to make section clearer
1 parent 1371292 commit 7e33906

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/readme_test.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,14 @@ impl From<embedded_sdmmc::SdCardError> for Error {
9494
}
9595

9696
fn main() -> Result<(), Error> {
97+
// BEGIN Fake stuff that will be replaced with real peripherals
9798
let spi_bus = RefCell::new(FakeSpiBus());
9899
let delay = FakeDelayer();
99100
let sdmmc_spi = embedded_hal_bus::spi::RefCellDevice::new(&spi_bus, DummyCsPin, delay);
100101
let sdmmc_cs = FakeCs();
101102
let time_source = FakeTimesource();
103+
// END Fake stuff that will be replaced with real peripherals
104+
102105
// Build an SD Card interface out of an SPI device, a chip-select pin and the delay object
103106
let sdcard = embedded_sdmmc::SdCard::new(sdmmc_spi, sdmmc_cs, delay);
104107
// Get the card size (this also triggers card initialisation because it's not been done yet)

0 commit comments

Comments
 (0)