Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca1cd95

Browse filesBrowse files
committed
QSPIFormat: use BlockDevice::get_default_instance()
1 parent b977c1a commit ca1cd95
Copy full SHA for ca1cd95

File tree

1 file changed

+10
-10
lines changed
Filter options

1 file changed

+10
-10
lines changed

‎libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino

Copy file name to clipboardExpand all lines: libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "QSPIFBlockDevice.h"
1+
#include "BlockDevice.h"
22
#include "MBRBlockDevice.h"
33
#include "LittleFileSystem.h"
44
#include "FATFileSystem.h"
@@ -8,10 +8,10 @@
88
#endif
99

1010

11-
QSPIFBlockDevice root(QSPI_SO0, QSPI_SO1, QSPI_SO2, QSPI_SO3, QSPI_SCK, QSPI_CS, QSPIF_POLARITY_MODE_1, 40000000);
12-
mbed::MBRBlockDevice wifi_data(&root, 1);
13-
mbed::MBRBlockDevice ota_data(&root, 2);
14-
mbed::MBRBlockDevice user_data(&root, 3);
11+
mbed::BlockDevice* root = mbed::BlockDevice::get_default_instance();
12+
mbed::MBRBlockDevice wifi_data(root, 1);
13+
mbed::MBRBlockDevice ota_data(root, 2);
14+
mbed::MBRBlockDevice user_data(root, 3);
1515
mbed::FATFileSystem wifi_data_fs("wlan");
1616
mbed::FATFileSystem ota_data_fs("fs");
1717
mbed::FileSystem * user_data_fs;
@@ -60,14 +60,14 @@ void setup() {
6060
Serial.println("Do you want to proceed? Y/[n]");
6161

6262
if (true == waitResponse()) {
63-
mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024);
63+
mbed::MBRBlockDevice::partition(root, 1, 0x0B, 0, 1024 * 1024);
6464
if(default_scheme) {
65-
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 14 * 1024 * 1024, 14 * 1024 * 1024);
66-
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 14 * 1024 * 1024);
65+
mbed::MBRBlockDevice::partition(root, 3, 0x0B, 14 * 1024 * 1024, 14 * 1024 * 1024);
66+
mbed::MBRBlockDevice::partition(root, 2, 0x0B, 1024 * 1024, 14 * 1024 * 1024);
6767
// use space from 15.5MB to 16 MB for another fw, memory mapped
6868
} else {
69-
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 6 * 1024 * 1024);
70-
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 6 * 1024 * 1024, 14 * 1024 * 1024);
69+
mbed::MBRBlockDevice::partition(root, 2, 0x0B, 1024 * 1024, 6 * 1024 * 1024);
70+
mbed::MBRBlockDevice::partition(root, 3, 0x0B, 6 * 1024 * 1024, 14 * 1024 * 1024);
7171
// use space from 15.5MB to 16 MB for another fw, memory mapped
7272
}
7373

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.