[−][src]Trait embedded_sdmmc::BlockDevice
Represents a block device - a device which can read and write blocks (or sectors). Only supports devices which are <= 2 TiB in size.
Associated Types
Loading content...Required methods
fn read(
&self,
blocks: &mut [Block],
start_block_idx: BlockIdx,
reason: &str
) -> Result<(), Self::Error>
&self,
blocks: &mut [Block],
start_block_idx: BlockIdx,
reason: &str
) -> Result<(), Self::Error>
Read one or more blocks, starting at the given block index.
fn write(
&self,
blocks: &[Block],
start_block_idx: BlockIdx
) -> Result<(), Self::Error>
&self,
blocks: &[Block],
start_block_idx: BlockIdx
) -> Result<(), Self::Error>
Write one or more blocks, starting at the given block index.
fn num_blocks(&self) -> Result<BlockCount, Self::Error>
Determine how many blocks this device can hold.
Implementors
impl<SPI, CS> BlockDevice for SdMmcSpi<SPI, CS> where
SPI: FullDuplex<u8>,
<SPI as FullDuplex<u8>>::Error: Debug,
CS: OutputPin,
[src]
SPI: FullDuplex<u8>,
<SPI as FullDuplex<u8>>::Error: Debug,
CS: OutputPin,
type Error = Error
fn read(
&self,
blocks: &mut [Block],
start_block_idx: BlockIdx,
_reason: &str
) -> Result<(), Self::Error>
[src]
&self,
blocks: &mut [Block],
start_block_idx: BlockIdx,
_reason: &str
) -> Result<(), Self::Error>
Read one or more blocks, starting at the given block index.
fn write(
&self,
blocks: &[Block],
start_block_idx: BlockIdx
) -> Result<(), Self::Error>
[src]
&self,
blocks: &[Block],
start_block_idx: BlockIdx
) -> Result<(), Self::Error>
Write one or more blocks, starting at the given block index.
fn num_blocks(&self) -> Result<BlockCount, Self::Error>
[src]
Determine how many blocks this device can hold.