Skip to content

Commit 0515408

Browse files
add default BLE roles configuration in case no json present
1 parent 2975c7c commit 0515408

File tree

1 file changed

+44
-0
lines changed
  • connectivity/FEATURE_BLE/include/ble/common

1 file changed

+44
-0
lines changed

connectivity/FEATURE_BLE/include/ble/common/BLERoles.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,50 @@
1919
#ifndef MBED_BLE_ROLES_H__
2020
#define MBED_BLE_ROLES_H__
2121

22+
/* we provide default values if no configuration is present (e.g. in unittests) */
23+
#if !defined(BLE_ROLE_OBSERVER)
24+
#define BLE_ROLE_OBSERVER 1
25+
#endif
26+
#if !defined(BLE_ROLE_BROADCASTER)
27+
#define BLE_ROLE_BROADCASTER 1
28+
#endif
29+
#if !defined(BLE_ROLE_CENTRAL)
30+
#define BLE_ROLE_CENTRAL 1
31+
#endif
32+
#if !defined(BLE_ROLE_PERIPHERAL)
33+
#define BLE_ROLE_PERIPHERAL 1
34+
#endif
35+
#if !defined(BLE_FEATURE_GATT_CLIENT)
36+
#define BLE_FEATURE_GATT_CLIENT 1
37+
#endif
38+
#if !defined(BLE_FEATURE_GATT_SERVER)
39+
#define BLE_FEATURE_GATT_SERVER 1
40+
#endif
41+
#if !defined(BLE_FEATURE_SECURITY)
42+
#define BLE_FEATURE_SECURITY 1
43+
#endif
44+
#if !defined(BLE_FEATURE_SECURE_CONNECTIONS)
45+
#define BLE_FEATURE_SECURE_CONNECTIONS 1
46+
#endif
47+
#if !defined(BLE_FEATURE_SIGNING)
48+
#define BLE_FEATURE_SIGNING 1
49+
#endif
50+
#if !defined(BLE_FEATURE_WHITELIST)
51+
#define BLE_FEATURE_WHITELIST 1
52+
#endif
53+
#if !defined(BLE_FEATURE_PRIVACY)
54+
#define BLE_FEATURE_PRIVACY 1
55+
#endif
56+
#if !defined(BLE_FEATURE_PHY_MANAGEMENT)
57+
#define BLE_FEATURE_PHY_MANAGEMENT 1
58+
#endif
59+
#if !defined(BLE_FEATURE_EXTENDED_ADVERTISING)
60+
#define BLE_FEATURE_EXTENDED_ADVERTISING 1
61+
#endif
62+
#if !defined(BLE_FEATURE_PERIODIC_ADVERTISING)
63+
#define BLE_FEATURE_PERIODIC_ADVERTISING 1
64+
#endif
65+
2266
#if !(BLE_ROLE_OBSERVER) && !(BLE_ROLE_BROADCASTER)
2367
#error "BLE requires at least one role 'BROADCASTER' or 'OBSERVER' to be enabled"
2468
#endif

0 commit comments

Comments
 (0)