Mistake on this page?
Report an issue in GitHub or email us
BLERoles.h
1 #ifndef MBED_BLE_ROLES_H__
2 #define MBED_BLE_ROLES_H__
3 
4 #if !(BLE_ROLE_OBSERVER) && !(BLE_ROLE_BROADCASTER)
5  #error "BLE requires at least one role 'BROADCASTER' or 'OBSERVER' to be enabled"
6 #endif
7 
8 #if (BLE_ROLE_PERIPHERAL) || (BLE_ROLE_CENTRAL)
9  #define BLE_FEATURE_CONNECTABLE 1
10 #endif
11 
12 #if (BLE_FEATURE_GATT_CLIENT) || (BLE_FEATURE_GATT_SERVER)
13  #define BLE_FEATURE_ATT 1
14 #endif
15 
16 #if BLE_ROLE_PERIPHERAL
17  #if !(BLE_ROLE_BROADCASTER)
18  #error "BLE role 'PERIPHERAL' depends on role 'BROADCASTER'"
19  #endif
20 #endif // BLE_ROLE_PERIPHERAL
21 
22 #if BLE_ROLE_CENTRAL
23  #if !(BLE_ROLE_OBSERVER)
24  #error "BLE role 'CENTRAL' depends on role 'OBSERVER'"
25  #endif
26 #endif // BLE_ROLE_CENTRAL
27 
28 #if BLE_FEATURE_SECURITY
29  #if !(BLE_ROLE_PERIPHERAL) && !(BLE_ROLE_CENTRAL)
30  #error "BLE feature 'SECURITY' requires 'PERIPHERAL' or 'CENTRAL' role"
31  #endif
32 #endif // BLE_FEATURE_SECURITY
33 
34 #if BLE_FEATURE_SECURE_CONNECTIONS
35  #if !(BLE_FEATURE_SECURITY)
36  #error "BLE feature 'SECURE CONNECTIONS' requires the 'SECURITY' feature"
37  #endif
38 #endif // BLE_FEATURE_SECURE_CONNECTIONS
39 
40 #if BLE_FEATURE_SIGNING
41  #if !(BLE_FEATURE_SECURITY)
42  #error "BLE feature 'SIGNING' requires the 'SECURITY' feature"
43  #endif
44 #endif // BLE_FEATURE_SIGNING
45 
46 #if BLE_FEATURE_WHITELIST
47  #if !(BLE_FEATURE_SECURITY)
48  #error "BLE feature 'WHITELIST' requires the 'SECURITY' feature"
49  #endif
50 #endif // BLE_FEATURE_WHITELIST
51 
52 #if BLE_FEATURE_PRIVACY
53  #if !(BLE_FEATURE_SECURITY)
54  #error "BLE feature 'PRIVACY' requires the 'SECURITY' feature"
55  #endif
56 #endif // BLE_FEATURE_PRIVACY
57 
58 #if BLE_FEATURE_PERIODIC_ADVERTISING
59  #if !(BLE_FEATURE_EXTENDED_ADVERTISING)
60  #error "BLE feature 'PERIODIC ADVERTISING' requires the 'EXTENDED ADVERTISING' feature"
61  #endif
62 #endif // BLE_FEATURE_PERIODIC_ADVERTISING
63 
64 #if BLE_FEATURE_GATT_CLIENT
65  #if !(BLE_FEATURE_CONNECTABLE)
66  #error "BLE feature 'GATT CLIENT' requires 'PERIPHERAL' or 'CENTRAL' role"
67  #endif
68 #endif // BLE_FEATURE_GATT_CLIENT
69 
70 #if BLE_FEATURE_GATT_SERVER
71  #if !(BLE_FEATURE_CONNECTABLE)
72  #error "BLE feature 'GATT SERVER' requires 'PERIPHERAL' or 'CENTRAL' role"
73  #endif
74 #endif // BLE_FEATURE_GATT_SERVER
75 
76 #endif // MBED_BLE_ROLES_H__
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.