Skip to content

Commit d0f4141

Browse files
committed
Move to default_instance QSPIF
1 parent 49a9994 commit d0f4141

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/Arduino_Portenta_OTA_QSPI.cpp

+1-11
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525

2626
using namespace arduino;
2727

28-
#if defined (COMPONENT_4343W_FS)
29-
extern QSPIFBlockDevice *qspi_bd;
30-
#endif
31-
3228
/******************************************************************************
3329
CTOR/DTOR
3430
******************************************************************************/
@@ -47,13 +43,7 @@ Arduino_Portenta_OTA_QSPI::Arduino_Portenta_OTA_QSPI(StorageTypePortenta const s
4743

4844
bool Arduino_Portenta_OTA_QSPI::init()
4945
{
50-
#if !defined (COMPONENT_4343W_FS)
51-
qspi_bd = new QSPIFBlockDevice(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
52-
if (qspi_bd->init() != QSPIF_BD_ERROR_OK) {
53-
Serial1.println("Error: QSPI init failure.");
54-
return false;
55-
}
56-
#endif
46+
auto qspi_bd = mbed::BlockDevice::get_default_instance();
5747

5848
if(_storage_type == QSPI_FLASH_FATFS)
5949
{

src/Arduino_Portenta_OTA_QSPI.h

-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ class Arduino_Portenta_OTA_QSPI : public Arduino_Portenta_OTA
4747

4848
mbed::BlockDevice * _bd_qspi;
4949
mbed::FATFileSystem * _fs_qspi;
50-
#if !defined (COMPONENT_4343W_FS)
51-
QSPIFBlockDevice *qspi_bd;
52-
#endif
53-
5450
};
5551

5652
#endif /* ARDUINO_PORTENTA_OTA_QSPI_H_ */

0 commit comments

Comments
 (0)