From 14b24d324c2cc7d62fdf6deb3a062b79c7ac5545 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Thu, 8 Nov 2018 13:26:49 +0000 Subject: [PATCH] BLE: Move advertising_handle_t into ble namespace. --- features/FEATURE_BLE/ble/BLETypes.h | 6 ++++++ features/FEATURE_BLE/ble/Gap.h | 2 +- features/FEATURE_BLE/ble/pal/GapTypes.h | 7 ------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/features/FEATURE_BLE/ble/BLETypes.h b/features/FEATURE_BLE/ble/BLETypes.h index 453b9888fd..e873eb3517 100644 --- a/features/FEATURE_BLE/ble/BLETypes.h +++ b/features/FEATURE_BLE/ble/BLETypes.h @@ -48,6 +48,12 @@ typedef uintptr_t connection_handle_t; */ typedef uint16_t attribute_handle_t; +/** + * Handle of an advertising set. + * + * @note Range of valid handle is comprised between 0x00 and 0xEF. + */ +typedef uint8_t advertising_handle_t; /** * Inclusive range of GATT attributes handles. diff --git a/features/FEATURE_BLE/ble/Gap.h b/features/FEATURE_BLE/ble/Gap.h index cdbe78f929..3a618f649f 100644 --- a/features/FEATURE_BLE/ble/Gap.h +++ b/features/FEATURE_BLE/ble/Gap.h @@ -1008,7 +1008,7 @@ public: typedef CallChainOfFunctionPointersWithContext GapShutdownCallbackChain_t; - typedef uint8_t AdvHandle_t; + typedef ble::advertising_handle_t AdvHandle_t; static const AdvHandle_t LEGACY_ADVERTISING_HANDLE = 0x00; static const AdvHandle_t INVALID_ADVERTISING_HANDLE = 0xFF; diff --git a/features/FEATURE_BLE/ble/pal/GapTypes.h b/features/FEATURE_BLE/ble/pal/GapTypes.h index 488b3b6c08..f0cca80732 100644 --- a/features/FEATURE_BLE/ble/pal/GapTypes.h +++ b/features/FEATURE_BLE/ble/pal/GapTypes.h @@ -546,13 +546,6 @@ struct connection_role_t : SafeEnum { SafeEnum(raw_value) { } }; -/** - * Handle of an advertising set. - * - * @note Range of valid handle is comprised between 0x00 and 0xEF. - */ -typedef uint8_t advertising_handle_t; - /** * Properties of an advertising event. */