Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE: deprecate UARTService and suppress compiler warnings #10635

Merged
merged 2 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__