From b60eaf14a2a3dec88e3cf5c4d29fecfe00df4982 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:57:16 +0000 Subject: [PATCH] require macros to be defined --- features/FEATURE_BLE/ble/BLERoles.h | 50 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/features/FEATURE_BLE/ble/BLERoles.h b/features/FEATURE_BLE/ble/BLERoles.h index c6957f7c84..dc1ba74fac 100644 --- a/features/FEATURE_BLE/ble/BLERoles.h +++ b/features/FEATURE_BLE/ble/BLERoles.h @@ -1,80 +1,80 @@ #ifndef MBED_BLE_ROLES_H__ #define MBED_BLE_ROLES_H__ -#if !defined(BLE_ROLE_OBSERVER) && !defined(BLE_ROLE_BROADCASTER) +#if !(BLE_ROLE_OBSERVER) && !(BLE_ROLE_BROADCASTER) #error "BLE requires at least one role 'BROADCASTER' or 'OBSERVER' to be enabled" #endif -#if define(BLE_ROLE_PERIPHERAL) || defined(BLE_ROLE_CENTRAL) +#if BLE_ROLE_PERIPHERAL BLE_ROLE_CENTRAL) #define BLE_ROLE_CONNECTABLE 1 #endif -#if define(BLE_FEATURE_GATT_CLIENT) || defined(BLE_FEATURE_GATT_SERVER) +#if (BLE_FEATURE_GATT_CLIENT) || (BLE_FEATURE_GATT_SERVER) #define BLE_FEATURE_ATT 1 #endif -#ifdef BLE_ROLE_PERIPHERAL - #if !defined(BLE_ROLE_OBSERVER) +#if BLE_ROLE_PERIPHERAL + #if !(BLE_ROLE_OBSERVER) #error "BLE role 'PERIPHERAL' depends on role 'OBSERVER'" #endif #endif // BLE_ROLE_PERIPHERAL -#ifdef BLE_ROLE_CENTRAL - #if !defined(BLE_ROLE_BROADCASTER) +#if BLE_ROLE_CENTRAL + #if !(BLE_ROLE_BROADCASTER) #error "BLE role 'CENTRAL' depends on role 'BROADCASTER'" #endif #endif // BLE_ROLE_CENTRAL -#ifdef BLE_FEATURE_SECURITY - #if !defined(BLE_ROLE_PERIPHERAL) && !defined(BLE_ROLE_CENTRAL) +#if BLE_FEATURE_SECURITY + #if !(BLE_ROLE_PERIPHERAL) && !(BLE_ROLE_CENTRAL) #error "BLE feature 'SECURITY' requires 'PERIPHERAL' or 'CENTRAL' role" #endif #endif // BLE_FEATURE_SECURITY -#ifdef BLE_FEATURE_SECURE_CONNECTIONS - #if !defined(BLE_FEATURE_SECURITY) +#if BLE_FEATURE_SECURE_CONNECTIONS + #if !(BLE_FEATURE_SECURITY) #error "BLE feature 'SECURE CONNECTIONS' requires the 'SECURITY' feature" #endif #endif // BLE_FEATURE_SECURE_CONNECTIONS -#ifdef BLE_FEATURE_SIGNING - #if !defined(BLE_FEATURE_SECURITY) +#if BLE_FEATURE_SIGNING + #if !(BLE_FEATURE_SECURITY) #error "BLE feature 'SIGNING' requires the 'SECURITY' feature" #endif #endif // BLE_FEATURE_SIGNING -#ifdef BLE_FEATURE_WHITELIST - #if !defined(BLE_FEATURE_SECURITY) +#if BLE_FEATURE_WHITELIST + #if !(BLE_FEATURE_SECURITY) #error "BLE feature 'WHITELIST' requires the 'SECURITY' feature" #endif #endif // BLE_FEATURE_WHITELIST -#ifdef BLE_FEATURE_PRIVACY - #if !defined(BLE_FEATURE_SECURITY) +#if BLE_FEATURE_PRIVACY + #if !(BLE_FEATURE_SECURITY) #error "BLE feature 'PRIVACY' requires the 'SECURITY' feature" #endif #endif // BLE_FEATURE_PRIVACY -#ifdef BLE_FEATURE_EXTENDED_ADVERTISING - #if !defined(BLE_FEATURE_PHY_MANAGEMENT) +#if BLE_FEATURE_EXTENDED_ADVERTISING + #if !(BLE_FEATURE_PHY_MANAGEMENT) #error "BLE feature 'EXTENDED ADVERTISING' requires the 'PHY MANAGEMENT' feature" #endif #endif // BLE_FEATURE_EXTENDED_ADVERTISING -#ifdef BLE_FEATURE_PERIODIC_ADVERTISING - #if !defined(BLE_FEATURE_EXTENDED_ADVERTISING) +#if BLE_FEATURE_PERIODIC_ADVERTISING + #if !(BLE_FEATURE_EXTENDED_ADVERTISING) #error "BLE feature 'PERIODIC ADVERTISING' requires the 'EXTENDED ADVERTISING' feature" #endif #endif // BLE_FEATURE_PERIODIC_ADVERTISING -#ifdef BLE_FEATURE_GATT_CLIENT - #if !defined(BLE_ROLE_PERIPHERAL) && !defined(BLE_ROLE_CENTRAL) +#if BLE_FEATURE_GATT_CLIENT + #if !(BLE_ROLE_PERIPHERAL) && !(BLE_ROLE_CENTRAL) #error "BLE feature 'GATT CLIENT' requires 'PERIPHERAL' or 'CENTRAL' role" #endif #endif // BLE_FEATURE_GATT_CLIENT -#ifdef BLE_FEATURE_GATT_SERVER - #if !defined(BLE_ROLE_PERIPHERAL) && !defined(BLE_ROLE_CENTRAL) +#if BLE_FEATURE_GATT_SERVER + #if !(BLE_ROLE_PERIPHERAL) && !(BLE_ROLE_CENTRAL) #error "BLE feature 'GATT SERVER' requires 'PERIPHERAL' or 'CENTRAL' role" #endif #endif // BLE_FEATURE_GATT_SERVER