diff --git a/public/BLEDevice.h b/public/BLEDevice.h index 4f3ac44..3503688 100644 --- a/public/BLEDevice.h +++ b/public/BLEDevice.h @@ -765,6 +765,12 @@ BLEDevice::startScanning(Gap::AdvertisementReportCallback_t callback) { return transport->getGap().startScanning(scanningParams, callback); } +inline ble_error_t +BLEDevice::stopScanning(void) { + return transport->getGap().stopScanning(); +} + + inline ble_error_t BLEDevice::disconnect(Gap::DisconnectionReason_t reason) { diff --git a/public/Gap.h b/public/Gap.h index e7f090b..bf626bd 100644 --- a/public/Gap.h +++ b/public/Gap.h @@ -168,6 +168,7 @@ private: virtual ble_error_t startAdvertising(const GapAdvertisingParams &) = 0; virtual ble_error_t stopAdvertising(void) = 0; virtual ble_error_t startScanning(const GapScanningParams &scanningParams, AdvertisementReportCallback_t callback) = 0; + virtual ble_error_t stopScanning() = 0; virtual uint16_t getMinAdvertisingInterval(void) const = 0; virtual uint16_t getMinNonConnectableAdvertisingInterval(void) const = 0; virtual uint16_t getMaxAdvertisingInterval(void) const = 0;