@@ -203,7 +203,7 @@ where
203203 fn read ( & mut self , blocks : & mut [ Block ] , start_block_idx : BlockIdx ) -> Result < ( ) , Error > {
204204 let start_idx = match self . card_type {
205205 Some ( CardType :: SD1 | CardType :: SD2 ) => start_block_idx. 0 * 512 ,
206- Some ( CardType :: SDHC ) => start_block_idx. 0 ,
206+ Some ( CardType :: SdhcSdxc ) => start_block_idx. 0 ,
207207 None => return Err ( Error :: CardNotFound ) ,
208208 } ;
209209
@@ -227,7 +227,7 @@ where
227227 fn write ( & mut self , blocks : & [ Block ] , start_block_idx : BlockIdx ) -> Result < ( ) , Error > {
228228 let start_idx = match self . card_type {
229229 Some ( CardType :: SD1 | CardType :: SD2 ) => start_block_idx. 0 * 512 ,
230- Some ( CardType :: SDHC ) => start_block_idx. 0 ,
230+ Some ( CardType :: SdhcSdxc ) => start_block_idx. 0 ,
231231 None => return Err ( Error :: CardNotFound ) ,
232232 } ;
233233 if blocks. len ( ) == 1 {
@@ -293,7 +293,7 @@ where
293293 self . read_data ( & mut csd_raw) ?;
294294 Ok ( csd:: Csd :: V1 ( csd:: CsdV1 :: from_be_bytes ( & csd_raw) ) )
295295 }
296- Some ( CardType :: SD2 | CardType :: SDHC ) => {
296+ Some ( CardType :: SD2 | CardType :: SdhcSdxc ) => {
297297 if self . card_command ( CMD9 , 0 ) ? != 0 {
298298 return Err ( Error :: RegisterReadError ) ;
299299 }
@@ -443,7 +443,7 @@ where
443443 let mut buffer = [ 0xFF ; 4 ] ;
444444 s. transfer_bytes ( & mut buffer) ?;
445445 if ( buffer[ 0 ] & 0xC0 ) == 0xC0 {
446- card_type = CardType :: SDHC ;
446+ card_type = CardType :: SdhcSdxc ;
447447 }
448448 // Ignore the other three bytes
449449 }
@@ -642,10 +642,10 @@ pub enum CardType {
642642 ///
643643 /// Uses byte-addressing internally, so limited to 2GiB in size.
644644 SD2 ,
645- /// An high-capacity 'SDHC' Card.
645+ /// An high-capacity 'SDHC' Card or an extended-capacity 'SDXC' card .
646646 ///
647647 /// Uses block-addressing internally to support capacities above 2GiB.
648- SDHC ,
648+ SdhcSdxc ,
649649}
650650
651651/// This an object you can use to busy-wait with a timeout.
0 commit comments