From f3c29df377bd0c1103a0194565c153c17cf78360 Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Wed, 22 May 2019 11:24:38 +0100 Subject: [PATCH] Suppress warnings of deprecated API in deprecated services Services that already have deprecation notices in place should not trigger more warnings from the compiler. --- features/FEATURE_BLE/ble/services/UARTService.h | 5 +++++ features/FEATURE_BLE/ble/services/URIBeaconConfigService.h | 5 +++++ features/FEATURE_BLE/ble/services/iBeacon.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/features/FEATURE_BLE/ble/services/UARTService.h b/features/FEATURE_BLE/ble/services/UARTService.h index f870a8afe2..317bb29231 100644 --- a/features/FEATURE_BLE/ble/services/UARTService.h +++ b/features/FEATURE_BLE/ble/services/UARTService.h @@ -26,9 +26,12 @@ #include "ble/UUID.h" #include "ble/BLE.h" +#include "ble/pal/Deprecated.h" #if BLE_FEATURE_GATT_SERVER +BLE_DEPRECATED_API_USE_BEGIN() + extern const uint8_t UARTServiceBaseUUID[UUID::LENGTH_OF_LONG_UUID]; extern const uint16_t UARTServiceShortUUID; extern const uint16_t UARTServiceTXCharacteristicShortUUID; @@ -223,6 +226,8 @@ protected: * application. */ }; +BLE_DEPRECATED_API_USE_END() + #endif // BLE_FEATURE_GATT_SERVER #endif /* #ifndef __BLE_UART_SERVICE_H__*/ diff --git a/features/FEATURE_BLE/ble/services/URIBeaconConfigService.h b/features/FEATURE_BLE/ble/services/URIBeaconConfigService.h index 726a2ef4da..952ef1d2fe 100644 --- a/features/FEATURE_BLE/ble/services/URIBeaconConfigService.h +++ b/features/FEATURE_BLE/ble/services/URIBeaconConfigService.h @@ -18,6 +18,7 @@ #define SERVICES_URIBEACONCONFIGSERVICE_H_ #include "ble/BLE.h" +#include "ble/pal/Deprecated.h" #ifdef YOTTA_CFG_MBED_OS #include "mbed-drivers/mbed.h" @@ -28,6 +29,8 @@ #if BLE_FEATURE_GATT_SERVER #if BLE_ROLE_BROADCASTER +BLE_DEPRECATED_API_USE_BEGIN() + extern const uint8_t UUID_URI_BEACON_SERVICE[UUID::LENGTH_OF_LONG_UUID]; extern const uint8_t UUID_LOCK_STATE_CHAR[UUID::LENGTH_OF_LONG_UUID]; extern const uint8_t UUID_LOCK_CHAR[UUID::LENGTH_OF_LONG_UUID]; @@ -483,6 +486,8 @@ public: } }; +BLE_DEPRECATED_API_USE_END() + #endif // BLE_ROLE_BROADCASTER #endif // BLE_FEATURE_GATT_SERVER diff --git a/features/FEATURE_BLE/ble/services/iBeacon.h b/features/FEATURE_BLE/ble/services/iBeacon.h index 95bd55aa8e..9aac5b60b3 100644 --- a/features/FEATURE_BLE/ble/services/iBeacon.h +++ b/features/FEATURE_BLE/ble/services/iBeacon.h @@ -18,9 +18,12 @@ #include "cmsis_compiler.h" #include "ble/BLE.h" +#include "ble/pal/Deprecated.h" #if BLE_FEATURE_GATT_SERVER +BLE_DEPRECATED_API_USE_BEGIN() + /** * iBeacon Service. * @@ -253,6 +256,8 @@ protected: */ typedef iBeacon iBeaconService; +BLE_DEPRECATED_API_USE_END() + #endif // BLE_FEATURE_GATT_SERVER #endif //MBED_BLE_IBEACON_H__