Bluetooth: Create active scanning helper macro

All current user just want basic active scanning so a corresponding
macro makes more sense than something based on duplicate filtering.

Change-Id: I97787be24b89fad66f2a952c5d53ab76f4e062fb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-12-03 18:27:46 +02:00 committed by Anas Nashif
commit dd353487c4
6 changed files with 10 additions and 11 deletions

View file

@ -99,9 +99,8 @@ typedef void bt_le_scan_cb_t(const bt_addr_le_t *addr, int8_t rssi,
uint8_t adv_type, const uint8_t *adv_data,
uint8_t len);
#define BT_LE_SCAN_FILTER_DUP_DISABLE \
(&(struct bt_le_scan_param) { .filter_dup = 0x00 })
#define BT_LE_SCAN_FILTER_DUP_ENABLE \
/** Helper macro to enable active scanning to discover new devices */
#define BT_LE_SCAN_ACTIVE \
(&(struct bt_le_scan_param) { .filter_dup = 0x01 })
struct bt_le_scan_param {

View file

@ -250,8 +250,8 @@ struct bt_hci_cp_le_set_adv_enable {
/* Scan types */
#define BT_HCI_OP_LE_SET_SCAN_PARAMS BT_OP(BT_OGF_LE, 0x000b)
#define BT_LE_SCAN_PASSIVE 0x00
#define BT_LE_SCAN_ACTIVE 0x01
#define BT_HCI_LE_SCAN_PASSIVE 0x00
#define BT_HCI_LE_SCAN_ACTIVE 0x01
struct bt_hci_cp_le_set_scan_params {
uint8_t scan_type;