sdmmc-core 0.5.0

SD/MMC core data structures and algorithms
Documentation
#[allow(unused)]
use super::CsdV2;
use crate::lib_bitfield;

lib_bitfield! {
    /// Represents the raw bitfield for the [CsdV2].
    pub CsdV2Bitfield(MSB0 [u8; 16]): u32 {
        /// Represents the raw `CSD_STRUCTURE` field for the [CsdV2].
        pub raw_csd_structure: 127, 126;
        /// Represents the raw `TAAC` field for the [CsdV2].
        pub raw_taac: 119, 112;
        /// Represents the raw `NSAC` field for the [CsdV2].
        pub raw_nsac: 111, 104;
        /// Represents the raw `TRAN_SPEED` field for the [CsdV2].
        pub raw_tran_speed: 103, 96;
        /// Represents the raw `CCC` field for the [CsdV2].
        pub raw_ccc: 95, 84;
        /// Represents the raw `READ_BL_LEN` field for the [CsdV2].
        pub raw_read_bl_len: 83, 80;
        /// Represents the raw `READ_BL_PARTIAL` field for the [CsdV2].
        pub raw_read_bl_partial: 79;
        /// Represents the raw `WRITE_BLK_MISALIGN` field for the [CsdV2].
        pub raw_write_blk_misalign: 78;
        /// Represents the raw `READ_BLK_MISALIGN` field for the [CsdV2].
        pub raw_read_blk_misalign: 77;
        /// Represents the raw `DSR_IMPL` field for the [CsdV2].
        pub raw_dsr_imp: 76;
        /// Represents the raw `C_SIZE` field for the [CsdV2].
        pub raw_c_size: 69, 48;
        /// Represents the raw `ERASE_BLK_EN` field for the [CsdV2].
        pub raw_erase_blk_en: 46;
        /// Represents the raw `SECTOR_SIZE` field for the [CsdV2].
        pub raw_sector_size: 45, 39;
        /// Represents the raw `WR_GRP_SIZE` field for the [CsdV2].
        pub raw_wp_grp_size: 38, 32;
        /// Represents the raw `WR_GRP_ENABLE` field for the [CsdV2].
        pub raw_wp_grp_enable: 31;
        /// Represents the raw `R2W_FACTOR` field for the [CsdV2].
        pub raw_r2w_factor: 28, 26;
        /// Represents the raw `WRITE_BL_LEN` field for the [CsdV2].
        pub raw_write_bl_len: 25, 22;
        /// Represents the raw `WRITE_BL_PARTIAL` field for the [CsdV2].
        pub raw_write_bl_partial: 21;
        /// Represents the raw `FILE_FORMAT_GRP` field for the [CsdV2].
        pub raw_file_format_grp: 15;
        /// Represents the raw `COPY` field for the [CsdV2].
        pub raw_copy: 14;
        /// Represents the raw `PERM_WRITE_PROTECT` field for the [CsdV2].
        pub raw_perm_write_protect: 13;
        /// Represents the raw `TMP_WRITE_PROTECT` field for the [CsdV2].
        pub raw_tmp_write_protect: 12;
        /// Represents the raw `RAW_FILE_FORMAT` field for the [CsdV2].
        pub raw_file_format: 11, 10;
        /// Represents the raw `WP_UPC` field for the [CsdV2].
        pub raw_wp_upc: 9;
        /// Represents the raw `CRC` field for the [CsdV2].
        pub raw_crc: 7, 1;
        /// Represents the raw `END` field for the [CsdV2].
        pub raw_end: 0;
    }
}