File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1
1
{
2
+ "config" : {
3
+ "filesystem_support" : {
4
+ "help" : " Whether filesystem is supported on the target" ,
5
+ "value" : 1
6
+ }
7
+ },
8
+ "target_overrides" : {
9
+ "K64F" : {
10
+ "target.features_add" : [" BLE" ],
11
+ "target.extra_labels_add" : [" ST_BLUENRG" ],
12
+ "filesystem_support" : 0
13
+ },
14
+ "NUCLEO_F401RE" : {
15
+ "target.features_add" : [" BLE" ],
16
+ "target.extra_labels_add" : [" ST_BLUENRG" , " CORDIO" ]
17
+ },
18
+ "DISCO_L475VG_IOT01A" : {
19
+ "target.features_add" : [" BLE" ],
20
+ "target.extra_labels_add" : [" ST_BLUENRG" , " CORDIO" ]
21
+ }
22
+ }
2
23
}
Original file line number Diff line number Diff line change 19
19
#include " ble/BLE.h"
20
20
#include " SecurityManager.h"
21
21
22
+ #if MBED_CONF_APP_FILESYSTEM_SUPPORT
22
23
#include " LittleFileSystem.h"
23
24
#include " HeapBlockDevice.h"
25
+ #endif // MBED_CONF_APP_FILESYSTEM_SUPPORT
24
26
25
27
/* * This example demonstrates all the basic setup required
26
28
* for pairing and setting up link security both as a central and peripheral
@@ -409,6 +411,8 @@ class SMDeviceCentral : public SMDevice {
409
411
};
410
412
};
411
413
414
+
415
+ #if MBED_CONF_APP_FILESYSTEM_SUPPORT
412
416
bool create_filesystem ()
413
417
{
414
418
static LittleFileSystem fs (" fs" );
@@ -443,17 +447,20 @@ bool create_filesystem()
443
447
444
448
return true ;
445
449
}
450
+ #endif // MBED_CONF_APP_FILESYSTEM_SUPPORT
446
451
447
452
int main ()
448
453
{
449
454
BLE& ble = BLE::Instance ();
450
455
events::EventQueue queue;
451
456
457
+ #if MBED_CONF_APP_FILESYSTEM_SUPPORT
452
458
/* if filesystem creation fails or there is no filesystem the security manager
453
459
* will fallback to storing the security database in memory */
454
460
if (!create_filesystem ()) {
455
461
printf (" Filesystem creation failed, will use memory storage\r\n " );
456
462
}
463
+ #endif
457
464
458
465
while (1 ) {
459
466
{
You can’t perform that action at this time.
0 commit comments