File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
ports/atmel-samd/common-hal/sdioio Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,6 @@ CLK PA21 PCC_D? (D32) BROWN
114
114
gpio_set_pin_pull_mode (functions [i ]-> pin ,
115
115
(i == 1 || i == 5 ) ? GPIO_PULL_OFF : GPIO_PULL_UP );
116
116
gpio_set_pin_function (functions [i ]-> pin , GPIO_PIN_FUNCTION_SDIO );
117
-
118
- common_hal_never_reset_pin (functions [i ]-> obj );
119
117
}
120
118
121
119
self -> num_data = num_data ;
@@ -145,6 +143,12 @@ CLK PA21 PCC_D? (D32) BROWN
145
143
}
146
144
147
145
if (result != SD_MMC_OK ) {
146
+ for (size_t i = 0 ; i < MP_ARRAY_SIZE (functions ); i ++ ) {
147
+ if (!functions [i ]-> obj ) {
148
+ break ;
149
+ }
150
+ reset_pin_number (functions [i ]-> obj -> number );
151
+ }
148
152
mp_raise_OSError_msg_varg (translate ("%q failure: %d" ), MP_QSTR_sd_mmc_check , (int )result );
149
153
}
150
154
// sd_mmc_get_capacity() is in KiB, but our "capacity" is in 512-byte blocks
You can’t perform that action at this time.
0 commit comments