File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 79
79
80
80
ifeq ($(CHIP_FAMILY ) , same54)
81
81
PERIPHERALS_CHIP_FAMILY =sam_d5x_e5x
82
- OPTIMIZATION_FLAGS ?= -O2
82
+ OPTIMIZATION_FLAGS ?= -Os
83
83
# TinyUSB defines
84
84
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
85
85
endif
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