Skip to content

Commit 04530f4

Browse files
committed
Use mbed::BlockDevice::get_default_instance() initializing BlockTableData
1 parent 34efca4 commit 04530f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/default_bd.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static void initBlockTable(void) {
148148
BOOT_LOG_ERR("SDMMC");
149149
#endif
150150
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
151-
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new QSPIFBlockDevice(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
151+
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = mbed::BlockDevice::get_default_instance();
152152
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd;
153153
} else {
154154
BOOT_LOG_ERR("Config");
@@ -236,7 +236,7 @@ static void initBlockTable(void) {
236236
BOOT_LOG_ERR("SDMMC");
237237
#endif
238238
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
239-
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new QSPIFBlockDevice(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
239+
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = mbed::BlockDevice::get_default_instance();
240240
} else {
241241
BOOT_LOG_ERR("U config");
242242
}
@@ -250,7 +250,7 @@ static void initBlockTable(void) {
250250
BOOT_LOG_ERR("SDMMC");
251251
#endif
252252
} else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
253-
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = new QSPIFBlockDevice(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
253+
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = mbed::BlockDevice::get_default_instance();
254254
} else {
255255
BOOT_LOG_ERR("S config");
256256
}

0 commit comments

Comments
 (0)