Skip to content

Commit 3801d4a

Browse files
authored
Merge pull request #10635 from LDong-Arm/deprecated_ble_services
BLE: deprecate UARTService and suppress compiler warnings
2 parents 2a49ff6 + f3c29df commit 3801d4a

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

features/FEATURE_BLE/ble/services/UARTService.h

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@
2626

2727
#include "ble/UUID.h"
2828
#include "ble/BLE.h"
29+
#include "ble/pal/Deprecated.h"
2930

3031
#if BLE_FEATURE_GATT_SERVER
3132

33+
BLE_DEPRECATED_API_USE_BEGIN()
34+
3235
extern const uint8_t UARTServiceBaseUUID[UUID::LENGTH_OF_LONG_UUID];
3336
extern const uint16_t UARTServiceShortUUID;
3437
extern const uint16_t UARTServiceTXCharacteristicShortUUID;
@@ -41,9 +44,15 @@ extern const uint8_t UARTServiceTXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID]
4144
extern const uint8_t UARTServiceRXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID];
4245

4346
/**
44-
* @class UARTService.
45-
* @brief BLE Service to enable UART over BLE.
46-
*/
47+
* @class UARTService.
48+
* @brief BLE Service to enable UART over BLE.
49+
*
50+
* @deprecated This service is deprecated, and no replacement is currently available.
51+
*/
52+
MBED_DEPRECATED_SINCE(
53+
"mbed-os-5.13",
54+
"This service is deprecated, and no replacement is currently available."
55+
)
4756
class UARTService {
4857
public:
4958
/** Maximum length of data (in bytes) that the UART service module can transmit to the peer. */
@@ -217,6 +226,8 @@ class UARTService {
217226
* application. */
218227
};
219228

229+
BLE_DEPRECATED_API_USE_END()
230+
220231
#endif // BLE_FEATURE_GATT_SERVER
221232

222233
#endif /* #ifndef __BLE_UART_SERVICE_H__*/

features/FEATURE_BLE/ble/services/URIBeaconConfigService.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define SERVICES_URIBEACONCONFIGSERVICE_H_
1919

2020
#include "ble/BLE.h"
21+
#include "ble/pal/Deprecated.h"
2122

2223
#ifdef YOTTA_CFG_MBED_OS
2324
#include "mbed-drivers/mbed.h"
@@ -28,6 +29,8 @@
2829
#if BLE_FEATURE_GATT_SERVER
2930
#if BLE_ROLE_BROADCASTER
3031

32+
BLE_DEPRECATED_API_USE_BEGIN()
33+
3134
extern const uint8_t UUID_URI_BEACON_SERVICE[UUID::LENGTH_OF_LONG_UUID];
3235
extern const uint8_t UUID_LOCK_STATE_CHAR[UUID::LENGTH_OF_LONG_UUID];
3336
extern const uint8_t UUID_LOCK_CHAR[UUID::LENGTH_OF_LONG_UUID];
@@ -483,6 +486,8 @@ class URIBeaconConfigService {
483486
}
484487
};
485488

489+
BLE_DEPRECATED_API_USE_END()
490+
486491
#endif // BLE_ROLE_BROADCASTER
487492
#endif // BLE_FEATURE_GATT_SERVER
488493

features/FEATURE_BLE/ble/services/iBeacon.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818

1919
#include "cmsis_compiler.h"
2020
#include "ble/BLE.h"
21+
#include "ble/pal/Deprecated.h"
2122

2223
#if BLE_FEATURE_GATT_SERVER
2324

25+
BLE_DEPRECATED_API_USE_BEGIN()
26+
2427
/**
2528
* iBeacon Service.
2629
*
@@ -253,6 +256,8 @@ class iBeacon {
253256
*/
254257
typedef iBeacon iBeaconService;
255258

259+
BLE_DEPRECATED_API_USE_END()
260+
256261
#endif // BLE_FEATURE_GATT_SERVER
257262

258263
#endif //MBED_BLE_IBEACON_H__

0 commit comments

Comments
 (0)