mirror of https://github.com/ARMmbed/mbed-os.git
new scan call
parent
732b4255ce
commit
c58099f0ee
|
@ -368,6 +368,17 @@ enum scanning_policy_mode_t {
|
|||
SCAN_POLICY_FILTER_ALL_ADV = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* Scanning policy filter mode.
|
||||
*
|
||||
* @see Bluetooth Core Specification 4.2 (Vol. 6), Part B, Section 4.3.3.
|
||||
*/
|
||||
enum scanning_filter_duplicates_t {
|
||||
SCAN_FILTER_DUPLICATES_DISABLED = 0,
|
||||
SCAN_FILTER_DUPLICATES_ENABLED = 1,
|
||||
SCAN_FILTER_DUPLICATES_ENABLED_PER_PERIOD = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* Type that describes link's encryption state.
|
||||
*/
|
||||
|
|
|
@ -1283,11 +1283,19 @@ public:
|
|||
|
||||
/* scanning */
|
||||
|
||||
ble_error_t startScan(const GapScanningParams params) {
|
||||
ble_error_t setScanParameters(
|
||||
const GapScanningParams* params = NULL,
|
||||
const GapScanningParams* params = NULL,
|
||||
const GapScanningParams* params = NULL
|
||||
) {
|
||||
return startRadioScan(params);
|
||||
};
|
||||
|
||||
ble_error_t startScan() {
|
||||
ble_error_t startScan(
|
||||
ble::scanning_filter_duplicates_t filtering = SCAN_FILTER_DUPLICATES_DISABLED,
|
||||
uint32_t duration = 0,
|
||||
uint32_t period = 0
|
||||
) {
|
||||
return startRadioScan(_scanningParams);
|
||||
};
|
||||
|
||||
|
|
|
@ -246,11 +246,6 @@ private:
|
|||
* Obtain the peer device's advertising data and (if possible) scanResponse.
|
||||
*/
|
||||
bool _activeScanning;
|
||||
|
||||
/** Primary channel PHY. */
|
||||
ble::phy_t _phy;
|
||||
|
||||
ble::scanning_policy_mode_t _mode;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue