MmcConfig

Struct MmcConfig 

Source
pub struct MmcConfig { /* private fields */ }
Expand description

Represents the SD/MMC state-machine.

Implementations§

Source§

impl MmcConfig

Source

pub const fn new() -> Self

Creates a new MmcConfig.

Source

pub const fn bus_mode(&self) -> BusMode

Gets the BusMode for the MmcConfig.

Source

pub fn set_bus_mode(&mut self, bus_mode: BusMode)

Sets the BusMode for the MmcConfig.

Source

pub const fn with_bus_mode(self, bus_mode: BusMode) -> Self

Builder function that sets the BusMode for the MmcConfig.

Source

pub const fn bus_width(&self) -> BusWidth

Gets the BusWidth for the MmcConfig.

Source

pub fn set_bus_width(&mut self, bus_width: BusWidth)

Sets the BusWidth for the MmcConfig.

Source

pub const fn with_bus_width(self, bus_width: BusWidth) -> Self

Builder function that sets the BusWidth for the MmcConfig.

Source

pub const fn power_mode(&self) -> PowerMode

Gets the PowerMode for the MmcConfig.

Source

pub fn set_power_mode(&mut self, power_mode: PowerMode)

Sets the PowerMode for the MmcConfig.

Source

pub const fn with_power_mode(self, power_mode: PowerMode) -> Self

Builder function that sets the PowerMode for the MmcConfig.

Source

pub const fn timing(&self) -> Timing

Gets the Timing for the MmcConfig.

Source

pub fn set_timing(&mut self, timing: Timing)

Sets the Timing for the MmcConfig.

Source

pub const fn with_timing(self, timing: Timing) -> Self

Builder function that sets the Timing for the MmcConfig.

Source

pub const fn slot(&self) -> usize

Gets the slot for the MmcConfig.

Source

pub fn set_slot(&mut self, slot: usize)

Sets the slot for the MmcConfig.

Source

pub const fn with_slot(self, slot: usize) -> Self

Builder function that sets the slot for the MmcConfig.

Source

pub const fn erase_mode(&self) -> EraseMode

Gets the EraseMode for the MmcConfig.

Source

pub fn set_erase_mode(&mut self, erase_mode: EraseMode)

Sets the EraseMode for the MmcConfig.

Source

pub const fn with_erase_mode(self, erase_mode: EraseMode) -> Self

Builder function that sets the EraseMode for the MmcConfig.

Source

pub const fn address_mode(&self) -> AddressMode

Gets the AddressMode for the MmcConfig.

Source

pub fn set_address_mode(&mut self, address_mode: AddressMode)

Sets the AddressMode for the MmcConfig.

Source

pub const fn with_address_mode(self, address_mode: AddressMode) -> Self

Builder function that sets the AddressMode for the MmcConfig.

Source

pub const fn csd(&self) -> &Csd

Gets a reference to the Csd for the MmcConfig.

Source

pub fn csd_mut(&mut self) -> &mut Csd

Gets a mutable reference to the Csd for the MmcConfig.

Source

pub fn set_csd(&mut self, csd: Csd)

Sets the Csd for the MmcConfig.

Source

pub const fn with_csd(self, csd: Csd) -> Self

Builder function that sets the Csd for the MmcConfig.

Source

pub const fn ext_csd(&self) -> &ExtCsd

Gets a reference to the ExtCsd for the MmcConfig.

Source

pub fn ext_csd_mut(&mut self) -> &mut ExtCsd

Gets a mutable reference to the ExtCsd for the MmcConfig.

Source

pub fn set_ext_csd(&mut self, ext_csd: ExtCsd)

Sets the ExtCsd for the MmcConfig.

Source

pub const fn with_ext_csd(self, ext_csd: ExtCsd) -> Self

Builder function that sets the ExtCsd for the MmcConfig.

Source

pub const fn wp_grp_size(&self) -> u32

Gets the wp_grp_size for the MmcConfig.

Source

pub fn set_wp_grp_size(&mut self)

Sets the wp_grp_size for the MmcConfig.

Source

pub const fn can_discard(&self) -> bool

Gets whether the device supports the DISCARD feature.

Source

pub const fn can_trim(&self) -> bool

Gets whether the device supports the TRIM feature.

Source

pub const fn hs200(&self) -> bool

Gets whether the device is configured for HS200 timing.

Source

pub const fn hs400(&self) -> bool

Gets whether the device is configured for HS400 timing.

Source

pub const fn hs400es(&self) -> bool

Gets whether the device is configured for HS400 timing.

Source

pub const fn erase_size(&self) -> usize

Gets the erase size for the device.

Source

pub fn set_erase_size(&mut self)

Sets the erase size for the device read from the CSD register.

Trait Implementations§

Source§

impl Clone for MmcConfig

Source§

fn clone(&self) -> MmcConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MmcConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MmcConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MmcConfig

Source§

fn eq(&self, other: &MmcConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for MmcConfig

Source§

impl Eq for MmcConfig

Source§

impl StructuralPartialEq for MmcConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.