File tree Expand file tree Collapse file tree 2 files changed +8
-18
lines changed
Expand file tree Collapse file tree 2 files changed +8
-18
lines changed Original file line number Diff line number Diff line change 11#include " SFU.h"
22#include " FlashIAPBlockDevice.h"
33#include " FATFileSystem.h"
4- #include " PluggableUSBMSD.h"
4+ // #include "PluggableUSBMSD.h"
55
66const unsigned char SFU[0x10000 ] __attribute__ ((section(" .second_stage_ota" ), used)) = {
77 #include " rp2040.h"
88};
99
1010FlashIAPBlockDevice bd (XIP_BASE + 0x100000 , 0x100000 );
11-
12- void USBMSD::begin ()
13- {
14- int err = getFileSystem ().mount (&bd);
15- if (err) {
16- err = getFileSystem ().reformat (&bd);
17- }
18- }
19-
20- mbed::FATFileSystem& USBMSD::getFileSystem ()
21- {
22- static mbed::FATFileSystem fs (" ota" );
23- return fs;
24- }
25-
26- USBMSD MassStorage (&bd);
11+ static mbed::FATFileSystem fs (" ota" );
2712
2813int SFU::begin () {
29- MassStorage.begin ();
14+ int err = fs.mount (&bd);
15+ if (err) {
16+ err = fs.reformat (&bd);
17+ }
3018}
3119
3220int SFU::download (const char * url) {
Original file line number Diff line number Diff line change 1+ #pragma once
2+
13#include " WiFiNINA.h"
24
35class SFU {
You can’t perform that action at this time.
0 commit comments