pub struct AtsamdMci { /* private fields */ }
Implementations§
Source§impl AtsamdMci
impl AtsamdMci
pub fn new(sdhc: SDHC0) -> AtsamdMci
pub fn reset(&mut self)
pub fn wait_busy(&mut self) -> Result<(), MciError>
pub fn set_speed(&mut self, speed: u32, prog_clock_mode: u8)
Sourcepub fn send_command_execute(
&mut self,
cmdr: u16,
cmd: u32,
arg: u32,
) -> Result<(), MciError>
pub fn send_command_execute( &mut self, cmdr: u16, cmd: u32, arg: u32, ) -> Result<(), MciError>
Send a command
pub fn eistr_err(&mut self) -> Result<(), MciError>
pub fn loop_or_on_eistr_err<F: FnMut(&mut AtsamdMci) -> bool>( &mut self, f: F, ) -> Result<(), MciError>
Trait Implementations§
Source§impl Mci for AtsamdMci
impl Mci for AtsamdMci
Source§fn send_clock(&mut self) -> Result<(), MciError>
fn send_clock(&mut self) -> Result<(), MciError>
Send 74 clock cycles on the line. Note: It is required after card plug and before card install.
fn send_command(&mut self, cmd: u32, arg: u32) -> Result<(), MciError>
Source§fn select_device(
&mut self,
_slot: u8,
clock: u32,
bus_width: &BusWidth,
high_speed: bool,
) -> Result<(), MciError>
fn select_device( &mut self, _slot: u8, clock: u32, bus_width: &BusWidth, high_speed: bool, ) -> Result<(), MciError>
Select a device and initialize it
Source§fn get_bus_width(&mut self, slot: u8) -> Result<BusWidth, MciError>
fn get_bus_width(&mut self, slot: u8) -> Result<BusWidth, MciError>
Get the maximum bus width for a device
Source§fn is_high_speed_capable(&mut self) -> Result<bool, MciError>
fn is_high_speed_capable(&mut self) -> Result<bool, MciError>
Whether the device is high speed capable
Source§fn get_response128(&mut self) -> Result<[u32; 4], MciError>
fn get_response128(&mut self) -> Result<[u32; 4], MciError>
Get 128 bits response of last command
Source§fn adtc_start(
&mut self,
command: u32,
argument: u32,
block_size: u16,
block_amount: u16,
_access_in_blocks: bool,
) -> Result<(), MciError>
fn adtc_start( &mut self, command: u32, argument: u32, block_size: u16, block_amount: u16, _access_in_blocks: bool, ) -> Result<(), MciError>
ADTC command start
An ADTC (Addressed Data Transfer Commands) is used for R/W access Read more
Source§fn adtc_stop(&self, _command: u32, _argument: u32) -> Result<(), MciError>
fn adtc_stop(&self, _command: u32, _argument: u32) -> Result<(), MciError>
ADTC command stop
Send a command to stop an ADTC Read more
Source§fn read_blocks(
&mut self,
destination: &mut [u8],
number_of_blocks: u16,
) -> Result<bool, MciError>
fn read_blocks( &mut self, destination: &mut [u8], number_of_blocks: u16, ) -> Result<bool, MciError>
Start a read block transfer on the line Read more
Source§fn write_blocks(
&mut self,
write_data: &[u8],
number_of_blocks: u16,
) -> Result<bool, MciError>
fn write_blocks( &mut self, write_data: &[u8], number_of_blocks: u16, ) -> Result<bool, MciError>
Start a write block transfer on the line Read more
Auto Trait Implementations§
impl Freeze for AtsamdMci
impl RefUnwindSafe for AtsamdMci
impl Send for AtsamdMci
impl !Sync for AtsamdMci
impl Unpin for AtsamdMci
impl UnwindSafe for AtsamdMci
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more