[−][src]Struct stm32h7_sdmmc::Sdmmc
Sdmmc device
Implementations
impl Sdmmc<SDMMC1>
[src]
pub fn sdmmc1(
sdmmc: SDMMC1,
bus_width: BusWidth,
prec: Sdmmc1,
clocks: &CoreClocks
) -> Self
[src]
sdmmc: SDMMC1,
bus_width: BusWidth,
prec: Sdmmc1,
clocks: &CoreClocks
) -> Self
Initialise SDMMC peripheral
pub fn init_card(&mut self, freq: impl Into<Hertz>) -> Result<(), Error>
[src]
Initializes card (if present) and sets the bus at the specified frequency.
pub fn card(&self) -> Result<&Card, Error>
[src]
Get a reference to the initialized card
Errors
Returns Error::NoCard if init_card
has not previously succeeded
pub fn clock(&self) -> Hertz
[src]
Get the current SDMMC bus clock
pub fn read_block(
&mut self,
address: u32,
buffer: &mut [u8; 512]
) -> Result<(), Error>
[src]
&mut self,
address: u32,
buffer: &mut [u8; 512]
) -> Result<(), Error>
Read block from card.
address
is the block address.
pub fn read_blocks(
&mut self,
address: u32,
buffer: &mut [u8]
) -> Result<(), Error>
[src]
&mut self,
address: u32,
buffer: &mut [u8]
) -> Result<(), Error>
Read mutliple blocks from card. The length of the buffer must be multiple of 512.
address
is the block address.
pub fn write_block(
&mut self,
address: u32,
buffer: &[u8; 512]
) -> Result<(), Error>
[src]
&mut self,
address: u32,
buffer: &[u8; 512]
) -> Result<(), Error>
Write block to card. Buffer must be 512 bytes
impl Sdmmc<SDMMC2>
[src]
pub fn sdmmc2(
sdmmc: SDMMC2,
bus_width: BusWidth,
prec: Sdmmc2,
clocks: &CoreClocks
) -> Self
[src]
sdmmc: SDMMC2,
bus_width: BusWidth,
prec: Sdmmc2,
clocks: &CoreClocks
) -> Self
Initialise SDMMC peripheral
pub fn init_card(&mut self, freq: impl Into<Hertz>) -> Result<(), Error>
[src]
Initializes card (if present) and sets the bus at the specified frequency.
pub fn card(&self) -> Result<&Card, Error>
[src]
Get a reference to the initialized card
Errors
Returns Error::NoCard if init_card
has not previously succeeded
pub fn clock(&self) -> Hertz
[src]
Get the current SDMMC bus clock
pub fn read_block(
&mut self,
address: u32,
buffer: &mut [u8; 512]
) -> Result<(), Error>
[src]
&mut self,
address: u32,
buffer: &mut [u8; 512]
) -> Result<(), Error>
Read block from card.
address
is the block address.
pub fn read_blocks(
&mut self,
address: u32,
buffer: &mut [u8]
) -> Result<(), Error>
[src]
&mut self,
address: u32,
buffer: &mut [u8]
) -> Result<(), Error>
Read mutliple blocks from card. The length of the buffer must be multiple of 512.
address
is the block address.
pub fn write_block(
&mut self,
address: u32,
buffer: &[u8; 512]
) -> Result<(), Error>
[src]
&mut self,
address: u32,
buffer: &[u8; 512]
) -> Result<(), Error>
Write block to card. Buffer must be 512 bytes
Trait Implementations
Auto Trait Implementations
impl<SDMMC> Send for Sdmmc<SDMMC> where
SDMMC: Send,
SDMMC: Send,
impl<SDMMC> Sync for Sdmmc<SDMMC> where
SDMMC: Sync,
SDMMC: Sync,
impl<SDMMC> Unpin for Sdmmc<SDMMC> where
SDMMC: Unpin,
SDMMC: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,