|
Mbed OS Reference
|
Loading...
Searching...
No Matches
19#ifndef MBED_BLE_ROLES_H__
20#define MBED_BLE_ROLES_H__
23#if !defined(BLE_ROLE_OBSERVER)
24#define BLE_ROLE_OBSERVER 1
26#if !defined(BLE_ROLE_BROADCASTER)
27#define BLE_ROLE_BROADCASTER 1
29#if !defined(BLE_ROLE_CENTRAL)
30#define BLE_ROLE_CENTRAL 1
32#if !defined(BLE_ROLE_PERIPHERAL)
33#define BLE_ROLE_PERIPHERAL 1
35#if !defined(BLE_FEATURE_GATT_CLIENT)
36#define BLE_FEATURE_GATT_CLIENT 1
38#if !defined(BLE_FEATURE_GATT_SERVER)
39#define BLE_FEATURE_GATT_SERVER 1
41#if !defined(BLE_FEATURE_SECURITY)
42#define BLE_FEATURE_SECURITY 1
44#if !defined(BLE_FEATURE_SECURE_CONNECTIONS)
45#define BLE_FEATURE_SECURE_CONNECTIONS 1
47#if !defined(BLE_FEATURE_SIGNING)
48#define BLE_FEATURE_SIGNING 1
50#if !defined(BLE_FEATURE_WHITELIST)
51#define BLE_FEATURE_WHITELIST 1
53#if !defined(BLE_FEATURE_PRIVACY)
54#define BLE_FEATURE_PRIVACY 1
56#if !defined(BLE_FEATURE_PHY_MANAGEMENT)
57#define BLE_FEATURE_PHY_MANAGEMENT 1
59#if !defined(BLE_FEATURE_EXTENDED_ADVERTISING)
60#define BLE_FEATURE_EXTENDED_ADVERTISING 1
62#if !defined(BLE_FEATURE_PERIODIC_ADVERTISING)
63#define BLE_FEATURE_PERIODIC_ADVERTISING 1
66#if !(BLE_ROLE_OBSERVER) && !(BLE_ROLE_BROADCASTER)
67 #error "BLE requires at least one role 'BROADCASTER' or 'OBSERVER' to be enabled"
70#if (BLE_ROLE_PERIPHERAL) || (BLE_ROLE_CENTRAL)
71 #define BLE_FEATURE_CONNECTABLE 1
74#if (BLE_FEATURE_GATT_CLIENT) || (BLE_FEATURE_GATT_SERVER)
75 #define BLE_FEATURE_ATT 1
78#if BLE_ROLE_PERIPHERAL
79 #if !(BLE_ROLE_BROADCASTER)
80 #error "BLE role 'PERIPHERAL' depends on role 'BROADCASTER'"
85 #if !(BLE_ROLE_OBSERVER)
86 #error "BLE role 'CENTRAL' depends on role 'OBSERVER'"
90#if BLE_FEATURE_SECURITY
91 #if !(BLE_ROLE_PERIPHERAL) && !(BLE_ROLE_CENTRAL)
92 #error "BLE feature 'SECURITY' requires 'PERIPHERAL' or 'CENTRAL' role"
96#if BLE_FEATURE_SECURE_CONNECTIONS
97 #if !(BLE_FEATURE_SECURITY)
98 #error "BLE feature 'SECURE CONNECTIONS' requires the 'SECURITY' feature"
102#if BLE_FEATURE_SIGNING
103 #if !(BLE_FEATURE_SECURITY)
104 #error "BLE feature 'SIGNING' requires the 'SECURITY' feature"
108#if BLE_FEATURE_WHITELIST
109 #if !(BLE_FEATURE_SECURITY)
110 #error "BLE feature 'WHITELIST' requires the 'SECURITY' feature"
114#if BLE_FEATURE_PRIVACY
115 #if !(BLE_FEATURE_SECURITY)
116 #error "BLE feature 'PRIVACY' requires the 'SECURITY' feature"
120#if BLE_FEATURE_PERIODIC_ADVERTISING
121 #if !(BLE_FEATURE_EXTENDED_ADVERTISING)
122 #error "BLE feature 'PERIODIC ADVERTISING' requires the 'EXTENDED ADVERTISING' feature"
126#if BLE_FEATURE_GATT_CLIENT
127 #if !(BLE_FEATURE_CONNECTABLE)
128 #error "BLE feature 'GATT CLIENT' requires 'PERIPHERAL' or 'CENTRAL' role"
132#if BLE_FEATURE_GATT_SERVER
133 #if !(BLE_FEATURE_CONNECTABLE)
134 #error "BLE feature 'GATT SERVER' requires 'PERIPHERAL' or 'CENTRAL' role"