diff --git a/features/FEATURE_BLE/ble/BLE.h b/features/FEATURE_BLE/ble/BLE.h index 605aaa4dd6..2e02fc2df8 100644 --- a/features/FEATURE_BLE/ble/BLE.h +++ b/features/FEATURE_BLE/ble/BLE.h @@ -17,6 +17,8 @@ #ifndef MBED_BLE_H__ #define MBED_BLE_H__ +#include "BLERoles.h + #include "blecommon.h" #include "ble/Gap.h" #include "ble/GattServer.h" diff --git a/features/FEATURE_BLE/ble/BLERoles.h b/features/FEATURE_BLE/ble/BLERoles.h index 39b472c27b..c6957f7c84 100644 --- a/features/FEATURE_BLE/ble/BLERoles.h +++ b/features/FEATURE_BLE/ble/BLERoles.h @@ -5,6 +5,14 @@ #error "BLE requires at least one role 'BROADCASTER' or 'OBSERVER' to be enabled" #endif +#if define(BLE_ROLE_PERIPHERAL) || defined(BLE_ROLE_CENTRAL) + #define BLE_ROLE_CONNECTABLE 1 +#endif + +#if define(BLE_FEATURE_GATT_CLIENT) || defined(BLE_FEATURE_GATT_SERVER) + #define BLE_FEATURE_ATT 1 +#endif + #ifdef BLE_ROLE_PERIPHERAL #if !defined(BLE_ROLE_OBSERVER) #error "BLE role 'PERIPHERAL' depends on role 'OBSERVER'"