Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ac9d04a

Browse filesBrowse files
robert-alfarome-no-dev
authored andcommitted
Add BLEDevice::stopAdvertising() helper method to compliment startAdvertising(). (espressif#3624)
1 parent 2195109 commit ac9d04a
Copy full SHA for ac9d04a

File tree

2 files changed

+7
-0
lines changed
Filter options

2 files changed

+7
-0
lines changed

‎libraries/BLE/src/BLEDevice.cpp

Copy file name to clipboardExpand all lines: libraries/BLE/src/BLEDevice.cpp
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,12 @@ void BLEDevice::startAdvertising() {
578578
log_v("<< startAdvertising");
579579
} // startAdvertising
580580

581+
void BLEDevice::stopAdvertising() {
582+
log_v(">> stopAdvertising");
583+
getAdvertising()->stop();
584+
log_v("<< stopAdvertising");
585+
} // stopAdvertising
586+
581587
/* multi connect support */
582588
/* requires a little more work */
583589
std::map<uint16_t, conn_status_t> BLEDevice::getPeerDevices(bool _client) {

‎libraries/BLE/src/BLEDevice.h

Copy file name to clipboardExpand all lines: libraries/BLE/src/BLEDevice.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class BLEDevice {
5050
/* move advertising to BLEDevice for saving ram and flash in beacons */
5151
static BLEAdvertising* getAdvertising();
5252
static void startAdvertising();
53+
static void stopAdvertising();
5354
static uint16_t m_appId;
5455
/* multi connect */
5556
static std::map<uint16_t, conn_status_t> getPeerDevices(bool client);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.