Struct Ocr

Source
#[repr(C)]
pub struct Ocr(/* private fields */);
Expand description

Represents the SD card operation conditions register (OCR).

Implementations§

Source§

impl Ocr

Source

pub const fn bits(&self) -> u32

Gets the bit value for Ocr.

Source

pub const fn vdd_2728(&self) -> bool

Getter for vdd_2728 field of Ocr.

VDD Volatage Window (VDD1): 2.7-2.8V.

Source

pub fn set_vdd_2728(&mut self, val: bool)

Setter for vdd_2728 field of Ocr.

VDD Volatage Window (VDD1): 2.7-2.8V.

Source

pub const fn vdd_2829(&self) -> bool

Getter for vdd_2829 field of Ocr.

VDD Volatage Window (VDD1): 2.8-2.9V.

Source

pub fn set_vdd_2829(&mut self, val: bool)

Setter for vdd_2829 field of Ocr.

VDD Volatage Window (VDD1): 2.8-2.9V.

Source

pub const fn vdd_2930(&self) -> bool

Getter for vdd_2930 field of Ocr.

VDD Volatage Window (VDD1): 2.9-3.0V.

Source

pub fn set_vdd_2930(&mut self, val: bool)

Setter for vdd_2930 field of Ocr.

VDD Volatage Window (VDD1): 2.9-3.0V.

Source

pub const fn vdd_3031(&self) -> bool

Getter for vdd_3031 field of Ocr.

VDD Volatage Window (VDD1): 3.0-3.1V.

Source

pub fn set_vdd_3031(&mut self, val: bool)

Setter for vdd_3031 field of Ocr.

VDD Volatage Window (VDD1): 3.0-3.1V.

Source

pub const fn vdd_3132(&self) -> bool

Getter for vdd_3132 field of Ocr.

VDD Volatage Window (VDD1): 3.1-3.2V.

Source

pub fn set_vdd_3132(&mut self, val: bool)

Setter for vdd_3132 field of Ocr.

VDD Volatage Window (VDD1): 3.1-3.2V.

Source

pub const fn vdd_3233(&self) -> bool

Getter for vdd_3233 field of Ocr.

VDD Volatage Window (VDD1): 3.2-3.3V.

Source

pub fn set_vdd_3233(&mut self, val: bool)

Setter for vdd_3233 field of Ocr.

VDD Volatage Window (VDD1): 3.2-3.3V.

Source

pub const fn vdd_3334(&self) -> bool

Getter for vdd_3334 field of Ocr.

VDD Volatage Window (VDD1): 3.3-3.4V.

Source

pub fn set_vdd_3334(&mut self, val: bool)

Setter for vdd_3334 field of Ocr.

VDD Volatage Window (VDD1): 3.3-3.4V.

Source

pub const fn vdd_3435(&self) -> bool

Getter for vdd_3435 field of Ocr.

VDD Volatage Window (VDD1): 3.4-3.5V.

Source

pub fn set_vdd_3435(&mut self, val: bool)

Setter for vdd_3435 field of Ocr.

VDD Volatage Window (VDD1): 3.4-3.5V.

Source

pub const fn vdd_3536(&self) -> bool

Getter for vdd_3536 field of Ocr.

VDD Volatage Window (VDD1): 3.5-3.6V.

Source

pub fn set_vdd_3536(&mut self, val: bool)

Setter for vdd_3536 field of Ocr.

VDD Volatage Window (VDD1): 3.5-3.6V.

Source

pub const fn s18a(&self) -> bool

Getter for s18a field of Ocr.

Switching to 1.8V accepted (S18A).

Source

pub fn set_s18a(&mut self, val: bool)

Setter for s18a field of Ocr.

Switching to 1.8V accepted (S18A).

Source

pub const fn co2t(&self) -> bool

Getter for co2t field of Ocr.

Over 2TB support status (CO2T).

Source

pub fn set_co2t(&mut self, val: bool)

Setter for co2t field of Ocr.

Over 2TB support status (CO2T).

Source

pub const fn uhs2(&self) -> bool

Getter for uhs2 field of Ocr.

UHS-II Card Status.

Source

pub fn set_uhs2(&mut self, val: bool)

Setter for uhs2 field of Ocr.

UHS-II Card Status.

Source

pub const fn ccs(&self) -> bool

Getter for ccs field of Ocr.

Card Capacity Status (CCS).

Only valid when the card power up status bit (busy) is set.

Source

pub fn set_ccs(&mut self, val: bool)

Setter for ccs field of Ocr.

Card Capacity Status (CCS).

Only valid when the card power up status bit (busy) is set.

Source

pub const fn busy(&self) -> bool

Getter for busy field of Ocr.

Card power up status bit (busy).

Set to low if the card has not finished power up routine.

Source

pub fn set_busy(&mut self, val: bool)

Setter for busy field of Ocr.

Card power up status bit (busy).

Set to low if the card has not finished power up routine.

Source§

impl Ocr

Source

pub const LEN: usize = 4usize

Represents the byte length of the Ocr.

Source

pub const fn new() -> Self

Creates a new Ocr.

Source

pub const fn from_bits(val: u32) -> Self

Converts an u32 into a Ocr

Source

pub const fn try_from_bytes(val: &[u8]) -> Result<Self>

Attempts to convert a byte slice into a Ocr.

Source

pub const fn bytes(&self) -> [u8; 4]

Converts an Ocr into a byte array.

Trait Implementations§

Source§

impl Clone for Ocr

Source§

fn clone(&self) -> Ocr

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 Ocr

Source§

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

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

impl Default for Ocr

Source§

fn default() -> Self

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

impl From<Ocr> for [u8; 4]

Source§

fn from(val: Ocr) -> Self

Converts to this type from the input type.
Source§

impl From<Ocr> for u32

Source§

fn from(val: Ocr) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Ocr

Source§

fn from(val: u32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Ocr

Source§

fn eq(&self, other: &Ocr) -> 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 TryFrom<&[u8]> for Ocr

Source§

type Error = Error

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

fn try_from(val: &[u8]) -> Result<Self>

Performs the conversion.
Source§

impl<const N: usize> TryFrom<&[u8; N]> for Ocr

Source§

type Error = Error

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

fn try_from(val: &[u8; N]) -> Result<Self>

Performs the conversion.
Source§

impl<const N: usize> TryFrom<[u8; N]> for Ocr

Source§

type Error = Error

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

fn try_from(val: [u8; N]) -> Result<Self>

Performs the conversion.
Source§

impl Copy for Ocr

Source§

impl Eq for Ocr

Source§

impl StructuralPartialEq for Ocr

Auto Trait Implementations§

§

impl Freeze for Ocr

§

impl RefUnwindSafe for Ocr

§

impl Send for Ocr

§

impl Sync for Ocr

§

impl Unpin for Ocr

§

impl UnwindSafe for Ocr

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, 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.