File tree 2 files changed +8
-18
lines changed
2 files changed +8
-18
lines changed Original file line number Diff line number Diff line change 1
1
#include " SFU.h"
2
2
#include " FlashIAPBlockDevice.h"
3
3
#include " FATFileSystem.h"
4
- #include " PluggableUSBMSD.h"
4
+ // #include "PluggableUSBMSD.h"
5
5
6
6
const unsigned char SFU[0x10000 ] __attribute__ ((section(" .second_stage_ota" ), used)) = {
7
7
#include " rp2040.h"
8
8
};
9
9
10
10
FlashIAPBlockDevice 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" );
27
12
28
13
int SFU::begin () {
29
- MassStorage.begin ();
14
+ int err = fs.mount (&bd);
15
+ if (err) {
16
+ err = fs.reformat (&bd);
17
+ }
30
18
}
31
19
32
20
int SFU::download (const char * url) {
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
1
3
#include " WiFiNINA.h"
2
4
3
5
class SFU {
You can’t perform that action at this time.
0 commit comments