Skip to content

Commit

Permalink
Merge pull request #10635 from LDong-Arm/deprecated_ble_services
Browse files Browse the repository at this point in the history
BLE: deprecate UARTService and suppress compiler warnings
  • Loading branch information
0xc0170 authored May 23, 2019
2 parents 2a49ff6 + f3c29df commit 3801d4a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
17 changes: 14 additions & 3 deletions features/FEATURE_BLE/ble/services/UARTService.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -41,9 +44,15 @@ extern const uint8_t UARTServiceTXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID]
extern const uint8_t UARTServiceRXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID];

/**
* @class UARTService.
* @brief BLE Service to enable UART over BLE.
*/
* @class UARTService.
* @brief BLE Service to enable UART over BLE.
*
* @deprecated This service is deprecated, and no replacement is currently available.
*/
MBED_DEPRECATED_SINCE(
"mbed-os-5.13",
"This service is deprecated, and no replacement is currently available."
)
class UARTService {
public:
/** Maximum length of data (in bytes) that the UART service module can transmit to the peer. */
Expand Down Expand Up @@ -217,6 +226,8 @@ class UARTService {
* application. */
};

BLE_DEPRECATED_API_USE_END()

#endif // BLE_FEATURE_GATT_SERVER

#endif /* #ifndef __BLE_UART_SERVICE_H__*/
5 changes: 5 additions & 0 deletions features/FEATURE_BLE/ble/services/URIBeaconConfigService.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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];
Expand Down Expand Up @@ -483,6 +486,8 @@ class URIBeaconConfigService {
}
};

BLE_DEPRECATED_API_USE_END()

#endif // BLE_ROLE_BROADCASTER
#endif // BLE_FEATURE_GATT_SERVER

Expand Down
5 changes: 5 additions & 0 deletions features/FEATURE_BLE/ble/services/iBeacon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -253,6 +256,8 @@ class iBeacon {
*/
typedef iBeacon iBeaconService;

BLE_DEPRECATED_API_USE_END()

#endif // BLE_FEATURE_GATT_SERVER

#endif //MBED_BLE_IBEACON_H__

0 comments on commit 3801d4a

Please sign in to comment.