pub struct CsdResponse {
pub raw: [u8; 16],
}Expand description
CSD register (CMD9 response, raw 16 bytes MSB-first as delivered by both SPI and SDIO transports).
Fields§
§raw: [u8; 16]Implementations§
Source§impl CsdResponse
impl CsdResponse
pub fn from_raw(raw: [u8; 16]) -> Self
Sourcepub fn version(&self) -> u8
pub fn version(&self) -> u8
CSD structure version: 0 = v1 (SDSC), 1 = v2 (SDHC/SDXC), 2 = v3 (SDUC)
Sourcepub fn capacity_blocks(&self) -> Option<u64>
pub fn capacity_blocks(&self) -> Option<u64>
User-data capacity in 512-byte blocks.
Returns None for unknown / unsupported CSD structures (e.g. SDUC v3,
which encodes a 28-bit C_SIZE that does not fit the v2 formula).
Trait Implementations§
Source§impl Clone for CsdResponse
impl Clone for CsdResponse
Source§fn clone(&self) -> CsdResponse
fn clone(&self) -> CsdResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CsdResponse
impl Debug for CsdResponse
impl Copy for CsdResponse
Auto Trait Implementations§
impl Freeze for CsdResponse
impl RefUnwindSafe for CsdResponse
impl Send for CsdResponse
impl Sync for CsdResponse
impl Unpin for CsdResponse
impl UnsafeUnpin for CsdResponse
impl UnwindSafe for CsdResponse
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