From 9a22db0e96ba816668c02c1870d8e9a65cd1939c Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Wed, 6 Feb 2019 15:36:39 +0000 Subject: [PATCH] implied features --- features/FEATURE_BLE/ble/BLE.h | 2 ++ features/FEATURE_BLE/ble/BLERoles.h | 8 ++++++++ 2 files changed, 10 insertions(+) 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'"