Add BLEDevice::stopAdvertising() helper method to compliment startAdvertising(). (#3624)

This commit is contained in:
Robert Alfaro 2020-01-20 06:31:12 -08:00 committed by Me No Dev
parent 2195109ecc
commit ac9d04a400
2 changed files with 7 additions and 0 deletions

View File

@ -578,6 +578,12 @@ void BLEDevice::startAdvertising() {
log_v("<< startAdvertising");
} // startAdvertising
void BLEDevice::stopAdvertising() {
log_v(">> stopAdvertising");
getAdvertising()->stop();
log_v("<< stopAdvertising");
} // stopAdvertising
/* multi connect support */
/* requires a little more work */
std::map<uint16_t, conn_status_t> BLEDevice::getPeerDevices(bool _client) {

View File

@ -50,6 +50,7 @@ public:
/* move advertising to BLEDevice for saving ram and flash in beacons */
static BLEAdvertising* getAdvertising();
static void startAdvertising();
static void stopAdvertising();
static uint16_t m_appId;
/* multi connect */
static std::map<uint16_t, conn_status_t> getPeerDevices(bool client);