Struct CsdV2

Source
pub struct CsdV2 {
    pub data: [u8; 16],
}
Expand description

Card Specific Data, version 2

Fields§

§data: [u8; 16]

The 16-bytes of data in this Card Specific Data block

Implementations§

Source§

impl CsdV2

Source

pub fn new() -> CsdV2

Create a new, empty, CSD

Source

pub fn csd_ver(&self) -> u8

Get the value from the $name field

Source

pub fn data_read_access_time1(&self) -> u8

Get the value from the $name field

Source

pub fn data_read_access_time2(&self) -> u8

Get the value from the $name field

Source

pub fn max_data_transfer_rate(&self) -> u8

Get the value from the $name field

Source

pub fn card_command_classes(&self) -> u16

Gets the value from the $name field

Source

pub fn read_block_length(&self) -> u8

Get the value from the $name field

Source

pub fn read_partial_blocks(&self) -> bool

Get the value from the $name field

Source

pub fn write_block_misalignment(&self) -> bool

Get the value from the $name field

Source

pub fn read_block_misalignment(&self) -> bool

Get the value from the $name field

Source

pub fn dsr_implemented(&self) -> bool

Get the value from the $name field

Source

pub fn device_size(&self) -> u32

Gets the value from the $name field

Source

pub fn erase_single_block_enabled(&self) -> bool

Get the value from the $name field

Source

pub fn erase_sector_size(&self) -> u8

Gets the value from the $name field

Source

pub fn write_protect_group_size(&self) -> u8

Get the value from the $name field

Source

pub fn write_protect_group_enable(&self) -> bool

Get the value from the $name field

Source

pub fn write_speed_factor(&self) -> u8

Get the value from the $name field

Source

pub fn max_write_data_length(&self) -> u8

Gets the value from the $name field

Source

pub fn write_partial_blocks(&self) -> bool

Get the value from the $name field

Source

pub fn file_format(&self) -> u8

Get the value from the $name field

Source

pub fn temporary_write_protection(&self) -> bool

Get the value from the $name field

Source

pub fn permanent_write_protection(&self) -> bool

Get the value from the $name field

Source

pub fn copy_flag_set(&self) -> bool

Get the value from the $name field

Source

pub fn file_format_group_set(&self) -> bool

Get the value from the $name field

Source

pub fn crc(&self) -> u8

Get the value from the $name field

Source

pub fn card_capacity_bytes(&self) -> u64

Returns the card capacity in bytes

Source

pub fn card_capacity_blocks(&self) -> u32

Returns the card capacity in 512-byte blocks

Trait Implementations§

Source§

impl Debug for CsdV2

Source§

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

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

impl Default for CsdV2

Source§

fn default() -> CsdV2

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

Auto Trait Implementations§

§

impl Freeze for CsdV2

§

impl RefUnwindSafe for CsdV2

§

impl Send for CsdV2

§

impl Sync for CsdV2

§

impl Unpin for CsdV2

§

impl UnwindSafe for CsdV2

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