]> granicus.if.org Git - esp-idf/blobdiff - components/bt/bluedroid/stack/include/btm_ble_int.h
Merge branch 'bugfix/btdm_fix_add_whitelist_failed' into 'master'
[esp-idf] / components / bt / bluedroid / stack / include / btm_ble_int.h
index a99af77d8a456d7f5b41a1d262ddbd5948b0353a..b690db1bb17f120dc3112ea2f6bab38749ae9ed1 100644 (file)
@@ -86,13 +86,15 @@ typedef UINT8   tBTM_BLE_SEC_REQ_ACT;
 #define BTM_BLE_IS_RESOLVE_BDA(x)           ((x[0] & BLE_RESOLVE_ADDR_MASK) == BLE_RESOLVE_ADDR_MSB)
 
 /* LE scan activity bit mask, continue with LE inquiry bits */
-#define BTM_LE_SELECT_CONN_ACTIVE      0x40     /* selection connection is in progress */
-#define BTM_LE_OBSERVE_ACTIVE          0x80     /* observe is in progress */
+#define BTM_LE_SELECT_CONN_ACTIVE      0x0040     /* selection connection is in progress */
+#define BTM_LE_OBSERVE_ACTIVE          0x0080     /* observe is in progress */
+#define BTM_LE_DISCOVER_ACTIVE         0x0100     /* scan is in progress */
 
 /* BLE scan activity mask checking */
 #define BTM_BLE_IS_SCAN_ACTIVE(x)   ((x) & BTM_BLE_SCAN_ACTIVE_MASK)
 #define BTM_BLE_IS_INQ_ACTIVE(x)   ((x) & BTM_BLE_INQUIRY_MASK)
 #define BTM_BLE_IS_OBS_ACTIVE(x)   ((x) & BTM_LE_OBSERVE_ACTIVE)
+#define BTM_BLE_IS_DISCO_ACTIVE(x)   ((x) & BTM_LE_DISCOVER_ACTIVE)
 #define BTM_BLE_IS_SEL_CONN_ACTIVE(x)   ((x) & BTM_LE_SELECT_CONN_ACTIVE)
 
 /* BLE ADDR type ID bit */
@@ -136,6 +138,7 @@ typedef struct {
 typedef struct {
     UINT16 discoverable_mode;
     UINT16 connectable_mode;
+    BOOLEAN scan_params_set;
     UINT32 scan_window;
     UINT32 scan_interval;
     UINT8 scan_type; /* current scan type: active or passive */
@@ -294,7 +297,7 @@ typedef void (tBTM_DATA_LENGTH_CHANGE_CBACK) (UINT16 max_tx_length, UINT16 max_r
 /* Define BLE Device Management control structure
 */
 typedef struct {
-    UINT8 scan_activity;         /* LE scan activity mask */
+    UINT16 scan_activity;         /* LE scan activity mask */
 
     /*****************************************************
     **      BLE Inquiry
@@ -306,6 +309,11 @@ typedef struct {
     tBTM_CMPL_CB *p_obs_cmpl_cb;
     TIMER_LIST_ENT obs_timer_ent;
 
+    /* scan callback and timer */
+    tBTM_INQ_RESULTS_CB *p_scan_results_cb;
+    tBTM_CMPL_CB *p_scan_cmpl_cb;
+    TIMER_LIST_ENT scan_timer_ent;
+
     /* background connection procedure cb value */
     tBTM_BLE_CONN_TYPE bg_conn_type;
     UINT32 scan_int;
@@ -358,7 +366,6 @@ tBTM_STATUS btm_ble_start_inquiry (UINT8 mode, UINT8   duration);
 void btm_ble_stop_scan(void);
 void btm_clear_all_pending_le_entry(void);
 
-void btm_ble_stop_scan();
 BOOLEAN btm_ble_send_extended_scan_params(UINT8 scan_type, UINT32 scan_int,
         UINT32 scan_win, UINT8 addr_type_own,
         UINT8 scan_filter_policy);