Skip to content

Commit c84a13c

Browse files
committed
Fix deprecation notice for ble::Gap::getState()
The deprecation notice suggests getConnectionCount() which did not land in the final API. The proper replacement is keeping your own record and updating during connection and disconnection callbacks.
1 parent 2a49ff6 commit c84a13c

File tree

1 file changed

+5
-3
lines changed
  • features/FEATURE_BLE/ble

1 file changed

+5
-3
lines changed

features/FEATURE_BLE/ble/Gap.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,13 +1347,15 @@ class LegacyGap :
13471347
* @return The current GAP state of the device.
13481348
*
13491349
* @deprecated Deprecated since addition of extended advertising support.
1350-
* This is not meaningful when you use extended advertising; please use
1351-
* isAdvertisingActive() and getConnectionCount().
1350+
* This is not meaningful when you use extended advertising; Please replace
1351+
* getState().advertising with isAdvertisingActive(), and replace
1352+
* getState().connected with your own record and update during callbacks.
13521353
*/
13531354
MBED_DEPRECATED_SINCE(
13541355
"mbed-os-5.11.0",
13551356
"Deprecated since addition of extended advertising support. "
1356-
"Use isAdvertisingActive() and getConnectionCount()."
1357+
"Replace getState().advertising with isAdvertisingActive()."
1358+
"Replace getState().connected with your own record and update during callbacks."
13571359
)
13581360
GapState_t getState(void) const;
13591361

0 commit comments

Comments
 (0)