Add BLEDevice::stopAdvertising() helper method to compliment startAdvertising(). (#3624)
This commit is contained in:
		
							parent
							
								
									2195109ecc
								
							
						
					
					
						commit
						ac9d04a400
					
				| @ -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) { | ||||
|  | ||||
| @ -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); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user