Merge branch 'feature/btdm_bluedroid' into feature/btdm_a2dp
# Conflicts: # components/bt/bluedroid/bta/sys/bta_sys_main.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_api.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_bld_ct.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_bld_tg.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_opt.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_pars_ct.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_pars_tg.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_sdp.c # components/bt/bluedroid/btc/profile/std/avrc/avrc_utils.c # components/bt/bluedroid/btc/profile/std/avrc/include/avrc_int.h # components/bt/bluedroid/btc/profile/std/include/avct_api.h # components/bt/bluedroid/btc/profile/std/include/avdt_api.h # components/bt/bluedroid/btc/profile/std/include/avdt_defs.h # components/bt/bluedroid/btc/profile/std/include/avdtc_api.h # components/bt/bluedroid/btc/profile/std/include/avrc_api.h # components/bt/bluedroid/btc/profile/std/include/avrc_defs.h # components/bt/bluedroid/gki/gki_buffer.c # components/bt/bluedroid/hci/hci_hal_h4.c # components/bt/bluedroid/hci/hci_layer.c # components/bt/bluedroid/hci/packet_fragmenter.c # components/bt/bluedroid/include/bt_trace.h # components/bt/bluedroid/osi/alarm.c # components/bt/bluedroid/profiles/std/avrc/avrc_api.c # components/bt/bluedroid/profiles/std/avrc/avrc_bld_ct.c # components/bt/bluedroid/profiles/std/avrc/avrc_bld_tg.c # components/bt/bluedroid/profiles/std/avrc/avrc_opt.c # components/bt/bluedroid/profiles/std/avrc/avrc_pars_ct.c # components/bt/bluedroid/profiles/std/avrc/avrc_pars_tg.c # components/bt/bluedroid/profiles/std/avrc/avrc_sdp.c # components/bt/bluedroid/profiles/std/avrc/avrc_utils.c # components/bt/bluedroid/profiles/std/avrc/include/avrc_int.h # components/bt/bluedroid/profiles/std/include/avct_api.h # components/bt/bluedroid/profiles/std/include/avdt_api.h # components/bt/bluedroid/profiles/std/include/avdt_defs.h # components/bt/bluedroid/profiles/std/include/avdtc_api.h # components/bt/bluedroid/profiles/std/include/avrc_api.h # components/bt/bluedroid/profiles/std/include/avrc_defs.h # components/bt/bluedroid/stack/avdt/include/avdt_defs.h # components/bt/bluedroid/stack/avrc/avrc_api.c # components/bt/bluedroid/stack/avrc/avrc_bld_ct.c # components/bt/bluedroid/stack/avrc/avrc_bld_tg.c # components/bt/bluedroid/stack/avrc/avrc_opt.c # components/bt/bluedroid/stack/avrc/avrc_pars_ct.c # components/bt/bluedroid/stack/avrc/avrc_pars_tg.c # components/bt/bluedroid/stack/avrc/avrc_sdp.c # components/bt/bluedroid/stack/avrc/avrc_utils.c # components/bt/bluedroid/stack/avrc/include/avrc_int.h # components/bt/bluedroid/stack/btu/btu_task.c # components/bt/bluedroid/stack/include/avct_api.h # components/bt/bluedroid/stack/include/avdt_api.h # components/bt/bluedroid/stack/include/avdtc_api.h # components/bt/bluedroid/stack/include/avrc_api.h # components/bt/bluedroid/stack/include/avrc_defs.h # components/bt/bluedroid/stack/include/gatt_api.h # components/bt/bluedroid/stack/l2cap/l2c_main.c # components/bt/component.mk # examples/06_bluedroid_demos/components/bluedroid_demos/app_core/bt_app_core.c
This commit is contained in:
Executable → Regular
+17
-25
@@ -58,8 +58,8 @@ typedef bool BOOLEAN;
|
||||
*/
|
||||
#define BT_EVT_MASK 0xFF00
|
||||
#define BT_SUB_EVT_MASK 0x00FF
|
||||
/* To Bluetooth Upper Layers */
|
||||
/************************************/
|
||||
/* To Bluetooth Upper Layers */
|
||||
/************************************/
|
||||
#define BT_EVT_TO_BTU_L2C_EVT 0x0900 /* L2CAP event */
|
||||
#define BT_EVT_TO_BTU_HCI_EVT 0x1000 /* HCI Event */
|
||||
#define BT_EVT_TO_BTU_HCI_BR_EDR_EVT (0x0000 | BT_EVT_TO_BTU_HCI_EVT) /* event from BR/EDR controller */
|
||||
@@ -84,8 +84,8 @@ typedef bool BOOLEAN;
|
||||
#define BT_EVT_BTSIM 0x1B00 /* Insight BTSIM event */
|
||||
#define BT_EVT_BTISE 0x1C00 /* Insight Script Engine event */
|
||||
|
||||
/* To LM */
|
||||
/************************************/
|
||||
/* To LM */
|
||||
/************************************/
|
||||
#define BT_EVT_TO_LM_HCI_CMD 0x2000 /* HCI Command */
|
||||
#define BT_EVT_TO_LM_HCI_ACL 0x2100 /* HCI ACL Data */
|
||||
#define BT_EVT_TO_LM_HCI_SCO 0x2200 /* HCI SCO Data */
|
||||
@@ -122,7 +122,7 @@ typedef bool BOOLEAN;
|
||||
#define BT_EVT_TO_GAP_MSG 0x3b00
|
||||
|
||||
/* for NFC */
|
||||
/************************************/
|
||||
/************************************/
|
||||
#define BT_EVT_TO_NFC_NCI 0x4000 /* NCI Command, Notification or Data*/
|
||||
#define BT_EVT_TO_NFC_INIT 0x4100 /* Initialization message */
|
||||
#define BT_EVT_TO_NCI_LP 0x4200 /* Low power */
|
||||
@@ -194,8 +194,7 @@ typedef bool BOOLEAN;
|
||||
|
||||
/* Define the header of each buffer used in the Bluetooth stack.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint16_t event;
|
||||
uint16_t len;
|
||||
uint16_t offset;
|
||||
@@ -416,16 +415,14 @@ typedef UINT8 ACCESS_CODE[ACCESS_CODE_BYTE_LEN];
|
||||
|
||||
/* Maximum UUID size - 16 bytes, and structure to hold any type of UUID. */
|
||||
#define MAX_UUID_SIZE 16
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
#define LEN_UUID_16 2
|
||||
#define LEN_UUID_32 4
|
||||
#define LEN_UUID_128 16
|
||||
|
||||
UINT16 len;
|
||||
|
||||
union
|
||||
{
|
||||
union {
|
||||
UINT16 uuid16;
|
||||
UINT32 uuid32;
|
||||
UINT8 uuid128[MAX_UUID_SIZE];
|
||||
@@ -463,8 +460,8 @@ typedef struct
|
||||
|
||||
/* We will not allocate a PSM in the reserved range to 3rd party apps
|
||||
*/
|
||||
#define BRCM_RESERVED_PSM_START 0x5AE1
|
||||
#define BRCM_RESERVED_PSM_END 0x5AFF
|
||||
#define BRCM_RESERVED_PSM_START 0x5AE1
|
||||
#define BRCM_RESERVED_PSM_END 0x5AFF
|
||||
|
||||
#define BRCM_UTILITY_SERVICE_PSM 0x5AE1
|
||||
#define BRCM_MATCHER_PSM 0x5AE3
|
||||
@@ -480,8 +477,7 @@ typedef struct
|
||||
#define BT_CONNECTED_USING_BREDR 1
|
||||
#define BT_CONNECTED_USING_AMP 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT32 is_connected;
|
||||
INT32 rssi;
|
||||
UINT32 bytes_sent;
|
||||
@@ -511,8 +507,7 @@ typedef UINT8 tBT_TRANSPORT;
|
||||
|
||||
#define BLE_ADDR_IS_STATIC(x) ((x[0] & 0xC0) == 0xC0)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBLE_ADDR_TYPE type;
|
||||
BD_ADDR bda;
|
||||
} tBLE_BD_ADDR;
|
||||
@@ -620,7 +615,7 @@ typedef UINT8 tBT_DEVICE_TYPE;
|
||||
#define TRACE_ORG_USER_SCR 0x00000800
|
||||
#define TRACE_ORG_TESTER 0x00000900
|
||||
#define TRACE_ORG_MAX_NUM 10 /* 32-bit mask; must be < 32 */
|
||||
#define TRACE_LITE_ORG_MAX_NUM 6
|
||||
#define TRACE_LITE_ORG_MAX_NUM 6
|
||||
#define TRACE_ORG_ALL 0x03ff
|
||||
#define TRACE_ORG_RPC_TRANS 0x04
|
||||
|
||||
@@ -715,7 +710,7 @@ typedef uint8_t BD_ADDR[BD_ADDR_LEN];
|
||||
|
||||
/* global constant for "any" bd addr */
|
||||
static const BD_ADDR bd_addr_any = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
||||
static const BD_ADDR bd_addr_null= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
static const BD_ADDR bd_addr_null = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
/*****************************************************************************
|
||||
** Functions
|
||||
@@ -735,8 +730,7 @@ static inline void bdcpy(BD_ADDR a, const BD_ADDR b)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = BD_ADDR_LEN; i != 0; i--)
|
||||
{
|
||||
for (i = BD_ADDR_LEN; i != 0; i--) {
|
||||
*a++ = *b++;
|
||||
}
|
||||
}
|
||||
@@ -755,10 +749,8 @@ static inline int bdcmp(const BD_ADDR a, const BD_ADDR b)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = BD_ADDR_LEN; i != 0; i--)
|
||||
{
|
||||
if (*a++ != *b++)
|
||||
{
|
||||
for (i = BD_ADDR_LEN; i != 0; i--) {
|
||||
if (*a++ != *b++) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
+313
-384
File diff suppressed because it is too large
Load Diff
Executable → Regular
+199
-237
File diff suppressed because it is too large
Load Diff
Executable → Regular
+27
-37
@@ -101,20 +101,18 @@ typedef UINT8 tBTM_BLE_SEC_REQ_ACT;
|
||||
#define BTM_VSC_CHIP_CAPABILITY_L_VERSION 55
|
||||
#define BTM_VSC_CHIP_CAPABILITY_M_VERSION 95
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 data_mask;
|
||||
UINT8 *p_flags;
|
||||
UINT8 ad_data[BTM_BLE_AD_DATA_LEN];
|
||||
UINT8 *p_pad;
|
||||
}tBTM_BLE_LOCAL_ADV_DATA;
|
||||
} tBTM_BLE_LOCAL_ADV_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT32 inq_count; /* Used for determining if a response has already been */
|
||||
/* received for the current inquiry operation. (We do not */
|
||||
/* want to flood the caller with multiple responses from */
|
||||
/* the same device. */
|
||||
/* received for the current inquiry operation. (We do not */
|
||||
/* want to flood the caller with multiple responses from */
|
||||
/* the same device. */
|
||||
BOOLEAN scan_rsp;
|
||||
tBLE_BD_ADDR le_bda;
|
||||
} tINQ_LE_BDADDR;
|
||||
@@ -126,8 +124,7 @@ typedef struct
|
||||
|
||||
#define BTM_BLE_PRIVATE_ADDR_INT 900 /* 15 minutes minimum for random address refreshing */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 discoverable_mode;
|
||||
UINT16 connectable_mode;
|
||||
UINT32 scan_window;
|
||||
@@ -164,13 +161,12 @@ typedef struct
|
||||
|
||||
|
||||
/* random address resolving complete callback */
|
||||
typedef void (tBTM_BLE_RESOLVE_CBACK) (void * match_rec, void *p);
|
||||
typedef void (tBTM_BLE_RESOLVE_CBACK) (void *match_rec, void *p);
|
||||
|
||||
typedef void (tBTM_BLE_ADDR_CBACK) (BD_ADDR_PTR static_random, void *p);
|
||||
|
||||
/* random address management control block */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBLE_ADDR_TYPE own_addr_type; /* local device LE address type */
|
||||
BD_ADDR private_addr;
|
||||
BD_ADDR random_bda;
|
||||
@@ -184,25 +180,23 @@ typedef struct
|
||||
|
||||
#define BTM_BLE_MAX_BG_CONN_DEV_NUM 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 min_conn_int;
|
||||
UINT16 max_conn_int;
|
||||
UINT16 slave_latency;
|
||||
UINT16 supervision_tout;
|
||||
|
||||
}tBTM_LE_CONN_PRAMS;
|
||||
} tBTM_LE_CONN_PRAMS;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BD_ADDR bd_addr;
|
||||
UINT8 attr;
|
||||
BOOLEAN is_connected;
|
||||
BOOLEAN in_use;
|
||||
}tBTM_LE_BG_CONN_DEV;
|
||||
} tBTM_LE_BG_CONN_DEV;
|
||||
|
||||
/* white list using state as a bit mask */
|
||||
/* white list using state as a bit mask */
|
||||
#define BTM_BLE_WL_IDLE 0
|
||||
#define BTM_BLE_WL_INIT 1
|
||||
#define BTM_BLE_WL_SCAN 2
|
||||
@@ -223,10 +217,9 @@ typedef UINT8 tBTM_BLE_RL_STATE;
|
||||
#define BLE_CONN_CANCEL 3
|
||||
typedef UINT8 tBTM_BLE_CONN_ST;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
void *p_param;
|
||||
}tBTM_BLE_CONN_REQ;
|
||||
} tBTM_BLE_CONN_REQ;
|
||||
|
||||
/* LE state request */
|
||||
#define BTM_BLE_STATE_INVALID 0
|
||||
@@ -264,21 +257,19 @@ typedef UINT16 tBTM_BLE_STATE_MASK;
|
||||
#define BTM_LE_RESOLVING_LIST_MAX 0x20
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BD_ADDR *resolve_q_random_pseudo;
|
||||
UINT8 *resolve_q_action;
|
||||
UINT8 q_next;
|
||||
UINT8 q_pending;
|
||||
} tBTM_BLE_RESOLVE_Q;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BOOLEAN in_use;
|
||||
BOOLEAN to_add;
|
||||
BD_ADDR bd_addr;
|
||||
UINT8 attr;
|
||||
}tBTM_BLE_WL_OP;
|
||||
} tBTM_BLE_WL_OP;
|
||||
|
||||
/* BLE privacy mode */
|
||||
#define BTM_PRIVACY_NONE 0 /* BLE no privacy */
|
||||
@@ -292,8 +283,7 @@ typedef void (tBTM_DATA_LENGTH_CHANGE_CBACK) (UINT16 max_tx_length, UINT16 max_r
|
||||
|
||||
/* Define BLE Device Management control structure
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 scan_activity; /* LE scan activity mask */
|
||||
|
||||
/*****************************************************
|
||||
@@ -359,19 +349,19 @@ 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);
|
||||
UINT32 scan_win, UINT8 addr_type_own,
|
||||
UINT8 scan_filter_policy);
|
||||
void btm_ble_stop_inquiry(void);
|
||||
void btm_ble_init (void);
|
||||
void btm_ble_connected (UINT8 *bda, UINT16 handle, UINT8 enc_mode, UINT8 role, tBLE_ADDR_TYPE addr_type, BOOLEAN addr_matched);
|
||||
void btm_ble_read_remote_features_complete(UINT8 *p);
|
||||
void btm_ble_write_adv_enable_complete(UINT8 * p);
|
||||
void btm_ble_write_adv_enable_complete(UINT8 *p);
|
||||
void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len, BOOLEAN enhanced);
|
||||
void btm_read_ble_local_supported_states_complete(UINT8 *p, UINT16 evt_len);
|
||||
tBTM_BLE_CONN_ST btm_ble_get_conn_st(void);
|
||||
void btm_ble_set_conn_st(tBTM_BLE_CONN_ST new_st);
|
||||
UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_dst,
|
||||
tBTM_BLE_ADV_DATA *p_data);
|
||||
tBTM_BLE_ADV_DATA *p_data);
|
||||
tBTM_STATUS btm_ble_start_adv(void);
|
||||
tBTM_STATUS btm_ble_stop_adv(void);
|
||||
tBTM_STATUS btm_ble_start_scan(void);
|
||||
@@ -419,7 +409,7 @@ BOOLEAN btm_ble_suspend_bg_conn(void);
|
||||
BOOLEAN btm_ble_resume_bg_conn(void);
|
||||
void btm_ble_initiate_select_conn(BD_ADDR bda);
|
||||
BOOLEAN btm_ble_start_auto_conn(BOOLEAN start);
|
||||
BOOLEAN btm_ble_start_select_conn(BOOLEAN start,tBTM_BLE_SEL_CBACK *p_select_cback);
|
||||
BOOLEAN btm_ble_start_select_conn(BOOLEAN start, tBTM_BLE_SEL_CBACK *p_select_cback);
|
||||
BOOLEAN btm_ble_renew_bg_conn_params(BOOLEAN add, BD_ADDR bd_addr);
|
||||
void btm_write_dir_conn_wl(BD_ADDR target_addr);
|
||||
void btm_ble_update_mode_operation(UINT8 link_role, BD_ADDR bda, UINT8 status);
|
||||
@@ -433,7 +423,7 @@ void btm_ble_enqueue_direct_conn_req(void *p_param);
|
||||
/* BLE address management */
|
||||
void btm_gen_resolvable_private_addr (void *p_cmd_cplt_cback);
|
||||
void btm_gen_non_resolvable_private_addr (tBTM_BLE_ADDR_CBACK *p_cback, void *p);
|
||||
void btm_ble_resolve_random_addr(BD_ADDR random_bda, tBTM_BLE_RESOLVE_CBACK * p_cback, void *p);
|
||||
void btm_ble_resolve_random_addr(BD_ADDR random_bda, tBTM_BLE_RESOLVE_CBACK *p_cback, void *p);
|
||||
void btm_gen_resolve_paddr_low(tBTM_RAND_ENC *p);
|
||||
|
||||
/* privacy function */
|
||||
@@ -457,7 +447,7 @@ void btm_ble_resolving_list_cleanup(void);
|
||||
|
||||
void btm_ble_multi_adv_configure_rpa (tBTM_BLE_MULTI_ADV_INST *p_inst);
|
||||
void btm_ble_multi_adv_init(void);
|
||||
void* btm_ble_multi_adv_get_ref(UINT8 inst_id);
|
||||
void *btm_ble_multi_adv_get_ref(UINT8 inst_id);
|
||||
void btm_ble_multi_adv_cleanup(void);
|
||||
void btm_ble_multi_adv_reenable(UINT8 inst_id);
|
||||
void btm_ble_multi_adv_enb_privacy(BOOLEAN enable);
|
||||
|
||||
Executable → Regular
+134
-161
@@ -75,25 +75,24 @@ typedef char tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];
|
||||
|
||||
/* Define the ACL Management control structure
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
UINT16 hci_handle;
|
||||
UINT16 pkt_types_mask;
|
||||
UINT16 clock_offset;
|
||||
BD_ADDR remote_addr;
|
||||
DEV_CLASS remote_dc;
|
||||
BD_NAME remote_name;
|
||||
typedef struct {
|
||||
UINT16 hci_handle;
|
||||
UINT16 pkt_types_mask;
|
||||
UINT16 clock_offset;
|
||||
BD_ADDR remote_addr;
|
||||
DEV_CLASS remote_dc;
|
||||
BD_NAME remote_name;
|
||||
|
||||
UINT16 manufacturer;
|
||||
UINT16 lmp_subversion;
|
||||
UINT16 link_super_tout;
|
||||
BD_FEATURES peer_lmp_features[HCI_EXT_FEATURES_PAGE_MAX + 1]; /* Peer LMP Extended features mask table for the device */
|
||||
UINT8 num_read_pages;
|
||||
UINT8 lmp_version;
|
||||
UINT16 manufacturer;
|
||||
UINT16 lmp_subversion;
|
||||
UINT16 link_super_tout;
|
||||
BD_FEATURES peer_lmp_features[HCI_EXT_FEATURES_PAGE_MAX + 1]; /* Peer LMP Extended features mask table for the device */
|
||||
UINT8 num_read_pages;
|
||||
UINT8 lmp_version;
|
||||
|
||||
BOOLEAN in_use;
|
||||
UINT8 link_role;
|
||||
BOOLEAN link_up_issued; /* True if busy_level link up has been issued */
|
||||
BOOLEAN in_use;
|
||||
UINT8 link_role;
|
||||
BOOLEAN link_up_issued; /* True if busy_level link up has been issued */
|
||||
|
||||
#define BTM_ACL_SWKEY_STATE_IDLE 0
|
||||
#define BTM_ACL_SWKEY_STATE_MODE_CHANGE 1
|
||||
@@ -101,21 +100,21 @@ typedef struct
|
||||
#define BTM_ACL_SWKEY_STATE_SWITCHING 3
|
||||
#define BTM_ACL_SWKEY_STATE_ENCRYPTION_ON 4
|
||||
#define BTM_ACL_SWKEY_STATE_IN_PROGRESS 5
|
||||
UINT8 switch_role_state;
|
||||
UINT8 switch_role_state;
|
||||
|
||||
#define BTM_ACL_ENCRYPT_STATE_IDLE 0
|
||||
#define BTM_ACL_ENCRYPT_STATE_ENCRYPT_OFF 1 /* encryption turning off */
|
||||
#define BTM_ACL_ENCRYPT_STATE_TEMP_FUNC 2 /* temporarily off for change link key or role switch */
|
||||
#define BTM_ACL_ENCRYPT_STATE_ENCRYPT_ON 3 /* encryption turning on */
|
||||
UINT8 encrypt_state; /* overall BTM encryption state */
|
||||
UINT8 encrypt_state; /* overall BTM encryption state */
|
||||
|
||||
#if BLE_INCLUDED == TRUE
|
||||
tBT_TRANSPORT transport;
|
||||
BD_ADDR conn_addr; /* local device address used for this connection */
|
||||
UINT8 conn_addr_type; /* local device address type for this connection */
|
||||
BD_ADDR active_remote_addr; /* remote address used on this connection */
|
||||
UINT8 active_remote_addr_type; /* local device address type for this connection */
|
||||
BD_FEATURES peer_le_features; /* Peer LE Used features mask for the device */
|
||||
tBT_TRANSPORT transport;
|
||||
BD_ADDR conn_addr; /* local device address used for this connection */
|
||||
UINT8 conn_addr_type; /* local device address type for this connection */
|
||||
BD_ADDR active_remote_addr; /* remote address used on this connection */
|
||||
UINT8 active_remote_addr_type; /* local device address type for this connection */
|
||||
BD_FEATURES peer_le_features; /* Peer LE Used features mask for the device */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -130,48 +129,47 @@ typedef struct
|
||||
|
||||
/* Define the Device Management control structure
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
tBTM_DEV_STATUS_CB *p_dev_status_cb; /* Device status change callback */
|
||||
tBTM_VS_EVT_CB *p_vend_spec_cb[BTM_MAX_VSE_CALLBACKS]; /* Register for vendor specific events */
|
||||
typedef struct {
|
||||
tBTM_DEV_STATUS_CB *p_dev_status_cb; /* Device status change callback */
|
||||
tBTM_VS_EVT_CB *p_vend_spec_cb[BTM_MAX_VSE_CALLBACKS]; /* Register for vendor specific events */
|
||||
|
||||
tBTM_CMPL_CB *p_stored_link_key_cmpl_cb; /* Read/Write/Delete stored link key */
|
||||
tBTM_CMPL_CB *p_stored_link_key_cmpl_cb; /* Read/Write/Delete stored link key */
|
||||
|
||||
TIMER_LIST_ENT reset_timer;
|
||||
tBTM_CMPL_CB *p_reset_cmpl_cb;
|
||||
TIMER_LIST_ENT reset_timer;
|
||||
tBTM_CMPL_CB *p_reset_cmpl_cb;
|
||||
|
||||
TIMER_LIST_ENT rln_timer;
|
||||
tBTM_CMPL_CB *p_rln_cmpl_cb; /* Callback function to be called when */
|
||||
/* read local name function complete */
|
||||
TIMER_LIST_ENT rssi_timer;
|
||||
tBTM_CMPL_CB *p_rssi_cmpl_cb; /* Callback function to be called when */
|
||||
/* read rssi function completes */
|
||||
TIMER_LIST_ENT lnk_quality_timer;
|
||||
tBTM_CMPL_CB *p_lnk_qual_cmpl_cb;/* Callback function to be called when */
|
||||
/* read link quality function completes */
|
||||
TIMER_LIST_ENT txpwer_timer;
|
||||
tBTM_CMPL_CB *p_txpwer_cmpl_cb; /* Callback function to be called when */
|
||||
/* read inq tx power function completes */
|
||||
TIMER_LIST_ENT rln_timer;
|
||||
tBTM_CMPL_CB *p_rln_cmpl_cb; /* Callback function to be called when */
|
||||
/* read local name function complete */
|
||||
TIMER_LIST_ENT rssi_timer;
|
||||
tBTM_CMPL_CB *p_rssi_cmpl_cb; /* Callback function to be called when */
|
||||
/* read rssi function completes */
|
||||
TIMER_LIST_ENT lnk_quality_timer;
|
||||
tBTM_CMPL_CB *p_lnk_qual_cmpl_cb;/* Callback function to be called when */
|
||||
/* read link quality function completes */
|
||||
TIMER_LIST_ENT txpwer_timer;
|
||||
tBTM_CMPL_CB *p_txpwer_cmpl_cb; /* Callback function to be called when */
|
||||
/* read inq tx power function completes */
|
||||
|
||||
TIMER_LIST_ENT qossu_timer;
|
||||
tBTM_CMPL_CB *p_qossu_cmpl_cb; /* Callback function to be called when */
|
||||
/* qos setup function completes */
|
||||
TIMER_LIST_ENT qossu_timer;
|
||||
tBTM_CMPL_CB *p_qossu_cmpl_cb; /* Callback function to be called when */
|
||||
/* qos setup function completes */
|
||||
|
||||
tBTM_ROLE_SWITCH_CMPL switch_role_ref_data;
|
||||
tBTM_CMPL_CB *p_switch_role_cb; /* Callback function to be called when */
|
||||
/* requested switch role is completed */
|
||||
tBTM_ROLE_SWITCH_CMPL switch_role_ref_data;
|
||||
tBTM_CMPL_CB *p_switch_role_cb; /* Callback function to be called when */
|
||||
/* requested switch role is completed */
|
||||
|
||||
TIMER_LIST_ENT tx_power_timer;
|
||||
tBTM_CMPL_CB *p_tx_power_cmpl_cb;/* Callback function to be called */
|
||||
TIMER_LIST_ENT tx_power_timer;
|
||||
tBTM_CMPL_CB *p_tx_power_cmpl_cb;/* Callback function to be called */
|
||||
|
||||
DEV_CLASS dev_class; /* Local device class */
|
||||
DEV_CLASS dev_class; /* Local device class */
|
||||
|
||||
#if BLE_INCLUDED == TRUE
|
||||
|
||||
tBTM_CMPL_CB *p_le_test_cmd_cmpl_cb; /* Callback function to be called when
|
||||
tBTM_CMPL_CB *p_le_test_cmd_cmpl_cb; /* Callback function to be called when
|
||||
LE test mode command has been sent successfully */
|
||||
|
||||
BD_ADDR read_tx_pwr_addr; /* read TX power target address */
|
||||
BD_ADDR read_tx_pwr_addr; /* read TX power target address */
|
||||
|
||||
#define BTM_LE_SUPPORT_STATE_SIZE 8
|
||||
UINT8 le_supported_states[BTM_LE_SUPPORT_STATE_SIZE];
|
||||
@@ -180,20 +178,20 @@ tBTM_BLE_LOCAL_ID_KEYS id_keys; /* local BLE ID keys */
|
||||
BT_OCTET16 ble_encryption_key_value; /* BLE encryption key */
|
||||
|
||||
#if BTM_BLE_CONFORMANCE_TESTING == TRUE
|
||||
BOOLEAN no_disc_if_pair_fail;
|
||||
BOOLEAN enable_test_mac_val;
|
||||
BT_OCTET8 test_mac;
|
||||
BOOLEAN enable_test_local_sign_cntr;
|
||||
UINT32 test_local_sign_cntr;
|
||||
BOOLEAN no_disc_if_pair_fail;
|
||||
BOOLEAN enable_test_mac_val;
|
||||
BT_OCTET8 test_mac;
|
||||
BOOLEAN enable_test_local_sign_cntr;
|
||||
UINT32 test_local_sign_cntr;
|
||||
#endif
|
||||
|
||||
#endif /* BLE_INCLUDED */
|
||||
|
||||
tBTM_IO_CAP loc_io_caps; /* IO capability of the local device */
|
||||
tBTM_AUTH_REQ loc_auth_req; /* the auth_req flag */
|
||||
BOOLEAN secure_connections_only; /* Rejects service level 0 connections if */
|
||||
/* itself or peer device doesn't support */
|
||||
/* secure connections */
|
||||
tBTM_IO_CAP loc_io_caps; /* IO capability of the local device */
|
||||
tBTM_AUTH_REQ loc_auth_req; /* the auth_req flag */
|
||||
BOOLEAN secure_connections_only; /* Rejects service level 0 connections if */
|
||||
/* itself or peer device doesn't support */
|
||||
/* secure connections */
|
||||
} tBTM_DEVCB;
|
||||
|
||||
|
||||
@@ -211,42 +209,38 @@ BT_OCTET16 ble_encryption_key_value; /* BLE encryption key */
|
||||
#define BTM_MIN_INQ_TX_POWER -70
|
||||
#define BTM_MAX_INQ_TX_POWER 20
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 inq_count; /* Used for determining if a response has already been */
|
||||
/* received for the current inquiry operation. (We do not */
|
||||
/* want to flood the caller with multiple responses from */
|
||||
/* the same device. */
|
||||
BD_ADDR bd_addr;
|
||||
typedef struct {
|
||||
UINT32 inq_count; /* Used for determining if a response has already been */
|
||||
/* received for the current inquiry operation. (We do not */
|
||||
/* want to flood the caller with multiple responses from */
|
||||
/* the same device. */
|
||||
BD_ADDR bd_addr;
|
||||
} tINQ_BDADDR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 time_of_resp;
|
||||
UINT32 inq_count; /* "timestamps" the entry with a particular inquiry count */
|
||||
/* Used for determining if a response has already been */
|
||||
/* received for the current inquiry operation. (We do not */
|
||||
/* want to flood the caller with multiple responses from */
|
||||
/* the same device. */
|
||||
tBTM_INQ_INFO inq_info;
|
||||
BOOLEAN in_use;
|
||||
typedef struct {
|
||||
UINT32 time_of_resp;
|
||||
UINT32 inq_count; /* "timestamps" the entry with a particular inquiry count */
|
||||
/* Used for determining if a response has already been */
|
||||
/* received for the current inquiry operation. (We do not */
|
||||
/* want to flood the caller with multiple responses from */
|
||||
/* the same device. */
|
||||
tBTM_INQ_INFO inq_info;
|
||||
BOOLEAN in_use;
|
||||
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
BOOLEAN scan_rsp;
|
||||
BOOLEAN scan_rsp;
|
||||
#endif
|
||||
} tINQ_DB_ENT;
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
INQ_NONE,
|
||||
INQ_LE_OBSERVE,
|
||||
INQ_GENERAL
|
||||
enum {
|
||||
INQ_NONE,
|
||||
INQ_LE_OBSERVE,
|
||||
INQ_GENERAL
|
||||
};
|
||||
typedef UINT8 tBTM_INQ_TYPE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTM_CMPL_CB *p_remname_cmpl_cb;
|
||||
|
||||
#define BTM_EXT_RMT_NAME_TIMEOUT 40
|
||||
@@ -277,8 +271,8 @@ typedef struct
|
||||
tBTM_INQ_RESULTS_CB *p_inq_ble_results_cb;/*results callback exclusively for LE observe*/
|
||||
tBTM_CMPL_CB *p_inqfilter_cmpl_cb; /* Called (if not NULL) after inquiry filter completed */
|
||||
UINT32 inq_counter; /* Counter incremented each time an inquiry completes */
|
||||
/* Used for determining whether or not duplicate devices */
|
||||
/* have responded to the same inquiry */
|
||||
/* Used for determining whether or not duplicate devices */
|
||||
/* have responded to the same inquiry */
|
||||
TIMER_LIST_ENT inq_timer_ent;
|
||||
tINQ_BDADDR *p_bd_db; /* Pointer to memory that holds bdaddrs */
|
||||
UINT16 num_bd_entries; /* Number of entries in database */
|
||||
@@ -291,12 +285,12 @@ typedef struct
|
||||
UINT16 per_max_delay; /* Current periodic maximum delay */
|
||||
BOOLEAN inqfilt_active;
|
||||
UINT8 pending_filt_complete_event; /* to take care of btm_event_filter_complete corresponding to */
|
||||
/* inquiry that has been cancelled*/
|
||||
/* inquiry that has been cancelled*/
|
||||
UINT8 inqfilt_type; /* Contains the inquiry filter type (BD ADDR, COD, or Clear) */
|
||||
|
||||
#define BTM_INQ_INACTIVE_STATE 0
|
||||
#define BTM_INQ_CLR_FILT_STATE 1 /* Currently clearing the inquiry filter preceeding the inquiry request */
|
||||
/* (bypassed if filtering is not used) */
|
||||
/* (bypassed if filtering is not used) */
|
||||
#define BTM_INQ_SET_FILT_STATE 2 /* Sets the new filter (or turns off filtering) in this state */
|
||||
#define BTM_INQ_ACTIVE_STATE 3 /* Actual inquiry or periodic inquiry is in progress */
|
||||
#define BTM_INQ_REMNAME_STATE 4 /* Remote name requests are active */
|
||||
@@ -359,8 +353,7 @@ typedef void (tBTM_SCO_IND_CBACK) (UINT16 sco_inx) ;
|
||||
#define BTM_SCO_ROUTE_UNKNOWN 0xff
|
||||
|
||||
/* Define the structure that contains (e)SCO data */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTM_ESCO_CBACK *p_esco_cback; /* Callback for eSCO events */
|
||||
tBTM_ESCO_PARAMS setup;
|
||||
tBTM_ESCO_DATA data; /* Connection complete information */
|
||||
@@ -369,8 +362,7 @@ typedef struct
|
||||
|
||||
/* Define the structure used for SCO Management
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTM_ESCO_INFO esco; /* Current settings */
|
||||
#if BTM_SCO_HCI_INCLUDED == TRUE
|
||||
BUFFER_Q xmit_data_q; /* SCO data transmitting queue */
|
||||
@@ -385,8 +377,7 @@ typedef struct
|
||||
} tSCO_CONN;
|
||||
|
||||
/* SCO Management control block */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTM_SCO_IND_CBACK *app_sco_ind_cb;
|
||||
#if BTM_SCO_HCI_INCLUDED == TRUE
|
||||
tBTM_SCO_DATA_CB *p_data_cb; /* Callback for SCO data over HCI */
|
||||
@@ -411,7 +402,7 @@ typedef struct
|
||||
#if BTM_SCO_INCLUDED == TRUE
|
||||
void btm_set_sco_ind_cback( tBTM_SCO_IND_CBACK *sco_ind_cb );
|
||||
void btm_accept_sco_link(UINT16 sco_inx, tBTM_ESCO_PARAMS *p_setup,
|
||||
tBTM_SCO_CB *p_conn_cb, tBTM_SCO_CB *p_disc_cb);
|
||||
tBTM_SCO_CB *p_conn_cb, tBTM_SCO_CB *p_disc_cb);
|
||||
void btm_reject_sco_link(UINT16 sco_inx );
|
||||
void btm_sco_chk_pend_rolechange (UINT16 hci_handle);
|
||||
#else
|
||||
@@ -425,8 +416,7 @@ void btm_sco_chk_pend_rolechange (UINT16 hci_handle);
|
||||
** Define structure for Security Service Record.
|
||||
** A record exists for each service registered with the Security Manager
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT32 mx_proto_id; /* Service runs over this multiplexer protocol */
|
||||
UINT32 orig_mx_chan_id; /* Channel on the multiplexer protocol */
|
||||
UINT32 term_mx_chan_id; /* Channel on the multiplexer protocol */
|
||||
@@ -444,8 +434,7 @@ typedef struct
|
||||
|
||||
#if BLE_INCLUDED == TRUE
|
||||
/* LE Security information of device in Slave Role */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BT_OCTET16 irk; /* peer diverified identity root */
|
||||
BT_OCTET16 pltk; /* peer long term key */
|
||||
BT_OCTET16 pcsrk; /* peer SRK peer device used to secured sign local data */
|
||||
@@ -463,10 +452,9 @@ typedef struct
|
||||
|
||||
UINT32 counter; /* peer sign counter for verifying rcv signed cmd */
|
||||
UINT32 local_counter; /* local sign counter for sending signed write cmd*/
|
||||
}tBTM_SEC_BLE_KEYS;
|
||||
} tBTM_SEC_BLE_KEYS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BD_ADDR pseudo_addr; /* LE pseudo address of the device if different from device address */
|
||||
tBLE_ADDR_TYPE ble_addr_type; /* LE device type: public or random address */
|
||||
tBLE_ADDR_TYPE static_addr_type; /* static address type */
|
||||
@@ -495,8 +483,7 @@ typedef struct
|
||||
#endif /* BLE_INCLUDED */
|
||||
|
||||
/* Peering bond type */
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
BOND_TYPE_UNKNOWN,
|
||||
BOND_TYPE_PERSISTENT,
|
||||
BOND_TYPE_TEMPORARY
|
||||
@@ -507,8 +494,7 @@ typedef UINT8 tBTM_BOND_TYPE;
|
||||
** Define structure for Security Device Record.
|
||||
** A record exists for each device authenticated with this device
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTM_SEC_SERV_REC *p_cur_service;
|
||||
tBTM_SEC_CALLBACK *p_callback;
|
||||
void *p_ref_data;
|
||||
@@ -551,7 +537,7 @@ typedef struct
|
||||
#define BTM_SEC_STATE_SWITCHING_ROLE 5
|
||||
#define BTM_SEC_STATE_DISCONNECTING 6 /* disconnecting BR/EDR */
|
||||
#define BTM_SEC_STATE_DELAY_FOR_ENC 7 /* delay to check for encryption to work around */
|
||||
/* controller problems */
|
||||
/* controller problems */
|
||||
#define BTM_SEC_STATE_DISCONNECTING_BLE 8 /* disconnecting BLE */
|
||||
#define BTM_SEC_STATE_DISCONNECTING_BOTH 9 /* disconnecting BR/EDR and BLE */
|
||||
|
||||
@@ -559,7 +545,7 @@ typedef struct
|
||||
BOOLEAN is_originator; /* TRUE if device is originating connection */
|
||||
#if (L2CAP_UCD_INCLUDED == TRUE)
|
||||
BOOLEAN is_ucd; /* TRUE if device is sending or receiving UCD */
|
||||
/* if incoming security failed, received UCD will be discarded */
|
||||
/* if incoming security failed, received UCD will be discarded */
|
||||
#endif
|
||||
BOOLEAN role_master; /* TRUE if current mode is master */
|
||||
UINT16 security_required; /* Security required for connection */
|
||||
@@ -582,9 +568,9 @@ typedef struct
|
||||
tBTM_AUTH_REQ rmt_auth_req; /* the auth_req flag as in the IO caps rsp evt */
|
||||
BOOLEAN remote_supports_secure_connections;
|
||||
BOOLEAN remote_features_needed; /* set to true if the local device is in */
|
||||
/* "Secure Connections Only" mode and it receives */
|
||||
/* HCI_IO_CAPABILITY_REQUEST_EVT from the peer before */
|
||||
/* it knows peer's support for Secure Connections */
|
||||
/* "Secure Connections Only" mode and it receives */
|
||||
/* HCI_IO_CAPABILITY_REQUEST_EVT from the peer before */
|
||||
/* it knows peer's support for Secure Connections */
|
||||
|
||||
UINT16 ble_hci_handle; /* use in DUMO connection */
|
||||
UINT8 enc_key_size; /* current link encryption key size */
|
||||
@@ -595,8 +581,8 @@ typedef struct
|
||||
** for SM over BR/EDR.
|
||||
*/
|
||||
BOOLEAN no_smp_on_br; /* if set to TRUE then SMP on BR/EDR doesn't */
|
||||
/* work, i.e. link keys crosspairing */
|
||||
/* SC BR/EDR->SC LE doesn't happen */
|
||||
/* work, i.e. link keys crosspairing */
|
||||
/* SC BR/EDR->SC LE doesn't happen */
|
||||
tBTM_BOND_TYPE bond_type; /* peering bond type */
|
||||
|
||||
#if BLE_INCLUDED == TRUE
|
||||
@@ -626,8 +612,7 @@ typedef struct
|
||||
/*
|
||||
** Define device configuration structure
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
#if BTM_MAX_LOC_BD_NAME_LEN > 0
|
||||
tBTM_LOC_BD_NAME bd_name; /* local Bluetooth device name */
|
||||
#endif
|
||||
@@ -638,8 +623,7 @@ typedef struct
|
||||
UINT8 def_inq_scan_mode; /* ??? limited/general/none */
|
||||
} tBTM_CFG;
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
BTM_PM_ST_ACTIVE = BTM_PM_STS_ACTIVE,
|
||||
BTM_PM_ST_HOLD = BTM_PM_STS_HOLD,
|
||||
BTM_PM_ST_SNIFF = BTM_PM_STS_SNIFF,
|
||||
@@ -648,43 +632,37 @@ enum
|
||||
};
|
||||
typedef UINT8 tBTM_PM_STATE;
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
BTM_PM_SET_MODE_EVT, /* Set power mode API is called. */
|
||||
BTM_PM_UPDATE_EVT,
|
||||
BTM_PM_RD_MODE_EVT /* Read power mode API is called. */
|
||||
};
|
||||
typedef UINT8 tBTM_PM_EVENT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 event;
|
||||
UINT16 len;
|
||||
UINT8 link_ind;
|
||||
} tBTM_PM_MSG_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 hci_status;
|
||||
UINT8 mode;
|
||||
UINT16 interval;
|
||||
} tBTM_PM_MD_CHG_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 pm_id; /* the entity that calls SetPowerMode API */
|
||||
tBTM_PM_PWR_MD *p_pmd;
|
||||
} tBTM_PM_SET_MD_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
void *p_data;
|
||||
UINT8 link_ind;
|
||||
} tBTM_PM_SM_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tBTM_PM_PWR_MD req_mode[BTM_MAX_PM_RECORDS+1]; /* the desired mode and parameters of the connection*/
|
||||
typedef struct {
|
||||
tBTM_PM_PWR_MD req_mode[BTM_MAX_PM_RECORDS + 1]; /* the desired mode and parameters of the connection*/
|
||||
tBTM_PM_PWR_MD set_mode; /* the mode and parameters sent down to the host controller. */
|
||||
UINT16 interval; /* the interval from last mode change event. */
|
||||
#if (BTM_SSR_INCLUDED == TRUE)
|
||||
@@ -697,14 +675,12 @@ typedef struct
|
||||
} tBTM_PM_MCB;
|
||||
|
||||
#define BTM_PM_REC_NOT_USED 0
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTM_PM_STATUS_CBACK *cback;/* to notify the registered party of mode change event */
|
||||
UINT8 mask; /* registered request mask. 0, if this entry is not used */
|
||||
} tBTM_PM_RCB;
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
BTM_BLI_ACL_UP_EVT,
|
||||
BTM_BLI_ACL_DOWN_EVT,
|
||||
BTM_BLI_PAGE_EVT,
|
||||
@@ -716,8 +692,7 @@ enum
|
||||
typedef UINT8 tBTM_BLI_EVENT;
|
||||
|
||||
/* Pairing State */
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
BTM_PAIR_STATE_IDLE, /* Idle */
|
||||
BTM_PAIR_STATE_GET_REM_NAME, /* Getting the remote name (to check for SM4) */
|
||||
BTM_PAIR_STATE_WAIT_PIN_REQ, /* Started authentication, waiting for PIN req (PIN is pre-fetched) */
|
||||
@@ -742,8 +717,7 @@ typedef UINT8 tBTM_PAIRING_STATE;
|
||||
#define BTM_PAIR_FLAGS_LE_ACTIVE 0x80 /* use this bit when SMP pairing is active */
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BOOLEAN is_mux;
|
||||
BD_ADDR bd_addr;
|
||||
UINT16 psm;
|
||||
@@ -778,8 +752,7 @@ typedef BOOLEAN CONNECTION_TYPE;
|
||||
|
||||
#define BTM_STATE_BUFFER_SIZE 5 /* size of state buffer */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTM_CFG cfg; /* Device configuration */
|
||||
|
||||
/****************************************************
|
||||
@@ -797,7 +770,7 @@ typedef struct
|
||||
** Power Management
|
||||
****************************************************/
|
||||
tBTM_PM_MCB pm_mode_db[MAX_L2CAP_LINKS]; /* per ACL link */
|
||||
tBTM_PM_RCB pm_reg_db[BTM_MAX_PM_RECORDS+1]; /* per application/module */
|
||||
tBTM_PM_RCB pm_reg_db[BTM_MAX_PM_RECORDS + 1]; /* per application/module */
|
||||
UINT8 pm_pend_link; /* the index of acl_db, which has a pending PM cmd */
|
||||
UINT8 pm_pend_id; /* the id pf the module, which has a pending PM cmd */
|
||||
|
||||
@@ -819,7 +792,7 @@ typedef struct
|
||||
tBTM_BLE_VSC_CB cmn_ble_vsc_cb;
|
||||
#endif
|
||||
|
||||
/* Packet types supported by the local device */
|
||||
/* Packet types supported by the local device */
|
||||
UINT16 btm_acl_pkt_types_supported;
|
||||
UINT16 btm_sco_pkt_types_supported;
|
||||
|
||||
@@ -915,12 +888,12 @@ void btm_init (void);
|
||||
*******************************************
|
||||
*/
|
||||
tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda,
|
||||
tBTM_INQ_INFO *p_cur,
|
||||
UINT8 origin, UINT32 timeout,
|
||||
tBTM_CMPL_CB *p_cb);
|
||||
tBTM_INQ_INFO *p_cur,
|
||||
UINT8 origin, UINT32 timeout,
|
||||
tBTM_CMPL_CB *p_cb);
|
||||
|
||||
void btm_process_remote_name (BD_ADDR bda, BD_NAME name, UINT16 evt_len,
|
||||
UINT8 hci_status);
|
||||
UINT8 hci_status);
|
||||
void btm_inq_rmt_name_failed(void);
|
||||
|
||||
/* Inquiry related functions */
|
||||
@@ -942,14 +915,14 @@ BOOLEAN btm_lookup_eir(BD_ADDR_PTR p_rem_addr);
|
||||
*/
|
||||
void btm_acl_init (void);
|
||||
void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
|
||||
UINT16 hci_handle, UINT8 link_role, tBT_TRANSPORT transport);
|
||||
UINT16 hci_handle, UINT8 link_role, tBT_TRANSPORT transport);
|
||||
void btm_acl_removed (BD_ADDR bda, tBT_TRANSPORT transport);
|
||||
void btm_acl_device_down (void);
|
||||
void btm_acl_update_busy_level (tBTM_BLI_EVENT event);
|
||||
|
||||
void btm_cont_rswitch (tACL_CONN *p,
|
||||
tBTM_SEC_DEV_REC *p_dev_rec,
|
||||
UINT8 hci_status);
|
||||
tBTM_SEC_DEV_REC *p_dev_rec,
|
||||
UINT8 hci_status);
|
||||
|
||||
UINT8 btm_handle_to_acl_index (UINT16 hci_handle);
|
||||
void btm_read_link_policy_complete (UINT8 *p);
|
||||
@@ -980,7 +953,7 @@ void btm_pm_reset(void);
|
||||
void btm_pm_sm_alloc(UINT8 ind);
|
||||
void btm_pm_proc_cmd_status(UINT8 status);
|
||||
void btm_pm_proc_mode_change (UINT8 hci_status, UINT16 hci_handle, UINT8 mode,
|
||||
UINT16 interval);
|
||||
UINT16 interval);
|
||||
void btm_pm_proc_ssr_evt (UINT8 *p, UINT16 evt_len);
|
||||
#if BTM_SCO_INCLUDED == TRUE
|
||||
void btm_sco_chk_pend_unpark (UINT8 hci_status, UINT16 hci_handle);
|
||||
@@ -995,10 +968,10 @@ void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow);
|
||||
*/
|
||||
void btm_sco_init (void);
|
||||
void btm_sco_connected (UINT8 hci_status, BD_ADDR bda, UINT16 hci_handle,
|
||||
tBTM_ESCO_DATA *p_esco_data);
|
||||
tBTM_ESCO_DATA *p_esco_data);
|
||||
void btm_esco_proc_conn_chg (UINT8 status, UINT16 handle, UINT8 tx_interval,
|
||||
UINT8 retrans_window, UINT16 rx_pkt_len,
|
||||
UINT16 tx_pkt_len);
|
||||
UINT8 retrans_window, UINT16 rx_pkt_len,
|
||||
UINT16 tx_pkt_len);
|
||||
void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type);
|
||||
void btm_sco_removed (UINT16 hci_handle, UINT8 reason);
|
||||
void btm_sco_acl_removed (BD_ADDR bda);
|
||||
@@ -1030,7 +1003,7 @@ void btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC *p_dev_rec);
|
||||
|
||||
/* Vendor Specific Command complete evt handler */
|
||||
void btm_vsc_complete (UINT8 *p, UINT16 cc_opcode, UINT16 evt_len,
|
||||
tBTM_CMPL_CB *p_vsc_cplt_cback);
|
||||
tBTM_CMPL_CB *p_vsc_cplt_cback);
|
||||
void btm_inq_db_reset (void);
|
||||
void btm_vendor_specific_evt (UINT8 *p, UINT8 evt_len);
|
||||
void btm_delete_stored_link_key_complete (UINT8 *p);
|
||||
@@ -1049,7 +1022,7 @@ tBTM_SEC_DEV_REC *btm_find_or_alloc_dev (BD_ADDR bd_addr);
|
||||
tBTM_SEC_DEV_REC *btm_find_dev_by_handle (UINT16 handle);
|
||||
tBTM_BOND_TYPE btm_get_bond_type_dev(BD_ADDR bd_addr);
|
||||
BOOLEAN btm_set_bond_type_dev(BD_ADDR bd_addr,
|
||||
tBTM_BOND_TYPE bond_type);
|
||||
tBTM_BOND_TYPE bond_type);
|
||||
|
||||
/* Internal functions provided by btm_sec.c
|
||||
**********************************************
|
||||
|
||||
Executable → Regular
+12
-16
@@ -33,20 +33,20 @@
|
||||
// HACK(zachoverflow): temporary dark magic
|
||||
#define BTU_POST_TO_TASK_NO_GOOD_HORRIBLE_HACK 0x1700 // didn't look used in bt_types...here goes nothing
|
||||
typedef struct {
|
||||
void (*callback)(BT_HDR *);
|
||||
void (*callback)(BT_HDR *);
|
||||
} post_to_task_hack_t;
|
||||
|
||||
typedef struct {
|
||||
void (*callback)(BT_HDR *);
|
||||
BT_HDR *response;
|
||||
void *context;
|
||||
void (*callback)(BT_HDR *);
|
||||
BT_HDR *response;
|
||||
void *context;
|
||||
} command_complete_hack_t;
|
||||
|
||||
typedef struct {
|
||||
void (*callback)(BT_HDR *);
|
||||
uint8_t status;
|
||||
BT_HDR *command;
|
||||
void *context;
|
||||
void (*callback)(BT_HDR *);
|
||||
uint8_t status;
|
||||
BT_HDR *command;
|
||||
void *context;
|
||||
} command_status_hack_t;
|
||||
|
||||
/* callbacks
|
||||
@@ -164,8 +164,7 @@ typedef void (*tBTU_EVENT_CALLBACK)(BT_HDR *p_hdr);
|
||||
/* This is the inquiry response information held by BTU, and available
|
||||
** to applications.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BD_ADDR remote_bd_addr;
|
||||
UINT8 page_scan_rep_mode;
|
||||
UINT8 page_scan_per_mode;
|
||||
@@ -185,15 +184,13 @@ typedef struct
|
||||
#endif
|
||||
|
||||
/* structure to hold registered timers */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
TIMER_LIST_ENT *p_tle; /* timer entry */
|
||||
tBTU_TIMER_CALLBACK timer_cb; /* callback triggered when timer expires */
|
||||
} tBTU_TIMER_REG;
|
||||
|
||||
/* structure to hold registered event callbacks */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 event_range; /* start of event range */
|
||||
tBTU_EVENT_CALLBACK event_cb; /* callback triggered when event is in range */
|
||||
} tBTU_EVENT_REG;
|
||||
@@ -206,8 +203,7 @@ typedef struct
|
||||
|
||||
/* Define structure holding BTU variables
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBTU_TIMER_REG timer_reg[BTU_MAX_REG_TIMER];
|
||||
tBTU_EVENT_REG event_reg[BTU_MAX_REG_EVENT];
|
||||
|
||||
|
||||
Executable → Regular
+11
-14
@@ -99,30 +99,27 @@ typedef void (tGAP_CALLBACK) (UINT16 event, void *p_data);
|
||||
|
||||
|
||||
/* Definition of the GAP_FindAddrByName results structure */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 status;
|
||||
BD_ADDR bd_addr;
|
||||
tBTM_BD_NAME devname;
|
||||
} tGAP_FINDADDR_RESULTS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 int_min;
|
||||
UINT16 int_max;
|
||||
UINT16 latency;
|
||||
UINT16 sp_tout;
|
||||
}tGAP_BLE_PREF_PARAM;
|
||||
} tGAP_BLE_PREF_PARAM;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tGAP_BLE_PREF_PARAM conn_param;
|
||||
BD_ADDR reconn_bda;
|
||||
UINT16 icon;
|
||||
UINT8 *p_dev_name;
|
||||
UINT8 addr_resolution;
|
||||
|
||||
}tGAP_BLE_ATTR_VALUE;
|
||||
} tGAP_BLE_ATTR_VALUE;
|
||||
|
||||
typedef void (tGAP_BLE_CMPL_CBACK)(BOOLEAN status, BD_ADDR addr, UINT16 length, char *p_name);
|
||||
|
||||
@@ -143,9 +140,9 @@ typedef void (tGAP_BLE_CMPL_CBACK)(BOOLEAN status, BD_ADDR addr, UINT16 length,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
|
||||
BD_ADDR p_rem_bda, UINT16 psm, tL2CAP_CFG_INFO *p_cfg,
|
||||
tL2CAP_ERTM_INFO *ertm_info,
|
||||
UINT16 security, UINT8 chan_mode_mask, tGAP_CONN_CALLBACK *p_cb);
|
||||
BD_ADDR p_rem_bda, UINT16 psm, tL2CAP_CFG_INFO *p_cfg,
|
||||
tL2CAP_ERTM_INFO *ertm_info,
|
||||
UINT16 security, UINT8 chan_mode_mask, tGAP_CONN_CALLBACK *p_cb);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -173,7 +170,7 @@ extern UINT16 GAP_ConnClose (UINT16 gap_handle);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 GAP_ConnReadData (UINT16 gap_handle, UINT8 *p_data,
|
||||
UINT16 max_len, UINT16 *p_len);
|
||||
UINT16 max_len, UINT16 *p_len);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -232,7 +229,7 @@ extern UINT16 GAP_ConnBTWrite (UINT16 gap_handle, BT_HDR *p_buf);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 GAP_ConnWriteData (UINT16 gap_handle, UINT8 *p_data,
|
||||
UINT16 max_len, UINT16 *p_len);
|
||||
UINT16 max_len, UINT16 *p_len);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -374,7 +371,7 @@ extern BOOLEAN GAP_BleReadPeerDevName (BD_ADDR peer_bda, tGAP_BLE_CMPL_CBACK *p_
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN GAP_BleReadPeerAddressResolutionCap (BD_ADDR peer_bda,
|
||||
tGAP_BLE_CMPL_CBACK *p_cback);
|
||||
tGAP_BLE_CMPL_CBACK *p_cback);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
Executable → Regular
+54
-87
@@ -64,7 +64,7 @@
|
||||
#define GATT_NOT_ENCRYPTED 0x8e
|
||||
#define GATT_CONGESTED 0x8f
|
||||
|
||||
/* 0xE0 ~ 0xFC reserved for future use */
|
||||
/* 0xE0 ~ 0xFC reserved for future use */
|
||||
#define GATT_CCC_CFG_ERR 0xFD /* Client Characteristic Configuration Descriptor Improperly Configured */
|
||||
#define GATT_PRC_IN_PROGRESS 0xFE /* Procedure Already in progress */
|
||||
#define GATT_OUT_OF_RANGE 0xFF /* Attribute value out of range */
|
||||
@@ -117,13 +117,13 @@ typedef UINT16 tGATT_DISCONN_REASON;
|
||||
/* MAX GATT MTU size
|
||||
*/
|
||||
#ifndef GATT_MAX_MTU_SIZE
|
||||
#define GATT_MAX_MTU_SIZE 517
|
||||
#define GATT_MAX_MTU_SIZE 517
|
||||
#endif
|
||||
|
||||
/* max legth of an attribute value
|
||||
*/
|
||||
#ifndef GATT_MAX_ATTR_LEN
|
||||
#define GATT_MAX_ATTR_LEN 600
|
||||
#define GATT_MAX_ATTR_LEN 600
|
||||
#endif
|
||||
|
||||
/* default GATT MTU size over LE link
|
||||
@@ -146,7 +146,7 @@ typedef UINT16 tGATT_DISCONN_REASON;
|
||||
/* GATT notification caching timer, default to be three seconds
|
||||
*/
|
||||
#ifndef GATTC_NOTIF_TIMEOUT
|
||||
#define GATTC_NOTIF_TIMEOUT 3
|
||||
#define GATTC_NOTIF_TIMEOUT 3
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -200,8 +200,7 @@ typedef UINT8 tGATT_CHAR_PROP;
|
||||
|
||||
/* Format of the value of a characteristic. enumeration type
|
||||
*/
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
GATT_FORMAT_RES, /* rfu */
|
||||
GATT_FORMAT_BOOL, /* 0x01 boolean */
|
||||
GATT_FORMAT_2BITS, /* 0x02 2 bit */
|
||||
@@ -236,8 +235,7 @@ typedef UINT8 tGATT_FORMAT;
|
||||
|
||||
/* Characteristic Presentation Format Descriptor value
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 unit; /* as UUIUD defined by SIG */
|
||||
UINT16 descr; /* as UUID as defined by SIG */
|
||||
tGATT_FORMAT format;
|
||||
@@ -247,16 +245,14 @@ typedef struct
|
||||
|
||||
/* Characteristic Report reference Descriptor format
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 rpt_id; /* report ID */
|
||||
UINT8 rpt_type; /* report type */
|
||||
} tGATT_CHAR_RPT_REF;
|
||||
|
||||
|
||||
#define GATT_VALID_RANGE_MAX_SIZE 16
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 format;
|
||||
UINT16 len;
|
||||
UINT8 lower_range[GATT_VALID_RANGE_MAX_SIZE]; /* in little endian format */
|
||||
@@ -266,8 +262,7 @@ typedef struct
|
||||
/* Characteristic Aggregate Format attribute value
|
||||
*/
|
||||
#define GATT_AGGR_HANDLE_NUM_MAX 10
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 num_handle;
|
||||
UINT16 handle_list[GATT_AGGR_HANDLE_NUM_MAX];
|
||||
} tGATT_CHAR_AGGRE;
|
||||
@@ -308,8 +303,7 @@ typedef UINT8 tGATT_AUTH_REQ;
|
||||
|
||||
/* Attribute Value structure
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 conn_id;
|
||||
UINT16 handle; /* attribute handle */
|
||||
UINT16 offset; /* attribute value offset, if no offfset is needed for the command, ignore it */
|
||||
@@ -320,11 +314,10 @@ typedef struct
|
||||
|
||||
/* Union of the event data which is used in the server respond API to carry the server response information
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
/* data type member event */
|
||||
tGATT_VALUE attr_value; /* READ, HANDLE_VALUE_IND, PREPARE_WRITE */
|
||||
/* READ_BLOB, READ_BY_TYPE */
|
||||
/* READ_BLOB, READ_BY_TYPE */
|
||||
UINT16 handle; /* WRITE, WRITE_BLOB */
|
||||
|
||||
} tGATTS_RSP;
|
||||
@@ -340,16 +333,14 @@ typedef UINT8 tGATT_TRANSPORT;
|
||||
typedef UINT8 tGATT_EXEC_FLAG;
|
||||
|
||||
/* read request always based on UUID */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 handle;
|
||||
UINT16 offset;
|
||||
BOOLEAN is_long;
|
||||
} tGATT_READ_REQ;
|
||||
|
||||
/* write request data */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 handle; /* attribute handle */
|
||||
UINT16 offset; /* attribute value offset, if no offfset is needed for the command, ignore it */
|
||||
UINT16 len; /* length of attribute value */
|
||||
@@ -359,13 +350,12 @@ typedef struct
|
||||
} tGATT_WRITE_REQ;
|
||||
|
||||
/* callback data for server access request from client */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tGATT_READ_REQ read_req; /* read request, read by Type, read blob */
|
||||
|
||||
tGATT_WRITE_REQ write_req; /* write */
|
||||
/* prepare write */
|
||||
/* write blob */
|
||||
/* prepare write */
|
||||
/* write blob */
|
||||
UINT16 handle; /* handle value confirmation */
|
||||
UINT16 mtu; /* MTU exchange request */
|
||||
tGATT_EXEC_FLAG exec_write; /* execute write */
|
||||
@@ -373,8 +363,7 @@ typedef union
|
||||
|
||||
typedef UINT8 tGATT_SERV_IF; /* GATT Service Interface */
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
GATTS_REQ_TYPE_READ = 1, /* Attribute read request */
|
||||
GATTS_REQ_TYPE_WRITE, /* Attribute write request */
|
||||
GATTS_REQ_TYPE_WRITE_EXEC, /* Execute write */
|
||||
@@ -388,8 +377,7 @@ typedef UINT8 tGATTS_REQ_TYPE;
|
||||
/* Client Used Data Structure
|
||||
*/
|
||||
/* definition of different discovery types */
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
GATT_DISC_SRVC_ALL = 1, /* discover all services */
|
||||
GATT_DISC_SRVC_BY_UUID, /* discover service of a special type */
|
||||
GATT_DISC_INC_SRVC, /* discover the included service within a service */
|
||||
@@ -401,17 +389,15 @@ typedef UINT8 tGATT_DISC_TYPE;
|
||||
|
||||
/* Discover parameters of different discovery types
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBT_UUID service;
|
||||
UINT16 s_handle;
|
||||
UINT16 e_handle;
|
||||
}tGATT_DISC_PARAM;
|
||||
} tGATT_DISC_PARAM;
|
||||
|
||||
/* GATT read type enumeration
|
||||
*/
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
GATT_READ_BY_TYPE = 1,
|
||||
GATT_READ_BY_HANDLE,
|
||||
GATT_READ_MULTIPLE,
|
||||
@@ -423,8 +409,7 @@ typedef UINT8 tGATT_READ_TYPE;
|
||||
|
||||
/* Read By Type Request (GATT_READ_BY_TYPE) Data
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATT_AUTH_REQ auth_req;
|
||||
UINT16 s_handle;
|
||||
UINT16 e_handle;
|
||||
@@ -434,23 +419,20 @@ typedef struct
|
||||
/* GATT_READ_MULTIPLE request data
|
||||
*/
|
||||
#define GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATT_AUTH_REQ auth_req;
|
||||
UINT16 num_handles; /* number of handles to read */
|
||||
UINT16 handles[GATT_MAX_READ_MULTI_HANDLES]; /* handles list to be read */
|
||||
} tGATT_READ_MULTI;
|
||||
|
||||
/* Read By Handle Request (GATT_READ_BY_HANDLE) data */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATT_AUTH_REQ auth_req;
|
||||
UINT16 handle;
|
||||
} tGATT_READ_BY_HANDLE;
|
||||
|
||||
/* READ_BT_HANDLE_Request data */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATT_AUTH_REQ auth_req;
|
||||
UINT16 handle;
|
||||
UINT16 offset;
|
||||
@@ -458,8 +440,7 @@ typedef struct
|
||||
|
||||
/* Read Request Data
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tGATT_READ_BY_TYPE service;
|
||||
tGATT_READ_BY_TYPE char_type; /* characterisitc type */
|
||||
tGATT_READ_MULTI read_multiple;
|
||||
@@ -468,8 +449,7 @@ typedef union
|
||||
} tGATT_READ_PARAM;
|
||||
|
||||
/* GATT write type enumeration */
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
GATT_WRITE_NO_RSP = 1,
|
||||
GATT_WRITE ,
|
||||
GATT_WRITE_PREPARE
|
||||
@@ -478,8 +458,7 @@ typedef UINT8 tGATT_WRITE_TYPE;
|
||||
|
||||
/* Client Operation Complete Callback Data
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tGATT_VALUE att_value;
|
||||
UINT16 mtu;
|
||||
UINT16 handle;
|
||||
@@ -499,8 +478,7 @@ typedef UINT8 tGATTC_OPTYPE;
|
||||
|
||||
/* characteristic declaration
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATT_CHAR_PROP char_prop; /* characterisitc properties */
|
||||
UINT16 val_handle; /* characteristic value attribute handle */
|
||||
tBT_UUID char_uuid; /* characteristic UUID type */
|
||||
@@ -508,8 +486,7 @@ typedef struct
|
||||
|
||||
/* primary service group data
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 e_handle; /* ending handle of the group */
|
||||
tBT_UUID service_type; /* group type */
|
||||
} tGATT_GROUP_VALUE;
|
||||
@@ -517,15 +494,13 @@ typedef struct
|
||||
|
||||
/* included service attribute value
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBT_UUID service_type; /* included service UUID */
|
||||
UINT16 s_handle; /* starting handle */
|
||||
UINT16 e_handle; /* ending handle */
|
||||
} tGATT_INCL_SRVC;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tGATT_INCL_SRVC incl_service; /* include service value */
|
||||
tGATT_GROUP_VALUE group_value; /* Service UUID type.
|
||||
This field is used with GATT_DISC_SRVC_ALL
|
||||
@@ -541,8 +516,7 @@ typedef union
|
||||
|
||||
/* discover result record
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBT_UUID type;
|
||||
UINT16 handle;
|
||||
tGATT_DISC_VALUE value;
|
||||
@@ -557,22 +531,22 @@ typedef struct
|
||||
#define GATT_INVALID_ACL_HANDLE 0xFFFF
|
||||
/* discover result callback function */
|
||||
typedef void (tGATT_DISC_RES_CB) (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
|
||||
tGATT_DISC_RES *p_data);
|
||||
tGATT_DISC_RES *p_data);
|
||||
|
||||
/* discover complete callback function */
|
||||
typedef void (tGATT_DISC_CMPL_CB) (UINT16 conn_id, tGATT_DISC_TYPE disc_type, tGATT_STATUS status);
|
||||
|
||||
/* Define a callback function for when read/write/disc/config operation is completed. */
|
||||
typedef void (tGATT_CMPL_CBACK) (UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS status,
|
||||
tGATT_CL_COMPLETE *p_data);
|
||||
tGATT_CL_COMPLETE *p_data);
|
||||
|
||||
/* Define a callback function when an initialized connection is established. */
|
||||
typedef void (tGATT_CONN_CBACK) (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id, BOOLEAN connected,
|
||||
tGATT_DISCONN_REASON reason, tBT_TRANSPORT transport);
|
||||
tGATT_DISCONN_REASON reason, tBT_TRANSPORT transport);
|
||||
|
||||
/* attribute request callback for ATT server */
|
||||
typedef void (tGATT_REQ_CBACK )(UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type,
|
||||
tGATTS_DATA *p_data);
|
||||
tGATTS_DATA *p_data);
|
||||
|
||||
/* channel congestion/uncongestion callback */
|
||||
typedef void (tGATT_CONGESTION_CBACK )(UINT16 conn_id, BOOLEAN congested);
|
||||
@@ -585,8 +559,7 @@ typedef void (tGATT_ENC_CMPL_CB)(tGATT_IF gatt_if, BD_ADDR bda);
|
||||
** GATT. This structure includes callback functions. All functions
|
||||
** MUST be provided.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATT_CONN_CBACK *p_conn_cb;
|
||||
tGATT_CMPL_CBACK *p_cmpl_cb;
|
||||
tGATT_DISC_RES_CB *p_disc_res_cb;
|
||||
@@ -600,8 +573,7 @@ typedef struct
|
||||
*/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tBT_UUID app_uuid128;
|
||||
tBT_UUID svc_uuid;
|
||||
UINT16 svc_inst;
|
||||
@@ -619,29 +591,25 @@ typedef struct
|
||||
#define GATTS_SRV_CHG_CMD_READ_CLENT 5
|
||||
typedef UINT8 tGATTS_SRV_CHG_CMD;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BD_ADDR bda;
|
||||
BOOLEAN srv_changed;
|
||||
} tGATTS_SRV_CHG;
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tGATTS_SRV_CHG srv_chg;
|
||||
UINT8 client_read_index; /* only used for sequential reading client srv chg info */
|
||||
} tGATTS_SRV_CHG_REQ;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tGATTS_SRV_CHG srv_chg;
|
||||
UINT8 num_clients;
|
||||
} tGATTS_SRV_CHG_RSP;
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATTS_HNDL_RANGE *p_new_srv_start;
|
||||
} tGATTS_PENDING_NEW_SRV_START;
|
||||
|
||||
@@ -649,10 +617,9 @@ typedef struct
|
||||
*/
|
||||
typedef void (tGATTS_NV_SAVE_CBACK)(BOOLEAN is_saved, tGATTS_HNDL_RANGE *p_hndl_range);
|
||||
typedef BOOLEAN (tGATTS_NV_SRV_CHG_CBACK)(tGATTS_SRV_CHG_CMD cmd, tGATTS_SRV_CHG_REQ *p_req,
|
||||
tGATTS_SRV_CHG_RSP *p_rsp);
|
||||
tGATTS_SRV_CHG_RSP *p_rsp);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tGATTS_NV_SAVE_CBACK *p_nv_save_callback;
|
||||
tGATTS_NV_SRV_CHG_CBACK *p_srv_chg_callback;
|
||||
} tGATT_APPL_INFO;
|
||||
@@ -774,7 +741,7 @@ extern UINT16 GATTS_AddIncludeService (UINT16 service_handle,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 GATTS_AddCharacteristic (UINT16 service_handle, tBT_UUID *char_uuid,
|
||||
tGATT_PERM perm,tGATT_CHAR_PROP property);
|
||||
tGATT_PERM perm, tGATT_CHAR_PROP property);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -796,7 +763,7 @@ extern UINT16 GATTS_AddCharacteristic (UINT16 service_handle, tBT_UUID *char_uui
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 GATTS_AddCharDescriptor (UINT16 service_handle, tGATT_PERM perm,
|
||||
tBT_UUID * p_descr_uuid);
|
||||
tBT_UUID *p_descr_uuid);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -860,8 +827,8 @@ extern void GATTS_StopService (UINT16 service_handle);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id,
|
||||
UINT16 attr_handle,
|
||||
UINT16 val_len, UINT8 *p_val);
|
||||
UINT16 attr_handle,
|
||||
UINT16 val_len, UINT8 *p_val);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -878,7 +845,7 @@ extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tGATT_STATUS GATTS_HandleValueNotification (UINT16 conn_id, UINT16 attr_handle,
|
||||
UINT16 val_len, UINT8 *p_val);
|
||||
UINT16 val_len, UINT8 *p_val);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -1149,7 +1116,7 @@ extern BOOLEAN GATT_GetConnectionInfor(UINT16 conn_id, tGATT_IF *p_gatt_if,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr,
|
||||
UINT16 *p_conn_id, tBT_TRANSPORT transport);
|
||||
UINT16 *p_conn_id, tBT_TRANSPORT transport);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -1179,8 +1146,8 @@ extern BOOLEAN GATT_Listen (tGATT_IF gatt_if, BOOLEAN start, BD_ADDR_PTR bd_addr
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void GATT_ConfigServiceChangeCCC (BD_ADDR remote_bda, BOOLEAN enable,
|
||||
tBT_TRANSPORT transport);
|
||||
|
||||
tBT_TRANSPORT transport);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
}
|
||||
|
||||
Executable → Regular
+1
-1
@@ -34,7 +34,7 @@
|
||||
#define GATT_UUID_INCLUDE_SERVICE 0x2802
|
||||
#define GATT_UUID_CHAR_DECLARE 0x2803 /* Characteristic Declaration*/
|
||||
|
||||
#define GATT_UUID_CHAR_EXT_PROP 0x2900 /* Characteristic Extended Properties */
|
||||
#define GATT_UUID_CHAR_EXT_PROP 0x2900 /* Characteristic Extended Properties */
|
||||
#define GATT_UUID_CHAR_DESCRIPTION 0x2901 /* Characteristic User Description*/
|
||||
#define GATT_UUID_CHAR_CLIENT_CONFIG 0x2902 /* Client Characteristic Configuration */
|
||||
#define GATT_UUID_CHAR_SRVR_CONFIG 0x2903 /* Server Characteristic Configuration */
|
||||
|
||||
Executable → Regular
+2
-3
@@ -332,7 +332,7 @@
|
||||
#define HCI_BLE_LTK_REQ_REPLY (0x001A | HCI_GRP_BLE_CMDS)
|
||||
#define HCI_BLE_LTK_REQ_NEG_REPLY (0x001B | HCI_GRP_BLE_CMDS)
|
||||
#define HCI_BLE_READ_SUPPORTED_STATES (0x001C | HCI_GRP_BLE_CMDS)
|
||||
/*0x001D, 0x001E and 0x001F are reserved*/
|
||||
/*0x001D, 0x001E and 0x001F are reserved*/
|
||||
#define HCI_BLE_RECEIVER_TEST (0x001D | HCI_GRP_BLE_CMDS)
|
||||
#define HCI_BLE_TRANSMITTER_TEST (0x001E | HCI_GRP_BLE_CMDS)
|
||||
/* BLE TEST COMMANDS */
|
||||
@@ -1333,8 +1333,7 @@
|
||||
|
||||
|
||||
/* Define the extended flow specification fields used by AMP */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 id;
|
||||
UINT8 stype;
|
||||
UINT16 max_sdu_size;
|
||||
|
||||
Executable → Regular
+140
-140
@@ -29,7 +29,7 @@ void bte_main_lpm_allow_bt_device_sleep(void);
|
||||
/* Message by message.... */
|
||||
|
||||
BOOLEAN btsnd_hcic_inquiry(const LAP inq_lap, UINT8 duration,
|
||||
UINT8 response_cnt);
|
||||
UINT8 response_cnt);
|
||||
|
||||
#define HCIC_PARAM_SIZE_INQUIRY 5
|
||||
|
||||
@@ -37,17 +37,17 @@ BOOLEAN btsnd_hcic_inquiry(const LAP inq_lap, UINT8 duration,
|
||||
#define HCIC_INQ_INQ_LAP_OFF 0
|
||||
#define HCIC_INQ_DUR_OFF 3
|
||||
#define HCIC_INQ_RSP_CNT_OFF 4
|
||||
/* Inquiry */
|
||||
/* Inquiry */
|
||||
|
||||
/* Inquiry Cancel */
|
||||
/* Inquiry Cancel */
|
||||
BOOLEAN btsnd_hcic_inq_cancel(void);
|
||||
|
||||
#define HCIC_PARAM_SIZE_INQ_CANCEL 0
|
||||
|
||||
/* Periodic Inquiry Mode */
|
||||
/* Periodic Inquiry Mode */
|
||||
BOOLEAN btsnd_hcic_per_inq_mode(UINT16 max_period, UINT16 min_period,
|
||||
const LAP inq_lap, UINT8 duration,
|
||||
UINT8 response_cnt);
|
||||
const LAP inq_lap, UINT8 duration,
|
||||
UINT8 response_cnt);
|
||||
|
||||
#define HCIC_PARAM_SIZE_PER_INQ_MODE 9
|
||||
|
||||
@@ -56,18 +56,18 @@ BOOLEAN btsnd_hcic_per_inq_mode(UINT16 max_period, UINT16 min_period,
|
||||
#define HCI_PER_INQ_INQ_LAP_OFF 4
|
||||
#define HCI_PER_INQ_DURATION_OFF 7
|
||||
#define HCI_PER_INQ_RSP_CNT_OFF 8
|
||||
/* Periodic Inquiry Mode */
|
||||
/* Periodic Inquiry Mode */
|
||||
|
||||
/* Exit Periodic Inquiry Mode */
|
||||
/* Exit Periodic Inquiry Mode */
|
||||
BOOLEAN btsnd_hcic_exit_per_inq(void);
|
||||
|
||||
#define HCIC_PARAM_SIZE_EXIT_PER_INQ 0
|
||||
/* Create Connection */
|
||||
/* Create Connection */
|
||||
BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types,
|
||||
UINT8 page_scan_rep_mode,
|
||||
UINT8 page_scan_mode,
|
||||
UINT16 clock_offset,
|
||||
UINT8 allow_switch);
|
||||
UINT8 page_scan_rep_mode,
|
||||
UINT8 page_scan_mode,
|
||||
UINT16 clock_offset,
|
||||
UINT8 allow_switch);
|
||||
|
||||
#define HCIC_PARAM_SIZE_CREATE_CONN 13
|
||||
|
||||
@@ -77,19 +77,19 @@ BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types,
|
||||
#define HCIC_CR_CONN_PAGE_SCAN_MODE_OFF 9
|
||||
#define HCIC_CR_CONN_CLK_OFF_OFF 10
|
||||
#define HCIC_CR_CONN_ALLOW_SWITCH_OFF 12
|
||||
/* Create Connection */
|
||||
/* Create Connection */
|
||||
|
||||
/* Disconnect */
|
||||
/* Disconnect */
|
||||
BOOLEAN btsnd_hcic_disconnect(UINT16 handle, UINT8 reason);
|
||||
|
||||
#define HCIC_PARAM_SIZE_DISCONNECT 3
|
||||
|
||||
#define HCI_DISC_HANDLE_OFF 0
|
||||
#define HCI_DISC_REASON_OFF 2
|
||||
/* Disconnect */
|
||||
/* Disconnect */
|
||||
|
||||
#if BTM_SCO_INCLUDED == TRUE
|
||||
/* Add SCO Connection */
|
||||
/* Add SCO Connection */
|
||||
BOOLEAN btsnd_hcic_add_SCO_conn (UINT16 handle, UINT16 packet_types);
|
||||
#endif /* BTM_SCO_INCLUDED */
|
||||
|
||||
@@ -97,80 +97,80 @@ BOOLEAN btsnd_hcic_add_SCO_conn (UINT16 handle, UINT16 packet_types);
|
||||
|
||||
#define HCI_ADD_SCO_HANDLE_OFF 0
|
||||
#define HCI_ADD_SCO_PACKET_TYPES_OFF 2
|
||||
/* Add SCO Connection */
|
||||
/* Add SCO Connection */
|
||||
|
||||
/* Create Connection Cancel */
|
||||
/* Create Connection Cancel */
|
||||
BOOLEAN btsnd_hcic_create_conn_cancel(BD_ADDR dest);
|
||||
|
||||
#define HCIC_PARAM_SIZE_CREATE_CONN_CANCEL 6
|
||||
|
||||
#define HCIC_CR_CONN_CANCEL_BD_ADDR_OFF 0
|
||||
/* Create Connection Cancel */
|
||||
/* Create Connection Cancel */
|
||||
|
||||
/* Accept Connection Request */
|
||||
/* Accept Connection Request */
|
||||
BOOLEAN btsnd_hcic_accept_conn (BD_ADDR bd_addr, UINT8 role);
|
||||
|
||||
#define HCIC_PARAM_SIZE_ACCEPT_CONN 7
|
||||
|
||||
#define HCI_ACC_CONN_BD_ADDR_OFF 0
|
||||
#define HCI_ACC_CONN_ROLE_OFF 6
|
||||
/* Accept Connection Request */
|
||||
/* Accept Connection Request */
|
||||
|
||||
/* Reject Connection Request */
|
||||
/* Reject Connection Request */
|
||||
BOOLEAN btsnd_hcic_reject_conn (BD_ADDR bd_addr, UINT8 reason);
|
||||
|
||||
#define HCIC_PARAM_SIZE_REJECT_CONN 7
|
||||
|
||||
#define HCI_REJ_CONN_BD_ADDR_OFF 0
|
||||
#define HCI_REJ_CONN_REASON_OFF 6
|
||||
/* Reject Connection Request */
|
||||
/* Reject Connection Request */
|
||||
|
||||
/* Link Key Request Reply */
|
||||
/* Link Key Request Reply */
|
||||
BOOLEAN btsnd_hcic_link_key_req_reply (BD_ADDR bd_addr,
|
||||
LINK_KEY link_key);
|
||||
LINK_KEY link_key);
|
||||
|
||||
#define HCIC_PARAM_SIZE_LINK_KEY_REQ_REPLY 22
|
||||
|
||||
#define HCI_LINK_KEY_REPLY_BD_ADDR_OFF 0
|
||||
#define HCI_LINK_KEY_REPLY_LINK_KEY_OFF 6
|
||||
/* Link Key Request Reply */
|
||||
/* Link Key Request Reply */
|
||||
|
||||
/* Link Key Request Neg Reply */
|
||||
/* Link Key Request Neg Reply */
|
||||
BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr);
|
||||
|
||||
#define HCIC_PARAM_SIZE_LINK_KEY_NEG_REPLY 6
|
||||
|
||||
#define HCI_LINK_KEY_NEG_REP_BD_ADR_OFF 0
|
||||
/* Link Key Request Neg Reply */
|
||||
/* Link Key Request Neg Reply */
|
||||
|
||||
/* PIN Code Request Reply */
|
||||
/* PIN Code Request Reply */
|
||||
BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr,
|
||||
UINT8 pin_code_len,
|
||||
PIN_CODE pin_code);
|
||||
UINT8 pin_code_len,
|
||||
PIN_CODE pin_code);
|
||||
|
||||
#define HCIC_PARAM_SIZE_PIN_CODE_REQ_REPLY 23
|
||||
|
||||
#define HCI_PIN_CODE_REPLY_BD_ADDR_OFF 0
|
||||
#define HCI_PIN_CODE_REPLY_PIN_LEN_OFF 6
|
||||
#define HCI_PIN_CODE_REPLY_PIN_CODE_OFF 7
|
||||
/* PIN Code Request Reply */
|
||||
/* PIN Code Request Reply */
|
||||
|
||||
/* Link Key Request Neg Reply */
|
||||
/* Link Key Request Neg Reply */
|
||||
BOOLEAN btsnd_hcic_pin_code_neg_reply (BD_ADDR bd_addr);
|
||||
|
||||
#define HCIC_PARAM_SIZE_PIN_CODE_NEG_REPLY 6
|
||||
|
||||
#define HCI_PIN_CODE_NEG_REP_BD_ADR_OFF 0
|
||||
/* Link Key Request Neg Reply */
|
||||
/* Link Key Request Neg Reply */
|
||||
|
||||
/* Change Connection Type */
|
||||
/* Change Connection Type */
|
||||
BOOLEAN btsnd_hcic_change_conn_type (UINT16 handle, UINT16 packet_types);
|
||||
|
||||
#define HCIC_PARAM_SIZE_CHANGE_CONN_TYPE 4
|
||||
|
||||
#define HCI_CHNG_PKT_TYPE_HANDLE_OFF 0
|
||||
#define HCI_CHNG_PKT_TYPE_PKT_TYPE_OFF 2
|
||||
/* Change Connection Type */
|
||||
/* Change Connection Type */
|
||||
|
||||
#define HCIC_PARAM_SIZE_CMD_HANDLE 2
|
||||
|
||||
@@ -178,20 +178,20 @@ BOOLEAN btsnd_hcic_change_conn_type (UINT16 handle, UINT16 packet_types);
|
||||
|
||||
BOOLEAN btsnd_hcic_auth_request (UINT16 handle); /* Authentication Request */
|
||||
|
||||
/* Set Connection Encryption */
|
||||
/* Set Connection Encryption */
|
||||
BOOLEAN btsnd_hcic_set_conn_encrypt (UINT16 handle, BOOLEAN enable);
|
||||
#define HCIC_PARAM_SIZE_SET_CONN_ENCRYPT 3
|
||||
|
||||
|
||||
#define HCI_SET_ENCRYPT_HANDLE_OFF 0
|
||||
#define HCI_SET_ENCRYPT_ENABLE_OFF 2
|
||||
/* Set Connection Encryption */
|
||||
/* Set Connection Encryption */
|
||||
|
||||
/* Remote Name Request */
|
||||
/* Remote Name Request */
|
||||
BOOLEAN btsnd_hcic_rmt_name_req (BD_ADDR bd_addr,
|
||||
UINT8 page_scan_rep_mode,
|
||||
UINT8 page_scan_mode,
|
||||
UINT16 clock_offset);
|
||||
UINT8 page_scan_rep_mode,
|
||||
UINT8 page_scan_mode,
|
||||
UINT16 clock_offset);
|
||||
|
||||
#define HCIC_PARAM_SIZE_RMT_NAME_REQ 10
|
||||
|
||||
@@ -199,26 +199,26 @@ BOOLEAN btsnd_hcic_rmt_name_req (BD_ADDR bd_addr,
|
||||
#define HCI_RMT_NAME_REP_MODE_OFF 6
|
||||
#define HCI_RMT_NAME_PAGE_SCAN_MODE_OFF 7
|
||||
#define HCI_RMT_NAME_CLK_OFF_OFF 8
|
||||
/* Remote Name Request */
|
||||
/* Remote Name Request */
|
||||
|
||||
/* Remote Name Request Cancel */
|
||||
/* Remote Name Request Cancel */
|
||||
BOOLEAN btsnd_hcic_rmt_name_req_cancel(BD_ADDR bd_addr);
|
||||
|
||||
#define HCIC_PARAM_SIZE_RMT_NAME_REQ_CANCEL 6
|
||||
|
||||
#define HCI_RMT_NAME_CANCEL_BD_ADDR_OFF 0
|
||||
/* Remote Name Request Cancel */
|
||||
/* Remote Name Request Cancel */
|
||||
|
||||
BOOLEAN btsnd_hcic_rmt_features_req(UINT16 handle); /* Remote Features Request */
|
||||
|
||||
/* Remote Extended Features */
|
||||
/* Remote Extended Features */
|
||||
BOOLEAN btsnd_hcic_rmt_ext_features(UINT16 handle, UINT8 page_num);
|
||||
|
||||
#define HCIC_PARAM_SIZE_RMT_EXT_FEATURES 3
|
||||
|
||||
#define HCI_RMT_EXT_FEATURES_HANDLE_OFF 0
|
||||
#define HCI_RMT_EXT_FEATURES_PAGE_NUM_OFF 2
|
||||
/* Remote Extended Features */
|
||||
/* Remote Extended Features */
|
||||
|
||||
|
||||
BOOLEAN btsnd_hcic_rmt_ver_req(UINT16 handle); /* Remote Version Info Request */
|
||||
@@ -226,10 +226,10 @@ BOOLEAN btsnd_hcic_read_rmt_clk_offset(UINT16 handle); /* Remote Clock Offset
|
||||
BOOLEAN btsnd_hcic_read_lmp_handle(UINT16 handle); /* Remote LMP Handle */
|
||||
|
||||
BOOLEAN btsnd_hcic_setup_esco_conn (UINT16 handle,
|
||||
UINT32 tx_bw, UINT32 rx_bw,
|
||||
UINT16 max_latency, UINT16 voice,
|
||||
UINT8 retrans_effort,
|
||||
UINT16 packet_types);
|
||||
UINT32 tx_bw, UINT32 rx_bw,
|
||||
UINT16 max_latency, UINT16 voice,
|
||||
UINT8 retrans_effort,
|
||||
UINT16 packet_types);
|
||||
#define HCIC_PARAM_SIZE_SETUP_ESCO 17
|
||||
|
||||
#define HCI_SETUP_ESCO_HANDLE_OFF 0
|
||||
@@ -242,11 +242,11 @@ BOOLEAN btsnd_hcic_setup_esco_conn (UINT16 handle,
|
||||
|
||||
|
||||
BOOLEAN btsnd_hcic_accept_esco_conn (BD_ADDR bd_addr,
|
||||
UINT32 tx_bw, UINT32 rx_bw,
|
||||
UINT16 max_latency,
|
||||
UINT16 content_fmt,
|
||||
UINT8 retrans_effort,
|
||||
UINT16 packet_types);
|
||||
UINT32 tx_bw, UINT32 rx_bw,
|
||||
UINT16 max_latency,
|
||||
UINT16 content_fmt,
|
||||
UINT8 retrans_effort,
|
||||
UINT16 packet_types);
|
||||
#define HCIC_PARAM_SIZE_ACCEPT_ESCO 21
|
||||
|
||||
#define HCI_ACCEPT_ESCO_BDADDR_OFF 0
|
||||
@@ -266,21 +266,21 @@ BOOLEAN btsnd_hcic_reject_esco_conn (BD_ADDR bd_addr, UINT8 reason);
|
||||
|
||||
/* Hold Mode */
|
||||
BOOLEAN btsnd_hcic_hold_mode(UINT16 handle, UINT16 max_hold_period,
|
||||
UINT16 min_hold_period);
|
||||
UINT16 min_hold_period);
|
||||
|
||||
#define HCIC_PARAM_SIZE_HOLD_MODE 6
|
||||
|
||||
#define HCI_HOLD_MODE_HANDLE_OFF 0
|
||||
#define HCI_HOLD_MODE_MAX_PER_OFF 2
|
||||
#define HCI_HOLD_MODE_MIN_PER_OFF 4
|
||||
/* Hold Mode */
|
||||
/* Hold Mode */
|
||||
|
||||
/* Sniff Mode */
|
||||
/* Sniff Mode */
|
||||
BOOLEAN btsnd_hcic_sniff_mode(UINT16 handle,
|
||||
UINT16 max_sniff_period,
|
||||
UINT16 min_sniff_period,
|
||||
UINT16 sniff_attempt,
|
||||
UINT16 sniff_timeout);
|
||||
UINT16 max_sniff_period,
|
||||
UINT16 min_sniff_period,
|
||||
UINT16 sniff_attempt,
|
||||
UINT16 sniff_timeout);
|
||||
|
||||
#define HCIC_PARAM_SIZE_SNIFF_MODE 10
|
||||
|
||||
@@ -290,29 +290,29 @@ BOOLEAN btsnd_hcic_sniff_mode(UINT16 handle,
|
||||
#define HCI_SNIFF_MODE_MIN_PER_OFF 4
|
||||
#define HCI_SNIFF_MODE_ATTEMPT_OFF 6
|
||||
#define HCI_SNIFF_MODE_TIMEOUT_OFF 8
|
||||
/* Sniff Mode */
|
||||
/* Sniff Mode */
|
||||
|
||||
BOOLEAN btsnd_hcic_exit_sniff_mode(UINT16 handle); /* Exit Sniff Mode */
|
||||
|
||||
/* Park Mode */
|
||||
/* Park Mode */
|
||||
BOOLEAN btsnd_hcic_park_mode (UINT16 handle,
|
||||
UINT16 beacon_max_interval,
|
||||
UINT16 beacon_min_interval);
|
||||
UINT16 beacon_max_interval,
|
||||
UINT16 beacon_min_interval);
|
||||
|
||||
#define HCIC_PARAM_SIZE_PARK_MODE 6
|
||||
|
||||
#define HCI_PARK_MODE_HANDLE_OFF 0
|
||||
#define HCI_PARK_MODE_MAX_PER_OFF 2
|
||||
#define HCI_PARK_MODE_MIN_PER_OFF 4
|
||||
/* Park Mode */
|
||||
/* Park Mode */
|
||||
|
||||
BOOLEAN btsnd_hcic_exit_park_mode(UINT16 handle); /* Exit Park Mode */
|
||||
|
||||
/* QoS Setup */
|
||||
/* QoS Setup */
|
||||
BOOLEAN btsnd_hcic_qos_setup (UINT16 handle, UINT8 flags,
|
||||
UINT8 service_type,
|
||||
UINT32 token_rate, UINT32 peak,
|
||||
UINT32 latency, UINT32 delay_var);
|
||||
UINT8 service_type,
|
||||
UINT32 token_rate, UINT32 peak,
|
||||
UINT32 latency, UINT32 delay_var);
|
||||
|
||||
#define HCIC_PARAM_SIZE_QOS_SETUP 20
|
||||
|
||||
@@ -323,42 +323,42 @@ BOOLEAN btsnd_hcic_qos_setup (UINT16 handle, UINT8 flags,
|
||||
#define HCI_QOS_PEAK_BANDWIDTH_OFF 8
|
||||
#define HCI_QOS_LATENCY_OFF 12
|
||||
#define HCI_QOS_DELAY_VAR_OFF 16
|
||||
/* QoS Setup */
|
||||
/* QoS Setup */
|
||||
|
||||
/* Switch Role Request */
|
||||
/* Switch Role Request */
|
||||
BOOLEAN btsnd_hcic_switch_role (BD_ADDR bd_addr, UINT8 role);
|
||||
|
||||
#define HCIC_PARAM_SIZE_SWITCH_ROLE 7
|
||||
|
||||
#define HCI_SWITCH_BD_ADDR_OFF 0
|
||||
#define HCI_SWITCH_ROLE_OFF 6
|
||||
/* Switch Role Request */
|
||||
/* Switch Role Request */
|
||||
|
||||
/* Write Policy Settings */
|
||||
/* Write Policy Settings */
|
||||
BOOLEAN btsnd_hcic_write_policy_set(UINT16 handle, UINT16 settings);
|
||||
|
||||
#define HCIC_PARAM_SIZE_WRITE_POLICY_SET 4
|
||||
|
||||
#define HCI_WRITE_POLICY_HANDLE_OFF 0
|
||||
#define HCI_WRITE_POLICY_SETTINGS_OFF 2
|
||||
/* Write Policy Settings */
|
||||
/* Write Policy Settings */
|
||||
|
||||
/* Write Default Policy Settings */
|
||||
/* Write Default Policy Settings */
|
||||
BOOLEAN btsnd_hcic_write_def_policy_set(UINT16 settings);
|
||||
|
||||
#define HCIC_PARAM_SIZE_WRITE_DEF_POLICY_SET 2
|
||||
|
||||
#define HCI_WRITE_DEF_POLICY_SETTINGS_OFF 0
|
||||
/* Write Default Policy Settings */
|
||||
/* Write Default Policy Settings */
|
||||
|
||||
/******************************************
|
||||
** Lisbon Features
|
||||
*******************************************/
|
||||
#if BTM_SSR_INCLUDED == TRUE
|
||||
/* Sniff Subrating */
|
||||
/* Sniff Subrating */
|
||||
BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
|
||||
UINT16 min_remote_lat,
|
||||
UINT16 min_local_lat);
|
||||
UINT16 min_remote_lat,
|
||||
UINT16 min_local_lat);
|
||||
|
||||
#define HCIC_PARAM_SIZE_SNIFF_SUB_RATE 8
|
||||
|
||||
@@ -366,7 +366,7 @@ BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
|
||||
#define HCI_SNIFF_SUB_RATE_MAX_LAT_OFF 2
|
||||
#define HCI_SNIFF_SUB_RATE_MIN_REM_LAT_OFF 4
|
||||
#define HCI_SNIFF_SUB_RATE_MIN_LOC_LAT_OFF 6
|
||||
/* Sniff Subrating */
|
||||
/* Sniff Subrating */
|
||||
|
||||
#else /* BTM_SSR_INCLUDED == FALSE */
|
||||
|
||||
@@ -374,16 +374,16 @@ BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
|
||||
|
||||
#endif /* BTM_SSR_INCLUDED */
|
||||
|
||||
/* Extended Inquiry Response */
|
||||
/* Extended Inquiry Response */
|
||||
void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req);
|
||||
|
||||
#define HCIC_PARAM_SIZE_EXT_INQ_RESP 241
|
||||
|
||||
#define HCIC_EXT_INQ_RESP_FEC_OFF 0
|
||||
#define HCIC_EXT_INQ_RESP_RESPONSE 1
|
||||
/* IO Capabilities Response */
|
||||
/* IO Capabilities Response */
|
||||
BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capability,
|
||||
UINT8 oob_present, UINT8 auth_req);
|
||||
UINT8 oob_present, UINT8 auth_req);
|
||||
|
||||
#define HCIC_PARAM_SIZE_IO_CAP_RESP 9
|
||||
|
||||
@@ -392,7 +392,7 @@ BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capability,
|
||||
#define HCI_IO_CAP_OOB_DATA_OFF 7
|
||||
#define HCI_IO_CAP_AUTH_REQ_OFF 8
|
||||
|
||||
/* IO Capabilities Req Neg Reply */
|
||||
/* IO Capabilities Req Neg Reply */
|
||||
BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 err_code);
|
||||
|
||||
#define HCIC_PARAM_SIZE_IO_CAP_NEG_REPLY 7
|
||||
@@ -400,7 +400,7 @@ BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 err_code);
|
||||
#define HCI_IO_CAP_NR_BD_ADDR_OFF 0
|
||||
#define HCI_IO_CAP_NR_ERR_CODE 6
|
||||
|
||||
/* Read Local OOB Data */
|
||||
/* Read Local OOB Data */
|
||||
BOOLEAN btsnd_hcic_read_local_oob_data (void);
|
||||
|
||||
#define HCIC_PARAM_SIZE_R_LOCAL_OOB 0
|
||||
@@ -427,9 +427,9 @@ BOOLEAN btsnd_hcic_user_passkey_neg_reply (BD_ADDR bd_addr);
|
||||
|
||||
#define HCI_USER_PASSKEY_NEG_BD_ADDR_OFF 0
|
||||
|
||||
/* Remote OOB Data Request Reply */
|
||||
/* Remote OOB Data Request Reply */
|
||||
BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c,
|
||||
UINT8 *p_r);
|
||||
UINT8 *p_r);
|
||||
|
||||
#define HCIC_PARAM_SIZE_REM_OOB_REPLY 38
|
||||
|
||||
@@ -437,19 +437,19 @@ BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c,
|
||||
#define HCI_REM_OOB_DATA_C_OFF 6
|
||||
#define HCI_REM_OOB_DATA_R_OFF 22
|
||||
|
||||
/* Remote OOB Data Request Negative Reply */
|
||||
/* Remote OOB Data Request Negative Reply */
|
||||
BOOLEAN btsnd_hcic_rem_oob_neg_reply (BD_ADDR bd_addr);
|
||||
|
||||
#define HCIC_PARAM_SIZE_REM_OOB_NEG_REPLY 6
|
||||
|
||||
#define HCI_REM_OOB_DATA_NEG_BD_ADDR_OFF 0
|
||||
|
||||
/* Read Tx Power Level */
|
||||
/* Read Tx Power Level */
|
||||
BOOLEAN btsnd_hcic_read_inq_tx_power (void);
|
||||
|
||||
#define HCIC_PARAM_SIZE_R_TX_POWER 0
|
||||
|
||||
/* Read Default Erroneous Data Reporting */
|
||||
/* Read Default Erroneous Data Reporting */
|
||||
BOOLEAN btsnd_hcic_read_default_erroneous_data_rpt (void);
|
||||
|
||||
#define HCIC_PARAM_SIZE_R_ERR_DATA_RPT 0
|
||||
@@ -470,37 +470,37 @@ BOOLEAN btsnd_hcic_send_keypress_notif (BD_ADDR bd_addr, UINT8 notif);
|
||||
|
||||
/**** end of Simple Pairing Commands ****/
|
||||
|
||||
/* Store Current Settings */
|
||||
/* Store Current Settings */
|
||||
#define MAX_FILT_COND (sizeof (BD_ADDR) + 1)
|
||||
|
||||
BOOLEAN btsnd_hcic_set_event_filter(UINT8 filt_type,
|
||||
UINT8 filt_cond_type,
|
||||
UINT8 *filt_cond,
|
||||
UINT8 filt_cond_len);
|
||||
UINT8 filt_cond_type,
|
||||
UINT8 *filt_cond,
|
||||
UINT8 filt_cond_len);
|
||||
|
||||
#define HCIC_PARAM_SIZE_SET_EVT_FILTER 9
|
||||
|
||||
#define HCI_FILT_COND_FILT_TYPE_OFF 0
|
||||
#define HCI_FILT_COND_COND_TYPE_OFF 1
|
||||
#define HCI_FILT_COND_FILT_OFF 2
|
||||
/* Set Event Filter */
|
||||
/* Set Event Filter */
|
||||
|
||||
/* Delete Stored Key */
|
||||
/* Delete Stored Key */
|
||||
BOOLEAN btsnd_hcic_delete_stored_key (BD_ADDR bd_addr, BOOLEAN delete_all_flag);
|
||||
|
||||
#define HCIC_PARAM_SIZE_DELETE_STORED_KEY 7
|
||||
|
||||
#define HCI_DELETE_KEY_BD_ADDR_OFF 0
|
||||
#define HCI_DELETE_KEY_ALL_FLAG_OFF 6
|
||||
/* Delete Stored Key */
|
||||
/* Delete Stored Key */
|
||||
|
||||
/* Change Local Name */
|
||||
/* Change Local Name */
|
||||
BOOLEAN btsnd_hcic_change_name(BD_NAME name);
|
||||
|
||||
#define HCIC_PARAM_SIZE_CHANGE_NAME BD_NAME_LEN
|
||||
|
||||
#define HCI_CHANGE_NAME_NAME_OFF 0
|
||||
/* Change Local Name */
|
||||
/* Change Local Name */
|
||||
|
||||
|
||||
#define HCIC_PARAM_SIZE_READ_CMD 0
|
||||
@@ -525,22 +525,22 @@ BOOLEAN btsnd_hcic_read_name (void); /* Read Local N
|
||||
BOOLEAN btsnd_hcic_write_page_tout(UINT16 timeout); /* Write Page Timout */
|
||||
BOOLEAN btsnd_hcic_write_scan_enable(UINT8 flag); /* Write Scan Enable */
|
||||
BOOLEAN btsnd_hcic_write_pagescan_cfg(UINT16 interval,
|
||||
UINT16 window); /* Write Page Scan Activity */
|
||||
UINT16 window); /* Write Page Scan Activity */
|
||||
|
||||
#define HCIC_PARAM_SIZE_WRITE_PAGESCAN_CFG 4
|
||||
|
||||
#define HCI_SCAN_CFG_INTERVAL_OFF 0
|
||||
#define HCI_SCAN_CFG_WINDOW_OFF 2
|
||||
/* Write Page Scan Activity */
|
||||
/* Write Page Scan Activity */
|
||||
|
||||
/* Write Inquiry Scan Activity */
|
||||
/* Write Inquiry Scan Activity */
|
||||
BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window);
|
||||
|
||||
#define HCIC_PARAM_SIZE_WRITE_INQSCAN_CFG 4
|
||||
|
||||
#define HCI_SCAN_CFG_INTERVAL_OFF 0
|
||||
#define HCI_SCAN_CFG_WINDOW_OFF 2
|
||||
/* Write Inquiry Scan Activity */
|
||||
/* Write Inquiry Scan Activity */
|
||||
|
||||
BOOLEAN btsnd_hcic_write_auth_enable(UINT8 flag); /* Write Authentication Enable */
|
||||
BOOLEAN btsnd_hcic_write_dev_class(DEV_CLASS dev); /* Write Class of Device */
|
||||
@@ -553,7 +553,7 @@ BOOLEAN btsnd_hcic_write_voice_settings(UINT16 flags); /* Write Voice
|
||||
#define HCI_HOST_FLOW_CTRL_BOTH_ON 3
|
||||
|
||||
BOOLEAN btsnd_hcic_write_auto_flush_tout(UINT16 handle,
|
||||
UINT16 timeout); /* Write Retransmit Timout */
|
||||
UINT16 timeout); /* Write Retransmit Timout */
|
||||
|
||||
#define HCIC_PARAM_SIZE_WRITE_AUTO_FLUSH_TOUT 4
|
||||
|
||||
@@ -572,8 +572,8 @@ BOOLEAN btsnd_hcic_read_tx_power(UINT16 handle, UINT8 type); /* Read Tx Powe
|
||||
#define HCI_READ_MAXIMUM 0x01
|
||||
|
||||
BOOLEAN btsnd_hcic_host_num_xmitted_pkts (UINT8 num_handles,
|
||||
UINT16 *handle,
|
||||
UINT16 *num_pkts); /* Set Host Buffer Size */
|
||||
UINT16 *handle,
|
||||
UINT16 *num_pkts); /* Set Host Buffer Size */
|
||||
|
||||
#define HCIC_PARAM_SIZE_NUM_PKTS_DONE_SIZE sizeof(btmsg_hcic_num_pkts_done_t)
|
||||
|
||||
@@ -583,23 +583,23 @@ BOOLEAN btsnd_hcic_host_num_xmitted_pkts (UINT8 num_handles,
|
||||
#define HCI_PKTS_DONE_HANDLE_OFF 1
|
||||
#define HCI_PKTS_DONE_NUM_PKTS_OFF 3
|
||||
|
||||
/* Write Link Supervision Timeout */
|
||||
/* Write Link Supervision Timeout */
|
||||
BOOLEAN btsnd_hcic_write_link_super_tout(UINT8 local_controller_id, UINT16 handle, UINT16 timeout);
|
||||
|
||||
#define HCIC_PARAM_SIZE_WRITE_LINK_SUPER_TOUT 4
|
||||
|
||||
#define HCI_LINK_SUPER_TOUT_HANDLE_OFF 0
|
||||
#define HCI_LINK_SUPER_TOUT_TOUT_OFF 2
|
||||
/* Write Link Supervision Timeout */
|
||||
/* Write Link Supervision Timeout */
|
||||
|
||||
BOOLEAN btsnd_hcic_write_cur_iac_lap (UINT8 num_cur_iac,
|
||||
LAP * const iac_lap); /* Write Current IAC LAP */
|
||||
LAP *const iac_lap); /* Write Current IAC LAP */
|
||||
|
||||
#define MAX_IAC_LAPS 0x40
|
||||
|
||||
#define HCI_WRITE_IAC_LAP_NUM_OFF 0
|
||||
#define HCI_WRITE_IAC_LAP_LAP_OFF 1
|
||||
/* Write Current IAC LAP */
|
||||
/* Write Current IAC LAP */
|
||||
|
||||
BOOLEAN btsnd_hcic_get_link_quality (UINT16 handle); /* Get Link Quality */
|
||||
BOOLEAN btsnd_hcic_read_rssi (UINT16 handle); /* Read RSSI */
|
||||
@@ -631,8 +631,8 @@ BOOLEAN btsnd_hcic_write_inquiry_mode(UINT8 type); /* Write Inquiry
|
||||
#define HCID_GET_SCO_LEN(p) (*((UINT8 *)((p) + 1) + p->offset + 2))
|
||||
|
||||
void btsnd_hcic_vendor_spec_cmd (void *buffer, UINT16 opcode,
|
||||
UINT8 len, UINT8 *p_data,
|
||||
void *p_cmd_cplt_cback);
|
||||
UINT8 len, UINT8 *p_data,
|
||||
void *p_cmd_cplt_cback);
|
||||
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
/********************************************************************************
|
||||
@@ -694,9 +694,9 @@ BOOLEAN btsnd_hcic_ble_set_local_used_feat (UINT8 feat_set[8]);
|
||||
BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_addr);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
|
||||
UINT8 adv_type, UINT8 addr_type_own,
|
||||
UINT8 addr_type_dir, BD_ADDR direct_bda,
|
||||
UINT8 channel_map, UINT8 adv_filter_policy);
|
||||
UINT8 adv_type, UINT8 addr_type_own,
|
||||
UINT8 addr_type_dir, BD_ADDR direct_bda,
|
||||
UINT8 channel_map, UINT8 adv_filter_policy);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_read_adv_chnl_tx_power (void);
|
||||
|
||||
@@ -707,15 +707,15 @@ BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 *p_scan_rsp);
|
||||
BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
|
||||
UINT16 scan_int, UINT16 scan_win,
|
||||
UINT8 addr_type, UINT8 scan_filter_policy);
|
||||
UINT16 scan_int, UINT16 scan_win,
|
||||
UINT8 addr_type, UINT8 scan_filter_policy);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
|
||||
UINT8 init_filter_policy, UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 addr_type_own,
|
||||
UINT16 conn_int_min, UINT16 conn_int_max, UINT16 conn_latency, UINT16 conn_timeout,
|
||||
UINT16 min_ce_len, UINT16 max_ce_len);
|
||||
UINT8 init_filter_policy, UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 addr_type_own,
|
||||
UINT16 conn_int_min, UINT16 conn_int_max, UINT16 conn_latency, UINT16 conn_timeout,
|
||||
UINT16 min_ce_len, UINT16 max_ce_len);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_create_conn_cancel (void);
|
||||
|
||||
@@ -728,7 +728,7 @@ BOOLEAN btsnd_hcic_ble_add_white_list (UINT8 addr_type, BD_ADDR bda);
|
||||
BOOLEAN btsnd_hcic_ble_remove_from_white_list (UINT8 addr_type, BD_ADDR bda);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_upd_ll_conn_params (UINT16 handle, UINT16 conn_int_min, UINT16 conn_int_max,
|
||||
UINT16 conn_latency, UINT16 conn_timeout, UINT16 min_len, UINT16 max_len);
|
||||
UINT16 conn_latency, UINT16 conn_timeout, UINT16 min_len, UINT16 max_len);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_set_host_chnl_class (UINT8 chnl_map[HCIC_BLE_CHNL_MAP_SIZE]);
|
||||
|
||||
@@ -736,13 +736,13 @@ BOOLEAN btsnd_hcic_ble_read_chnl_map (UINT16 handle);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_read_remote_feat ( UINT16 handle);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_encrypt (UINT8* key, UINT8 key_len, UINT8* plain_text, UINT8 pt_len, void *p_cmd_cplt_cback);
|
||||
BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len, UINT8 *plain_text, UINT8 pt_len, void *p_cmd_cplt_cback);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle,
|
||||
UINT8 rand[HCIC_BLE_RAND_DI_SIZE],
|
||||
UINT16 ediv, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]);
|
||||
UINT8 rand[HCIC_BLE_RAND_DI_SIZE],
|
||||
UINT16 ediv, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_ltk_req_reply (UINT16 handle, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]);
|
||||
|
||||
@@ -757,16 +757,16 @@ BOOLEAN btsnd_hcic_ble_read_host_supported (void);
|
||||
BOOLEAN btsnd_hcic_ble_receiver_test(UINT8 rx_freq);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_transmitter_test(UINT8 tx_freq, UINT8 test_data_len,
|
||||
UINT8 payload);
|
||||
UINT8 payload);
|
||||
BOOLEAN btsnd_hcic_ble_test_end(void);
|
||||
|
||||
#if (defined BLE_LLT_INCLUDED) && (BLE_LLT_INCLUDED == TRUE)
|
||||
|
||||
#define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_REPLY 14
|
||||
BOOLEAN btsnd_hcic_ble_rc_param_req_reply(UINT16 handle,
|
||||
UINT16 conn_int_min, UINT16 conn_int_max,
|
||||
UINT16 conn_latency, UINT16 conn_timeout,
|
||||
UINT16 min_ce_len, UINT16 max_ce_len);
|
||||
UINT16 conn_int_min, UINT16 conn_int_max,
|
||||
UINT16 conn_latency, UINT16 conn_timeout,
|
||||
UINT16 min_ce_len, UINT16 max_ce_len);
|
||||
|
||||
#define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_NEG_REPLY 3
|
||||
BOOLEAN btsnd_hcic_ble_rc_param_req_neg_reply(UINT16 handle, UINT8 reason);
|
||||
@@ -774,23 +774,23 @@ BOOLEAN btsnd_hcic_ble_rc_param_req_neg_reply(UINT16 handle, UINT8 reason);
|
||||
#endif /* BLE_LLT_INCLUDED */
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_set_data_length(UINT16 conn_handle, UINT16 tx_octets,
|
||||
UINT16 tx_time);
|
||||
UINT16 tx_time);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_add_device_resolving_list (UINT8 addr_type_peer,
|
||||
BD_ADDR bda_peer,
|
||||
UINT8 irk_peer[HCIC_BLE_IRK_SIZE],
|
||||
UINT8 irk_local[HCIC_BLE_IRK_SIZE]);
|
||||
BD_ADDR bda_peer,
|
||||
UINT8 irk_peer[HCIC_BLE_IRK_SIZE],
|
||||
UINT8 irk_local[HCIC_BLE_IRK_SIZE]);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_rm_device_resolving_list (UINT8 addr_type_peer,
|
||||
BD_ADDR bda_peer);
|
||||
BD_ADDR bda_peer);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_clear_resolving_list (void);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_read_resolvable_addr_peer (UINT8 addr_type_peer,
|
||||
BD_ADDR bda_peer);
|
||||
BD_ADDR bda_peer);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_read_resolvable_addr_local (UINT8 addr_type_peer,
|
||||
BD_ADDR bda_peer);
|
||||
BD_ADDR bda_peer);
|
||||
|
||||
BOOLEAN btsnd_hcic_ble_set_addr_resolution_enable (UINT8 addr_resolution_enable);
|
||||
|
||||
@@ -801,7 +801,7 @@ BOOLEAN btsnd_hcic_ble_set_rand_priv_addr_timeout (UINT16 rpa_timout);
|
||||
BOOLEAN btsnd_hcic_read_authenticated_payload_tout(UINT16 handle);
|
||||
|
||||
BOOLEAN btsnd_hcic_write_authenticated_payload_tout(UINT16 handle,
|
||||
UINT16 timeout);
|
||||
UINT16 timeout);
|
||||
|
||||
#define HCIC_PARAM_SIZE_WRITE_AUTHENT_PAYLOAD_TOUT 4
|
||||
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2002-2012 Broadcom Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* This file contains HID protocol definitions
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef HIDDEFS_H
|
||||
#define HIDDEFS_H
|
||||
|
||||
#include "sdp_api.h"
|
||||
/*
|
||||
** tHID_STATUS: HID result codes, returned by HID and device and host functions.
|
||||
*/
|
||||
enum {
|
||||
HID_SUCCESS,
|
||||
HID_ERR_NOT_REGISTERED,
|
||||
HID_ERR_ALREADY_REGISTERED,
|
||||
HID_ERR_NO_RESOURCES,
|
||||
HID_ERR_NO_CONNECTION,
|
||||
HID_ERR_INVALID_PARAM,
|
||||
HID_ERR_UNSUPPORTED,
|
||||
HID_ERR_UNKNOWN_COMMAND,
|
||||
HID_ERR_CONGESTED,
|
||||
HID_ERR_CONN_IN_PROCESS,
|
||||
HID_ERR_ALREADY_CONN,
|
||||
HID_ERR_DISCONNECTING,
|
||||
HID_ERR_SET_CONNABLE_FAIL,
|
||||
/* Device specific error codes */
|
||||
HID_ERR_HOST_UNKNOWN,
|
||||
HID_ERR_L2CAP_FAILED,
|
||||
HID_ERR_AUTH_FAILED,
|
||||
HID_ERR_SDP_BUSY,
|
||||
HID_ERR_GATT,
|
||||
|
||||
HID_ERR_INVALID = 0xFF
|
||||
};
|
||||
|
||||
typedef UINT8 tHID_STATUS;
|
||||
|
||||
#define HID_L2CAP_CONN_FAIL (0x0100) /* Connection Attempt was made but failed */
|
||||
#define HID_L2CAP_REQ_FAIL (0x0200) /* L2CAP_ConnectReq API failed */
|
||||
#define HID_L2CAP_CFG_FAIL (0x0400) /* L2CAP Configuration was rejected by peer */
|
||||
|
||||
|
||||
|
||||
/* Define the HID transaction types
|
||||
*/
|
||||
#define HID_TRANS_HANDSHAKE (0)
|
||||
#define HID_TRANS_CONTROL (1)
|
||||
#define HID_TRANS_GET_REPORT (4)
|
||||
#define HID_TRANS_SET_REPORT (5)
|
||||
#define HID_TRANS_GET_PROTOCOL (6)
|
||||
#define HID_TRANS_SET_PROTOCOL (7)
|
||||
#define HID_TRANS_GET_IDLE (8)
|
||||
#define HID_TRANS_SET_IDLE (9)
|
||||
#define HID_TRANS_DATA (10)
|
||||
#define HID_TRANS_DATAC (11)
|
||||
|
||||
#define HID_GET_TRANS_FROM_HDR(x) ((x >> 4) & 0x0f)
|
||||
#define HID_GET_PARAM_FROM_HDR(x) (x & 0x0f)
|
||||
#define HID_BUILD_HDR(t,p) (UINT8)((t << 4) | (p & 0x0f))
|
||||
|
||||
|
||||
/* Parameters for Handshake
|
||||
*/
|
||||
#define HID_PAR_HANDSHAKE_RSP_SUCCESS (0)
|
||||
#define HID_PAR_HANDSHAKE_RSP_NOT_READY (1)
|
||||
#define HID_PAR_HANDSHAKE_RSP_ERR_INVALID_REP_ID (2)
|
||||
#define HID_PAR_HANDSHAKE_RSP_ERR_UNSUPPORTED_REQ (3)
|
||||
#define HID_PAR_HANDSHAKE_RSP_ERR_INVALID_PARAM (4)
|
||||
#define HID_PAR_HANDSHAKE_RSP_ERR_UNKNOWN (14)
|
||||
#define HID_PAR_HANDSHAKE_RSP_ERR_FATAL (15)
|
||||
|
||||
|
||||
/* Parameters for Control
|
||||
*/
|
||||
#define HID_PAR_CONTROL_NOP (0)
|
||||
#define HID_PAR_CONTROL_HARD_RESET (1)
|
||||
#define HID_PAR_CONTROL_SOFT_RESET (2)
|
||||
#define HID_PAR_CONTROL_SUSPEND (3)
|
||||
#define HID_PAR_CONTROL_EXIT_SUSPEND (4)
|
||||
#define HID_PAR_CONTROL_VIRTUAL_CABLE_UNPLUG (5)
|
||||
|
||||
|
||||
/* Different report types in get, set, data
|
||||
*/
|
||||
#define HID_PAR_REP_TYPE_MASK (0x03)
|
||||
#define HID_PAR_REP_TYPE_OTHER (0x00)
|
||||
#define HID_PAR_REP_TYPE_INPUT (0x01)
|
||||
#define HID_PAR_REP_TYPE_OUTPUT (0x02)
|
||||
#define HID_PAR_REP_TYPE_FEATURE (0x03)
|
||||
|
||||
/* Parameters for Get Report
|
||||
*/
|
||||
|
||||
/* Buffer size in two bytes after Report ID */
|
||||
#define HID_PAR_GET_REP_BUFSIZE_FOLLOWS (0x08)
|
||||
|
||||
|
||||
/* Parameters for Protocol Type
|
||||
*/
|
||||
#define HID_PAR_PROTOCOL_MASK (0x01)
|
||||
#define HID_PAR_PROTOCOL_REPORT (0x01)
|
||||
#define HID_PAR_PROTOCOL_BOOT_MODE (0x00)
|
||||
|
||||
#define HID_PAR_REP_TYPE_MASK (0x03)
|
||||
|
||||
/* Descriptor types in the SDP record
|
||||
*/
|
||||
#define HID_SDP_DESCRIPTOR_REPORT (0x22)
|
||||
#define HID_SDP_DESCRIPTOR_PHYSICAL (0x23)
|
||||
|
||||
typedef struct desc_info {
|
||||
UINT16 dl_len;
|
||||
UINT8 *dsc_list;
|
||||
} tHID_DEV_DSCP_INFO;
|
||||
|
||||
#define HID_SSR_PARAM_INVALID 0xffff
|
||||
|
||||
typedef struct sdp_info {
|
||||
char svc_name[HID_MAX_SVC_NAME_LEN]; /*Service Name */
|
||||
char svc_descr[HID_MAX_SVC_DESCR_LEN]; /*Service Description*/
|
||||
char prov_name[HID_MAX_PROV_NAME_LEN]; /*Provider Name.*/
|
||||
UINT16 rel_num; /*Release Number */
|
||||
UINT16 hpars_ver; /*HID Parser Version.*/
|
||||
UINT16 ssr_max_latency; /* HIDSSRHostMaxLatency value, if HID_SSR_PARAM_INVALID not used*/
|
||||
UINT16 ssr_min_tout; /* HIDSSRHostMinTimeout value, if HID_SSR_PARAM_INVALID not used* */
|
||||
UINT8 sub_class; /*Device Subclass.*/
|
||||
UINT8 ctry_code; /*Country Code.*/
|
||||
UINT16 sup_timeout;/* Supervisory Timeout */
|
||||
|
||||
tHID_DEV_DSCP_INFO dscp_info; /* Descriptor list and Report list to be set in the SDP record.
|
||||
This parameter is used if HID_DEV_USE_GLB_SDP_REC is set to FALSE.*/
|
||||
tSDP_DISC_REC *p_sdp_layer_rec;
|
||||
} tHID_DEV_SDP_INFO;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2002-2012 Broadcom Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef HIDH_API_H
|
||||
#define HIDH_API_H
|
||||
|
||||
#include "hiddefs.h"
|
||||
#include "sdp_api.h"
|
||||
|
||||
/*****************************************************************************
|
||||
** Constants
|
||||
*****************************************************************************/
|
||||
|
||||
enum {
|
||||
HID_SDP_NO_SERV_UUID = (SDP_ILLEGAL_PARAMETER + 1),
|
||||
HID_SDP_MANDATORY_MISSING
|
||||
};
|
||||
|
||||
/* Attributes mask values to be used in HID_HostAddDev API */
|
||||
#define HID_VIRTUAL_CABLE 0x0001
|
||||
#define HID_NORMALLY_CONNECTABLE 0x0002
|
||||
#define HID_RECONN_INIT 0x0004
|
||||
#define HID_SDP_DISABLE 0x0008
|
||||
#define HID_BATTERY_POWER 0x0010
|
||||
#define HID_REMOTE_WAKE 0x0020
|
||||
#define HID_SUP_TOUT_AVLBL 0x0040
|
||||
#define HID_SSR_MAX_LATENCY 0x0080
|
||||
#define HID_SSR_MIN_TOUT 0x0100
|
||||
|
||||
#define HID_SEC_REQUIRED 0x8000
|
||||
#define HID_ATTR_MASK_IGNORE 0
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
** Type Definitions
|
||||
*****************************************************************************/
|
||||
|
||||
typedef void (tHID_HOST_SDP_CALLBACK) (UINT16 result, UINT16 attr_mask,
|
||||
tHID_DEV_SDP_INFO *sdp_rec );
|
||||
|
||||
/* HID-HOST returns the events in the following table to the application via tHID_HOST_DEV_CALLBACK
|
||||
HID_HDEV_EVT_OPEN Connected to device with Interrupt and Control Channels in OPEN state.
|
||||
Data = NA
|
||||
HID_HDEV_EVT_CLOSE Connection with device is closed. Data=reason code.
|
||||
HID_HDEV_EVT_RETRYING Lost connection is being re-connected.
|
||||
Data=Retrial number
|
||||
HID_HDEV_EVT_IN_REPORT Device sent an input report Data=Report Type pdata= pointer to BT_HDR
|
||||
(GKI buffer having report data.)
|
||||
HID_HDEV_EVT_HANDSHAKE Device sent SET_REPORT Data=Result-code pdata=NA.
|
||||
HID_HDEV_EVT_VC_UNPLUG Device sent Virtual Unplug Data=NA. pdata=NA.
|
||||
*/
|
||||
|
||||
enum {
|
||||
HID_HDEV_EVT_OPEN,
|
||||
HID_HDEV_EVT_CLOSE,
|
||||
HID_HDEV_EVT_RETRYING,
|
||||
HID_HDEV_EVT_INTR_DATA,
|
||||
HID_HDEV_EVT_INTR_DATC,
|
||||
HID_HDEV_EVT_CTRL_DATA,
|
||||
HID_HDEV_EVT_CTRL_DATC,
|
||||
HID_HDEV_EVT_HANDSHAKE,
|
||||
HID_HDEV_EVT_VC_UNPLUG
|
||||
};
|
||||
typedef void (tHID_HOST_DEV_CALLBACK) (UINT8 dev_handle,
|
||||
BD_ADDR addr,
|
||||
UINT8 event, /* Event from HID-DEVICE. */
|
||||
UINT32 data, /* Integer data corresponding to the event.*/
|
||||
BT_HDR *p_buf ); /* Pointer data corresponding to the event. */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
** External Function Declarations
|
||||
*****************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostGetSDPRecord
|
||||
**
|
||||
** Description This function reads the device SDP record.
|
||||
**
|
||||
** Returns tHID_STATUS
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostGetSDPRecord (BD_ADDR addr,
|
||||
tSDP_DISCOVERY_DB *p_db,
|
||||
UINT32 db_len,
|
||||
tHID_HOST_SDP_CALLBACK *sdp_cback );
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostRegister
|
||||
**
|
||||
** Description This function registers HID-Host with lower layers.
|
||||
**
|
||||
** Returns tHID_STATUS
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostRegister (tHID_HOST_DEV_CALLBACK *dev_cback);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostDeregister
|
||||
**
|
||||
** Description This function is called when the host is about power down.
|
||||
**
|
||||
** Returns tHID_STATUS
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostDeregister(void);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostAddDev
|
||||
**
|
||||
** Description This is called so HID-host may manage this device.
|
||||
**
|
||||
** Returns tHID_STATUS
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostAddDev (BD_ADDR addr, UINT16 attr_mask,
|
||||
UINT8 *handle );
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostRemoveDev
|
||||
**
|
||||
** Description This removes the device from list devices that host has to manage.
|
||||
**
|
||||
** Returns tHID_STATUS
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostRemoveDev (UINT8 dev_handle );
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostOpenDev
|
||||
**
|
||||
** Description This function is called when the user wants to initiate a
|
||||
** connection attempt to a device.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostOpenDev (UINT8 dev_handle );
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostWriteDev
|
||||
**
|
||||
** Description This function is called when the host has a report to send.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostWriteDev(UINT8 dev_handle, UINT8 t_type,
|
||||
UINT8 param, UINT16 data,
|
||||
UINT8 report_id, BT_HDR *pbuf);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostCloseDev
|
||||
**
|
||||
** Description This function disconnects the device.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostCloseDev(UINT8 dev_handle );
|
||||
|
||||
/*******************************************************************************
|
||||
** Function HID_HostInit
|
||||
**
|
||||
** Description This function initializes the control block and trace variable
|
||||
**
|
||||
** Returns void
|
||||
*******************************************************************************/
|
||||
extern void HID_HostInit(void);
|
||||
|
||||
/*******************************************************************************
|
||||
** Function HID_HostSetSecurityLevel
|
||||
**
|
||||
** Description This function sets the security level for the devices which
|
||||
** are marked by application as requiring security
|
||||
**
|
||||
** Returns tHID_STATUS
|
||||
*******************************************************************************/
|
||||
extern tHID_STATUS HID_HostSetSecurityLevel( char serv_name[], UINT8 sec_lvl );
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function hid_known_hid_device
|
||||
**
|
||||
** Description This function checks if this device is of type HID Device
|
||||
**
|
||||
** Returns TRUE if device exists else FALSE
|
||||
**
|
||||
*******************************************************************************/
|
||||
BOOLEAN hid_known_hid_device (BD_ADDR bd_addr);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function HID_HostSetTraceLevel
|
||||
**
|
||||
** Description This function sets the trace level for HID Host. If called with
|
||||
** a value of 0xFF, it simply reads the current trace level.
|
||||
**
|
||||
** Returns the new (current) trace level
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT8 HID_HostSetTraceLevel (UINT8 new_level);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* HIDH_API_H */
|
||||
Executable → Regular
+17
-23
@@ -89,18 +89,18 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
|
||||
|
||||
/* length of the HCI header block */
|
||||
/* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) */
|
||||
#define L2CAP_MULTI_AV_HCI_HDR_LEN 8
|
||||
#define L2CAP_MULTI_AV_HCI_HDR_LEN 8
|
||||
|
||||
/* length of padding for 4 bytes align */
|
||||
#define L2CAP_MULTI_AV_PADDING_LEN 2
|
||||
|
||||
/* length of the HCI header block with padding for FCR */
|
||||
/* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) + padding(2) */
|
||||
#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10
|
||||
#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10
|
||||
|
||||
/* length of the L2CAP header block */
|
||||
/* HCI header(4) + L2CAP header(4) + padding(4) or control word(2) + FCS(2) */
|
||||
#define L2CAP_MULTI_AV_L2C_HDR_LEN 12
|
||||
#define L2CAP_MULTI_AV_L2C_HDR_LEN 12
|
||||
|
||||
/* definition used for L2CA_SetDesireRole */
|
||||
#define L2CAP_ROLE_SLAVE HCI_ROLE_SLAVE
|
||||
@@ -129,8 +129,7 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
|
||||
** Type Definitions
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
#define L2CAP_FCR_BASIC_MODE 0x00
|
||||
#define L2CAP_FCR_ERTM_MODE 0x03
|
||||
#define L2CAP_FCR_STREAM_MODE 0x04
|
||||
@@ -148,8 +147,7 @@ typedef struct
|
||||
** parameters are optional, for each parameter there is a boolean to
|
||||
** use to signify its presence or absence.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 result; /* Only used in confirm messages */
|
||||
BOOLEAN mtu_present;
|
||||
UINT16 mtu;
|
||||
@@ -287,8 +285,7 @@ typedef void (tL2CA_TX_COMPLETE_CB) (UINT16, UINT16);
|
||||
** MUST be provided, with the exception of the "connect pending"
|
||||
** callback and "congestion status" callback.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tL2CA_CONNECT_IND_CB *pL2CA_ConnectInd_Cb;
|
||||
tL2CA_CONNECT_CFM_CB *pL2CA_ConnectCfm_Cb;
|
||||
tL2CA_CONNECT_PND_CB *pL2CA_ConnectPnd_Cb;
|
||||
@@ -306,8 +303,7 @@ typedef struct
|
||||
/* Define the structure that applications use to create or accept
|
||||
** connections with enhanced retransmission mode.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 preferred_mode;
|
||||
UINT8 allowed_modes;
|
||||
UINT8 user_rx_pool_id;
|
||||
@@ -401,7 +397,7 @@ extern UINT16 L2CA_ConnectReq (UINT16 psm, BD_ADDR p_bd_addr);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_ConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
|
||||
UINT16 result, UINT16 status);
|
||||
UINT16 result, UINT16 status);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -417,7 +413,7 @@ extern BOOLEAN L2CA_ConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr,
|
||||
tL2CAP_ERTM_INFO *p_ertm_info);
|
||||
tL2CAP_ERTM_INFO *p_ertm_info);
|
||||
|
||||
// This function sets the callback routines for the L2CAP connection referred to by
|
||||
// |local_cid|. The callback routines can only be modified for outgoing connections
|
||||
@@ -439,8 +435,8 @@ bool L2CA_SetConnectionCallbacks(uint16_t local_cid, const tL2CAP_APPL_INFO *cal
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
|
||||
UINT16 result, UINT16 status,
|
||||
tL2CAP_ERTM_INFO *p_ertm_info);
|
||||
UINT16 result, UINT16 status,
|
||||
tL2CAP_ERTM_INFO *p_ertm_info);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -546,7 +542,7 @@ bool L2CA_GetIdentifiers(uint16_t lcid, uint16_t *rcid, uint16_t *handle);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout,
|
||||
BOOLEAN is_global);
|
||||
BOOLEAN is_global);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -568,7 +564,7 @@ extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout,
|
||||
** ACL link.
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout,
|
||||
tBT_TRANSPORT transport);
|
||||
tBT_TRANSPORT transport);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -664,7 +660,7 @@ extern BOOLEAN L2CA_FlowControl (UINT16 cid, BOOLEAN data_enabled);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_SendTestSFrame (UINT16 cid, UINT8 sup_type,
|
||||
UINT8 back_track);
|
||||
UINT8 back_track);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -830,8 +826,7 @@ typedef void (tL2CA_UCD_CONGESTION_STATUS_CB) (BD_ADDR, BOOLEAN);
|
||||
|
||||
/* UCD registration info (the callback addresses and PSM)
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tL2CA_UCD_DISCOVER_CB *pL2CA_UCD_Discover_Cb;
|
||||
tL2CA_UCD_DATA_CB *pL2CA_UCD_Data_Cb;
|
||||
tL2CA_UCD_CONGESTION_STATUS_CB *pL2CA_UCD_Congestion_Status_Cb;
|
||||
@@ -957,8 +952,7 @@ typedef void (tL2CA_FIXED_CONGESTION_STATUS_CB) (BD_ADDR, BOOLEAN);
|
||||
|
||||
/* Fixed channel registration info (the callback addresses and channel config)
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tL2CA_FIXED_CHNL_CB *pL2CA_FixedConn_Cb;
|
||||
tL2CA_FIXED_DATA_CB *pL2CA_FixedData_Cb;
|
||||
tL2CA_FIXED_CONGESTION_STATUS_CB *pL2CA_FixedCong_Cb;
|
||||
@@ -1093,7 +1087,7 @@ extern BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bdRa, UINT16 min_int,
|
||||
UINT16 max_int, UINT16 latency, UINT16 timeout);
|
||||
UINT16 max_int, UINT16 latency, UINT16 timeout);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
Executable → Regular
+4
-4
@@ -27,10 +27,10 @@ typedef struct buffer_t buffer_t;
|
||||
typedef struct l2cap_client_t l2cap_client_t;
|
||||
|
||||
typedef struct {
|
||||
void (*connected)(l2cap_client_t *client, void *context);
|
||||
void (*disconnected)(l2cap_client_t *client, void *context);
|
||||
void (*read_ready)(l2cap_client_t *client, buffer_t *packet, void *context);
|
||||
void (*write_ready)(l2cap_client_t *client, void *context);
|
||||
void (*connected)(l2cap_client_t *client, void *context);
|
||||
void (*disconnected)(l2cap_client_t *client, void *context);
|
||||
void (*read_ready)(l2cap_client_t *client, buffer_t *packet, void *context);
|
||||
void (*write_ready)(l2cap_client_t *client, void *context);
|
||||
} l2cap_client_callbacks_t;
|
||||
|
||||
// Returns a new buffer with enough space for |size| bytes of L2CAP payload.
|
||||
|
||||
Executable → Regular
+1
-1
@@ -269,7 +269,7 @@
|
||||
#define L2CAP_SDU_LEN_OFFSET 2 /* SDU length offset is 2 bytes */
|
||||
#define L2CAP_EXT_CONTROL_OVERHEAD 4 /* Extended Control Field */
|
||||
#define L2CAP_MAX_HEADER_FCS (L2CAP_PKT_OVERHEAD + L2CAP_EXT_CONTROL_OVERHEAD + L2CAP_SDU_LEN_OVERHEAD + L2CAP_FCS_LEN)
|
||||
/* length(2), channel(2), control(4), SDU length(2) FCS(2) */
|
||||
/* length(2), channel(2), control(4), SDU length(2) FCS(2) */
|
||||
/* To optimize this, it must be a multiplum of the L2CAP PDU length AND match the 3DH5 air
|
||||
* including the l2cap headers in each packet - to match the latter - the -5 is added
|
||||
*/
|
||||
|
||||
Executable → Regular
+8
-10
@@ -34,8 +34,7 @@
|
||||
** Define port settings structure send from the application in the
|
||||
** set settings request, or to the application in the set settings indication.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
|
||||
#define PORT_BAUD_RATE_2400 0x00
|
||||
#define PORT_BAUD_RATE_4800 0x01
|
||||
@@ -101,7 +100,7 @@ typedef int (tPORT_DATA_CALLBACK) (UINT16 port_handle, void *p_data, UINT16 len
|
||||
#define DATA_CO_CALLBACK_TYPE_INCOMING 1
|
||||
#define DATA_CO_CALLBACK_TYPE_OUTGOING_SIZE 2
|
||||
#define DATA_CO_CALLBACK_TYPE_OUTGOING 3
|
||||
typedef int (tPORT_DATA_CO_CALLBACK) (UINT16 port_handle, UINT8* p_buf, UINT16 len, int type);
|
||||
typedef int (tPORT_DATA_CO_CALLBACK) (UINT16 port_handle, UINT8 *p_buf, UINT16 len, int type);
|
||||
|
||||
typedef void (tPORT_CALLBACK) (UINT32 code, UINT16 port_handle);
|
||||
|
||||
@@ -126,7 +125,7 @@ typedef void (tPORT_CALLBACK) (UINT32 code, UINT16 port_handle);
|
||||
|
||||
#define PORT_EV_CONNECTED 0x00000200 /* RFCOMM connection established */
|
||||
#define PORT_EV_CONNECT_ERR 0x00008000 /* Was not able to establish connection */
|
||||
/* or disconnected */
|
||||
/* or disconnected */
|
||||
#define PORT_EV_FC 0x00010000 /* data flow enabled flag changed by remote */
|
||||
#define PORT_EV_FCS 0x00020000 /* data flow enable status true = enabled */
|
||||
|
||||
@@ -217,9 +216,9 @@ extern "C"
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern int RFCOMM_CreateConnection (UINT16 uuid, UINT8 scn,
|
||||
BOOLEAN is_server, UINT16 mtu,
|
||||
BD_ADDR bd_addr, UINT16 *p_handle,
|
||||
tPORT_CALLBACK *p_mgmt_cb);
|
||||
BOOLEAN is_server, UINT16 mtu,
|
||||
BD_ADDR bd_addr, UINT16 *p_handle,
|
||||
tPORT_CALLBACK *p_mgmt_cb);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -463,8 +462,7 @@ extern int PORT_GetModemStatus (UINT16 handle, UINT8 *p_control_signal);
|
||||
#define PORT_ERR_RXOVER 0x08 /* Input queue overflow occured */
|
||||
#define PORT_ERR_TXFULL 0x10 /* Output queue overflow occured */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
#define PORT_FLAG_CTS_HOLD 0x01 /* Tx is waiting for CTS signal */
|
||||
#define PORT_FLAG_DSR_HOLD 0x02 /* Tx is waiting for DSR signal */
|
||||
#define PORT_FLAG_RLSD_HOLD 0x04 /* Tx is waiting for RLSD signal */
|
||||
@@ -600,7 +598,7 @@ extern int PORT_WriteData (UINT16 handle, char *p_data, UINT16 max_len,
|
||||
** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern int PORT_WriteDataCO (UINT16 handle, int* p_len);
|
||||
extern int PORT_WriteDataCO (UINT16 handle, int *p_len);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
Executable → Regular
+1
-2
@@ -61,8 +61,7 @@
|
||||
** This following definitions are used to indicate the security
|
||||
** requirements for a service.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 level;
|
||||
UINT8 mask;
|
||||
} tBT_SECURITY;
|
||||
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2012 Broadcom Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* This file contains definitions for the RFCOMM protocol
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef RFCDEFS_H
|
||||
#define RFCDEFS_H
|
||||
|
||||
#define PORT_MAX_RFC_PORTS 31
|
||||
|
||||
/*
|
||||
** If nothing is negotiated MTU should be 127
|
||||
*/
|
||||
#define RFCOMM_DEFAULT_MTU 127
|
||||
|
||||
/*
|
||||
** Define used by RFCOMM TS frame types
|
||||
*/
|
||||
#define RFCOMM_SABME 0x2F
|
||||
#define RFCOMM_UA 0x63
|
||||
#define RFCOMM_DM 0x0F
|
||||
#define RFCOMM_DISC 0x43
|
||||
#define RFCOMM_UIH 0xEF
|
||||
|
||||
/*
|
||||
** Defenitions for the TS control frames
|
||||
*/
|
||||
#define RFCOMM_CTRL_FRAME_LEN 3
|
||||
#define RFCOMM_MIN_OFFSET 5 /* ctrl 2 , len 1 or 2 bytes, credit 1 byte */
|
||||
#define RFCOMM_DATA_OVERHEAD (RFCOMM_MIN_OFFSET + 1) /* add 1 for checksum */
|
||||
|
||||
#define RFCOMM_EA 1
|
||||
#define RFCOMM_EA_MASK 0x01
|
||||
#define RFCOMM_CR_MASK 0x02
|
||||
#define RFCOMM_SHIFT_CR 1
|
||||
#define RFCOMM_SHIFT_DLCI 2
|
||||
#define RFCOMM_SHIFT_DLCI2 6
|
||||
#define RFCOMM_PF 0x10
|
||||
#define RFCOMM_PF_MASK 0x10
|
||||
#define RFCOMM_PF_OFFSET 4
|
||||
#define RFCOMM_SHIFT_LENGTH1 1
|
||||
#define RFCOMM_SHIFT_LENGTH2 7
|
||||
#define RFCOMM_SHIFT_MX_CTRL_TYPE 2
|
||||
|
||||
#define RFCOMM_INITIATOR_CMD 1
|
||||
#define RFCOMM_INITIATOR_RSP 0
|
||||
#define RFCOMM_RESPONDER_CMD 0
|
||||
#define RFCOMM_RESPONDER_RSP 1
|
||||
|
||||
#define RFCOMM_PARSE_CTRL_FIELD(ea, cr, dlci, p_data) \
|
||||
{ \
|
||||
ea = *p_data & RFCOMM_EA; \
|
||||
cr = (*p_data & RFCOMM_CR_MASK) >> RFCOMM_SHIFT_CR; \
|
||||
dlci = *p_data++ >> RFCOMM_SHIFT_DLCI; \
|
||||
if (!ea) dlci += *p_data++ << RFCOMM_SHIFT_DLCI2; \
|
||||
}
|
||||
|
||||
#define RFCOMM_FORMAT_CTRL_FIELD(p_data, ea, cr, dlci) \
|
||||
*p_data++ = ea | cr | (dlci << RFCOMM_SHIFT_DLCI)
|
||||
|
||||
#define RFCOMM_PARSE_TYPE_FIELD(type, pf, p_data) \
|
||||
{ \
|
||||
type = *p_data & ~RFCOMM_PF_MASK; \
|
||||
pf = (*p_data++ & RFCOMM_PF_MASK) >> RFCOMM_PF_OFFSET;\
|
||||
}
|
||||
|
||||
#define RFCOMM_FORMAT_TYPE_FIELD(p_data, type, pf) \
|
||||
*p_data++ = (type | (pf << RFCOMM_PF_OFFSET)) \
|
||||
{ \
|
||||
type = *p_data & ~RFCOMM_PF_MASK; \
|
||||
pf = (*p_data++ & RFCOMM_PF_MASK) >> RFCOMM_PF_OFFSET;\
|
||||
}
|
||||
|
||||
#define RFCOMM_PARSE_LEN_FIELD(ea, length, p_data) \
|
||||
{ \
|
||||
ea = (*p_data & RFCOMM_EA); \
|
||||
length = (*p_data++ >> RFCOMM_SHIFT_LENGTH1); \
|
||||
if (!ea) length += (*p_data++ << RFCOMM_SHIFT_LENGTH2); \
|
||||
}
|
||||
|
||||
#define RFCOMM_FRAME_IS_CMD(initiator, cr) \
|
||||
(( (initiator) && !(cr)) || (!(initiator) && (cr)))
|
||||
|
||||
#define RFCOMM_FRAME_IS_RSP(initiator, cr) \
|
||||
(( (initiator) && (cr)) || (!(initiator) && !(cr)))
|
||||
|
||||
#define RFCOMM_CR(initiator, is_command) \
|
||||
(( ( (initiator) && (is_command)) \
|
||||
|| (!(initiator) && !(is_command))) << 1)
|
||||
|
||||
#define RFCOMM_I_CR(is_command) ((is_command) ? 0x02 : 0x00)
|
||||
|
||||
#define RFCOMM_MAX_DLCI 61
|
||||
|
||||
#define RFCOMM_VALID_DLCI(dlci) \
|
||||
(((dlci) == 0) || (((dlci) >= 2) && ((dlci) <= RFCOMM_MAX_DLCI)))
|
||||
|
||||
|
||||
/* Port Negotiation (PN) */
|
||||
#define RFCOMM_PN_DLCI_MASK 0x3F
|
||||
|
||||
#define RFCOMM_PN_FRAM_TYPE_UIH 0x00
|
||||
#define RFCOMM_PN_FRAME_TYPE_MASK 0x0F
|
||||
|
||||
#define RFCOMM_PN_CONV_LAYER_MASK 0xF0
|
||||
#define RFCOMM_PN_CONV_LAYER_TYPE_1 0
|
||||
#define RFCOMM_PN_CONV_LAYER_CBFC_I 0xF0
|
||||
#define RFCOMM_PN_CONV_LAYER_CBFC_R 0xE0
|
||||
|
||||
#define RFCOMM_PN_PRIORITY_MASK 0x3F
|
||||
#define RFCOMM_PN_PRIORITY_0 0
|
||||
|
||||
#define RFCOMM_PN_K_MASK 0x07
|
||||
|
||||
#define RFCOMM_T1_DSEC 0 /* None negotiable in RFCOMM */
|
||||
#define RFCOMM_N2 0 /* Number of retransmissions */
|
||||
#define RFCOMM_K 0 /* Window size */
|
||||
#define RFCOMM_K_MAX 7 /* Max value of K for credit based flow control */
|
||||
|
||||
#define RFCOMM_MSC_FC 0x02 /* Flow control*/
|
||||
#define RFCOMM_MSC_RTC 0x04 /* Ready to communicate*/
|
||||
#define RFCOMM_MSC_RTR 0x08 /* Ready to receive*/
|
||||
#define RFCOMM_MSC_IC 0x40 /* Incomming call indicator*/
|
||||
#define RFCOMM_MSC_DV 0x80 /* Data Valid*/
|
||||
|
||||
#define RFCOMM_MSC_SHIFT_BREAK 4
|
||||
#define RFCOMM_MSC_BREAK_MASK 0xF0
|
||||
#define RFCOMM_MSC_BREAK_PRESENT_MASK 0x02
|
||||
|
||||
#define RFCOMM_BAUD_RATE_2400 0x00
|
||||
#define RFCOMM_BAUD_RATE_4800 0x01
|
||||
#define RFCOMM_BAUD_RATE_7200 0x02
|
||||
#define RFCOMM_BAUD_RATE_9600 0x03
|
||||
#define RFCOMM_BAUD_RATE_19200 0x04
|
||||
#define RFCOMM_BAUD_RATE_38400 0x05
|
||||
#define RFCOMM_BAUD_RATE_57600 0x06
|
||||
#define RFCOMM_BAUD_RATE_115200 0x07
|
||||
#define RFCOMM_BAUD_RATE_230400 0x08
|
||||
|
||||
#define RFCOMM_5_BITS 0x00
|
||||
#define RFCOMM_6_BITS 0x01
|
||||
#define RFCOMM_7_BITS 0x02
|
||||
#define RFCOMM_8_BITS 0x03
|
||||
|
||||
#define RFCOMM_RPN_BITS_MASK 0x03
|
||||
#define RFCOMM_RPN_BITS_SHIFT 0
|
||||
|
||||
#define RFCOMM_ONESTOPBIT 0x00
|
||||
#define RFCOMM_ONE5STOPBITS 0x01
|
||||
|
||||
#define RFCOMM_RPN_STOP_BITS_MASK 0x01
|
||||
#define RFCOMM_RPN_STOP_BITS_SHIFT 2
|
||||
|
||||
#define RFCOMM_PARITY_NO 0x00
|
||||
#define RFCOMM_PARITY_YES 0x01
|
||||
#define RFCOMM_RPN_PARITY_MASK 0x01
|
||||
#define RFCOMM_RPN_PARITY_SHIFT 3
|
||||
|
||||
#define RFCOMM_ODD_PARITY 0x00
|
||||
#define RFCOMM_EVEN_PARITY 0x01
|
||||
#define RFCOMM_MARK_PARITY 0x02
|
||||
#define RFCOMM_SPACE_PARITY 0x03
|
||||
|
||||
#define RFCOMM_RPN_PARITY_TYPE_MASK 0x03
|
||||
#define RFCOMM_RPN_PARITY_TYPE_SHIFT 4
|
||||
|
||||
#define RFCOMM_FC_OFF 0x00
|
||||
#define RFCOMM_FC_XONXOFF_ON_INPUT 0x01
|
||||
#define RFCOMM_FC_XONXOFF_ON_OUTPUT 0x02
|
||||
#define RFCOMM_FC_RTR_ON_INPUT 0x04
|
||||
#define RFCOMM_FC_RTR_ON_OUTPUT 0x08
|
||||
#define RFCOMM_FC_RTC_ON_INPUT 0x10
|
||||
#define RFCOMM_FC_RTC_ON_OUTPUT 0x20
|
||||
#define RFCOMM_FC_MASK 0x3F
|
||||
|
||||
#define RFCOMM_RPN_PM_BIT_RATE 0x0001
|
||||
#define RFCOMM_RPN_PM_DATA_BITS 0x0002
|
||||
#define RFCOMM_RPN_PM_STOP_BITS 0x0004
|
||||
#define RFCOMM_RPN_PM_PARITY 0x0008
|
||||
#define RFCOMM_RPN_PM_PARITY_TYPE 0x0010
|
||||
#define RFCOMM_RPN_PM_XON_CHAR 0x0020
|
||||
#define RFCOMM_RPN_PM_XOFF_CHAR 0x0040
|
||||
#define RFCOMM_RPN_PM_XONXOFF_ON_INPUT 0x0100
|
||||
#define RFCOMM_RPN_PM_XONXOFF_ON_OUTPUT 0x0200
|
||||
#define RFCOMM_RPN_PM_RTR_ON_INPUT 0x0400
|
||||
#define RFCOMM_RPN_PM_RTR_ON_OUTPUT 0x0800
|
||||
#define RFCOMM_RPN_PM_RTC_ON_INPUT 0x1000
|
||||
#define RFCOMM_RPN_PM_RTC_ON_OUTPUT 0x2000
|
||||
#define RFCOMM_RPN_PM_MASK 0x3F7F
|
||||
|
||||
#define RFCOMM_RLS_ERROR 0x01
|
||||
#define RFCOMM_RLS_OVERRUN 0x02
|
||||
#define RFCOMM_RLS_PARITY 0x04
|
||||
#define RFCOMM_RLS_FRAMING 0x08
|
||||
|
||||
/* Multiplexor channel uses DLCI 0 */
|
||||
#define RFCOMM_MX_DLCI 0
|
||||
|
||||
/*
|
||||
** Define RFCOMM Multiplexer message types
|
||||
*/
|
||||
#define RFCOMM_MX_PN 0x80
|
||||
#define RFCOMM_MX_PN_LEN 8
|
||||
|
||||
#define RFCOMM_MX_CLD 0xC0
|
||||
#define RFCOMM_MX_CLD_LEN 0
|
||||
|
||||
#define RFCOMM_MX_TEST 0x20
|
||||
|
||||
#define RFCOMM_MX_FCON 0xA0
|
||||
#define RFCOMM_MX_FCON_LEN 0
|
||||
|
||||
#define RFCOMM_MX_FCOFF 0x60
|
||||
#define RFCOMM_MX_FCOFF_LEN 0
|
||||
|
||||
#define RFCOMM_MX_MSC 0xE0
|
||||
#define RFCOMM_MX_MSC_LEN_NO_BREAK 2
|
||||
#define RFCOMM_MX_MSC_LEN_WITH_BREAK 3
|
||||
|
||||
#define RFCOMM_MX_NSC 0x10
|
||||
#define RFCOMM_MX_NSC_LEN 1
|
||||
|
||||
#define RFCOMM_MX_RPN 0x90
|
||||
#define RFCOMM_MX_RPN_REQ_LEN 1
|
||||
#define RFCOMM_MX_RPN_LEN 8
|
||||
|
||||
#define RFCOMM_MX_RLS 0x50
|
||||
#define RFCOMM_MX_RLS_LEN 2
|
||||
#endif
|
||||
Executable → Regular
+44
-56
@@ -70,22 +70,19 @@
|
||||
|
||||
/* Define a callback function for when discovery is complete. */
|
||||
typedef void (tSDP_DISC_CMPL_CB) (UINT16 result);
|
||||
typedef void (tSDP_DISC_CMPL_CB2) (UINT16 result, void* user_data);
|
||||
typedef void (tSDP_DISC_CMPL_CB2) (UINT16 result, void *user_data);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BD_ADDR peer_addr;
|
||||
UINT16 peer_mtu;
|
||||
} tSDP_DR_OPEN;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 *p_data;
|
||||
UINT16 data_len;
|
||||
} tSDP_DR_DATA;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
tSDP_DR_OPEN open;
|
||||
tSDP_DR_DATA data;
|
||||
} tSDP_DATA;
|
||||
@@ -94,10 +91,8 @@ typedef union
|
||||
typedef void (tSDP_DISC_RES_CB) (UINT16 event, tSDP_DATA *p_data);
|
||||
|
||||
/* Define a structure to hold the discovered service information. */
|
||||
typedef struct
|
||||
{
|
||||
union
|
||||
{
|
||||
typedef struct {
|
||||
union {
|
||||
UINT8 u8; /* 8-bit integer */
|
||||
UINT16 u16; /* 16-bit integer */
|
||||
UINT32 u32; /* 32-bit integer */
|
||||
@@ -107,24 +102,21 @@ typedef struct
|
||||
|
||||
} tSDP_DISC_ATVAL;
|
||||
|
||||
typedef struct t_sdp_disc_attr
|
||||
{
|
||||
typedef struct t_sdp_disc_attr {
|
||||
struct t_sdp_disc_attr *p_next_attr; /* Addr of next linked attr */
|
||||
UINT16 attr_id; /* Attribute ID */
|
||||
UINT16 attr_len_type; /* Length and type fields */
|
||||
tSDP_DISC_ATVAL attr_value; /* Variable length entry data */
|
||||
} tSDP_DISC_ATTR;
|
||||
|
||||
typedef struct t_sdp_disc_rec
|
||||
{
|
||||
typedef struct t_sdp_disc_rec {
|
||||
tSDP_DISC_ATTR *p_first_attr; /* First attribute of record */
|
||||
struct t_sdp_disc_rec *p_next_rec; /* Addr of next linked record */
|
||||
UINT32 time_read; /* The time the record was read */
|
||||
BD_ADDR remote_bd_addr; /* Remote BD address */
|
||||
} tSDP_DISC_REC;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT32 mem_size; /* Memory size of the DB */
|
||||
UINT32 mem_free; /* Memory still available */
|
||||
tSDP_DISC_REC *p_first_rec; /* Addr of first record in DB */
|
||||
@@ -138,18 +130,16 @@ typedef struct
|
||||
UINT32 raw_size; /* size of raw_data */
|
||||
UINT32 raw_used; /* length of raw_data used */
|
||||
#endif
|
||||
}tSDP_DISCOVERY_DB;
|
||||
} tSDP_DISCOVERY_DB;
|
||||
|
||||
/* This structure is used to add protocol lists and find protocol elements */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 protocol_uuid;
|
||||
UINT16 num_params;
|
||||
UINT16 params[SDP_MAX_PROTOCOL_PARAMS];
|
||||
} tSDP_PROTOCOL_ELEM;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT16 num_elems;
|
||||
tSDP_PROTOCOL_ELEM list_elem[SDP_MAX_LIST_ELEMS];
|
||||
} tSDP_PROTO_LIST_ELEM;
|
||||
@@ -157,8 +147,7 @@ typedef struct
|
||||
/* Device Identification (DI) data structure
|
||||
*/
|
||||
/* Used to set the DI record */
|
||||
typedef struct t_sdp_di_record
|
||||
{
|
||||
typedef struct t_sdp_di_record {
|
||||
UINT16 vendor;
|
||||
UINT16 vendor_id_source;
|
||||
UINT16 product;
|
||||
@@ -167,14 +156,13 @@ typedef struct t_sdp_di_record
|
||||
char client_executable_url[SDP_MAX_ATTR_LEN]; /* optional */
|
||||
char service_description[SDP_MAX_ATTR_LEN]; /* optional */
|
||||
char documentation_url[SDP_MAX_ATTR_LEN]; /* optional */
|
||||
}tSDP_DI_RECORD;
|
||||
} tSDP_DI_RECORD;
|
||||
|
||||
/* Used to get the DI record */
|
||||
typedef struct t_sdp_di_get_record
|
||||
{
|
||||
typedef struct t_sdp_di_get_record {
|
||||
UINT16 spec_id;
|
||||
tSDP_DI_RECORD rec;
|
||||
}tSDP_DI_GET_RECORD;
|
||||
} tSDP_DI_GET_RECORD;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -223,8 +211,8 @@ extern BOOLEAN SDP_CancelServiceSearch (tSDP_DISCOVERY_DB *p_db);
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_ServiceSearchRequest (UINT8 *p_bd_addr,
|
||||
tSDP_DISCOVERY_DB *p_db,
|
||||
tSDP_DISC_CMPL_CB *p_cb);
|
||||
tSDP_DISCOVERY_DB *p_db,
|
||||
tSDP_DISC_CMPL_CB *p_cb);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -241,8 +229,8 @@ extern BOOLEAN SDP_ServiceSearchRequest (UINT8 *p_bd_addr,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_ServiceSearchAttributeRequest (UINT8 *p_bd_addr,
|
||||
tSDP_DISCOVERY_DB *p_db,
|
||||
tSDP_DISC_CMPL_CB *p_cb);
|
||||
tSDP_DISCOVERY_DB *p_db,
|
||||
tSDP_DISC_CMPL_CB *p_cb);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -259,8 +247,8 @@ extern BOOLEAN SDP_ServiceSearchAttributeRequest (UINT8 *p_bd_addr,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_ServiceSearchAttributeRequest2 (UINT8 *p_bd_addr,
|
||||
tSDP_DISCOVERY_DB *p_db,
|
||||
tSDP_DISC_CMPL_CB2 *p_cb, void * user_data);
|
||||
tSDP_DISCOVERY_DB *p_db,
|
||||
tSDP_DISC_CMPL_CB2 *p_cb, void *user_data);
|
||||
|
||||
/* API of utilities to find data in the local discovery database */
|
||||
|
||||
@@ -277,8 +265,8 @@ extern BOOLEAN SDP_ServiceSearchAttributeRequest2 (UINT8 *p_bd_addr,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tSDP_DISC_REC *SDP_FindAttributeInDb (tSDP_DISCOVERY_DB *p_db,
|
||||
UINT16 attr_id,
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
UINT16 attr_id,
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -292,7 +280,7 @@ extern tSDP_DISC_REC *SDP_FindAttributeInDb (tSDP_DISCOVERY_DB *p_db,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tSDP_DISC_ATTR *SDP_FindAttributeInRec (tSDP_DISC_REC *p_rec,
|
||||
UINT16 attr_id);
|
||||
UINT16 attr_id);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -308,8 +296,8 @@ extern tSDP_DISC_ATTR *SDP_FindAttributeInRec (tSDP_DISC_REC *p_rec,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tSDP_DISC_REC *SDP_FindServiceInDb (tSDP_DISCOVERY_DB *p_db,
|
||||
UINT16 service_uuid,
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
UINT16 service_uuid,
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -329,8 +317,8 @@ extern tSDP_DISC_REC *SDP_FindServiceInDb (tSDP_DISCOVERY_DB *p_db,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tSDP_DISC_REC *SDP_FindServiceUUIDInDb (tSDP_DISCOVERY_DB *p_db,
|
||||
tBT_UUID *p_uuid,
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
tBT_UUID *p_uuid,
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -345,7 +333,7 @@ extern tSDP_DISC_REC *SDP_FindServiceUUIDInDb (tSDP_DISCOVERY_DB *p_db,
|
||||
** Returns TRUE if found, otherwise FALSE.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC *p_rec, tBT_UUID * p_uuid);
|
||||
extern BOOLEAN SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC *p_rec, tBT_UUID *p_uuid);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -360,7 +348,7 @@ extern BOOLEAN SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC *p_rec, tBT_UUID *
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tSDP_DISC_REC *SDP_FindServiceInDb_128bit(tSDP_DISCOVERY_DB *p_db,
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
tSDP_DISC_REC *p_start_rec);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -374,8 +362,8 @@ extern tSDP_DISC_REC *SDP_FindServiceInDb_128bit(tSDP_DISCOVERY_DB *p_db,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_FindProtocolListElemInRec (tSDP_DISC_REC *p_rec,
|
||||
UINT16 layer_uuid,
|
||||
tSDP_PROTOCOL_ELEM *p_elem);
|
||||
UINT16 layer_uuid,
|
||||
tSDP_PROTOCOL_ELEM *p_elem);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -390,8 +378,8 @@ extern BOOLEAN SDP_FindProtocolListElemInRec (tSDP_DISC_REC *p_rec,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_FindAddProtoListsElemInRec (tSDP_DISC_REC *p_rec,
|
||||
UINT16 layer_uuid,
|
||||
tSDP_PROTOCOL_ELEM *p_elem);
|
||||
UINT16 layer_uuid,
|
||||
tSDP_PROTOCOL_ELEM *p_elem);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -409,8 +397,8 @@ extern BOOLEAN SDP_FindAddProtoListsElemInRec (tSDP_DISC_REC *p_rec,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_FindProfileVersionInRec (tSDP_DISC_REC *p_rec,
|
||||
UINT16 profile_uuid,
|
||||
UINT16 *p_version);
|
||||
UINT16 profile_uuid,
|
||||
UINT16 *p_version);
|
||||
|
||||
|
||||
/* API into SDP for local service database updates */
|
||||
@@ -544,7 +532,7 @@ extern BOOLEAN SDP_AddProtocolList (UINT32 handle, UINT16 num_elem,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_AddAdditionProtoLists (UINT32 handle, UINT16 num_elem,
|
||||
tSDP_PROTO_LIST_ELEM *p_proto_list);
|
||||
tSDP_PROTO_LIST_ELEM *p_proto_list);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -560,8 +548,8 @@ extern BOOLEAN SDP_AddAdditionProtoLists (UINT32 handle, UINT16 num_elem,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_AddProfileDescriptorList (UINT32 handle,
|
||||
UINT16 profile_uuid,
|
||||
UINT16 version);
|
||||
UINT16 profile_uuid,
|
||||
UINT16 version);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -577,8 +565,8 @@ extern BOOLEAN SDP_AddProfileDescriptorList (UINT32 handle,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_AddLanguageBaseAttrIDList (UINT32 handle,
|
||||
UINT16 lang, UINT16 char_enc,
|
||||
UINT16 base_id);
|
||||
UINT16 lang, UINT16 char_enc,
|
||||
UINT16 base_id);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -594,8 +582,8 @@ extern BOOLEAN SDP_AddLanguageBaseAttrIDList (UINT32 handle,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SDP_AddServiceClassIdList (UINT32 handle,
|
||||
UINT16 num_services,
|
||||
UINT16 *p_service_uuids);
|
||||
UINT16 num_services,
|
||||
UINT16 *p_service_uuids);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
Executable → Regular
+19
-29
@@ -60,9 +60,9 @@
|
||||
#define SMP_COMPLT_EVT 7 /* SMP complete event */
|
||||
#define SMP_PEER_KEYPR_NOT_EVT 8 /* Peer keypress notification received event */
|
||||
#define SMP_SC_OOB_REQ_EVT 9 /* SC OOB request event (both local and peer OOB data */
|
||||
/* can be expected in response) */
|
||||
/* can be expected in response) */
|
||||
#define SMP_SC_LOC_OOB_DATA_UP_EVT 10 /* SC OOB local data set is created */
|
||||
/* (as result of SMP_CrLocScOobData(...)) */
|
||||
/* (as result of SMP_CrLocScOobData(...)) */
|
||||
#define SMP_BR_KEYS_REQ_EVT 12 /* SMP over BR keys request event */
|
||||
typedef UINT8 tSMP_EVT;
|
||||
|
||||
@@ -117,12 +117,11 @@ typedef UINT8 tSMP_STATUS;
|
||||
typedef UINT8 tSMP_IO_CAP;
|
||||
|
||||
#ifndef SMP_DEFAULT_IO_CAPS
|
||||
#define SMP_DEFAULT_IO_CAPS SMP_IO_CAP_KBDISP
|
||||
#define SMP_DEFAULT_IO_CAPS SMP_IO_CAP_KBDISP
|
||||
#endif
|
||||
|
||||
/* OOB data present or not */
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
SMP_OOB_NONE,
|
||||
SMP_OOB_PRESENT,
|
||||
SMP_OOB_UNKNOWN
|
||||
@@ -130,8 +129,7 @@ enum
|
||||
typedef UINT8 tSMP_OOB_FLAG;
|
||||
|
||||
/* type of OOB data required from application */
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
SMP_OOB_INVALID_TYPE,
|
||||
SMP_OOB_PEER,
|
||||
SMP_OOB_LOCAL,
|
||||
@@ -175,7 +173,7 @@ typedef UINT8 tSMP_OOB_DATA_TYPE;
|
||||
/* Secure Connections, MITM, Bonding */
|
||||
#define SMP_AUTH_SC_MITM_GB (SMP_SC_SUPPORT_BIT | SMP_AUTH_YN_BIT | SMP_AUTH_GEN_BOND)
|
||||
|
||||
/* All AuthReq RFU bits are set to 1 - NOTE: reserved bit in Bonding_Flags is not set */
|
||||
/* All AuthReq RFU bits are set to 1 - NOTE: reserved bit in Bonding_Flags is not set */
|
||||
#define SMP_AUTH_ALL_RFU_SET 0xF8
|
||||
|
||||
typedef UINT8 tSMP_AUTH_REQ;
|
||||
@@ -212,8 +210,7 @@ typedef UINT8 tSMP_KEYS;
|
||||
typedef UINT8 tSMP_SC_KEY_TYPE;
|
||||
|
||||
/* data type for BTM_SP_IO_REQ_EVT */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tSMP_IO_CAP io_cap; /* local IO capabilities */
|
||||
tSMP_OOB_FLAG oob_data; /* OOB data present (locally) for the peer device */
|
||||
tSMP_AUTH_REQ auth_req; /* Authentication required (for local device) */
|
||||
@@ -222,64 +219,57 @@ typedef struct
|
||||
tSMP_KEYS resp_keys; /* responder keys */
|
||||
} tSMP_IO_REQ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tSMP_STATUS reason;
|
||||
tSMP_SEC_LEVEL sec_level;
|
||||
BOOLEAN is_pair_cancel;
|
||||
BOOLEAN smp_over_br;
|
||||
} tSMP_CMPL;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BT_OCTET32 x;
|
||||
BT_OCTET32 y;
|
||||
} tSMP_PUBLIC_KEY;
|
||||
|
||||
/* the data associated with the info sent to the peer via OOB interface */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BOOLEAN present;
|
||||
BT_OCTET16 randomizer;
|
||||
BT_OCTET16 commitment;
|
||||
|
||||
tBLE_BD_ADDR addr_sent_to;
|
||||
BT_OCTET32 private_key_used; /* is used to calculate: */
|
||||
/* publ_key_used = P-256(private_key_used, curve_p256.G) - send it to the */
|
||||
/* other side */
|
||||
/* dhkey = P-256(private_key_used, publ key rcvd from the other side) */
|
||||
/* publ_key_used = P-256(private_key_used, curve_p256.G) - send it to the */
|
||||
/* other side */
|
||||
/* dhkey = P-256(private_key_used, publ key rcvd from the other side) */
|
||||
tSMP_PUBLIC_KEY publ_key_used; /* P-256(private_key_used, curve_p256.G) */
|
||||
} tSMP_LOC_OOB_DATA;
|
||||
|
||||
/* the data associated with the info received from the peer via OOB interface */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
BOOLEAN present;
|
||||
BT_OCTET16 randomizer;
|
||||
BT_OCTET16 commitment;
|
||||
tBLE_BD_ADDR addr_rcvd_from;
|
||||
} tSMP_PEER_OOB_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
tSMP_LOC_OOB_DATA loc_oob_data;
|
||||
tSMP_PEER_OOB_DATA peer_oob_data;
|
||||
} tSMP_SC_OOB_DATA;
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
UINT32 passkey;
|
||||
tSMP_IO_REQ io_req; /* IO request */
|
||||
tSMP_CMPL cmplt;
|
||||
tSMP_OOB_DATA_TYPE req_oob_type;
|
||||
tSMP_LOC_OOB_DATA loc_oob_data;
|
||||
}tSMP_EVT_DATA;
|
||||
} tSMP_EVT_DATA;
|
||||
|
||||
|
||||
/* AES Encryption output */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
UINT8 status;
|
||||
UINT8 param_len;
|
||||
UINT16 opcode;
|
||||
@@ -486,7 +476,7 @@ extern void SMP_KeypressNotification (BD_ADDR bd_addr, UINT8 value);
|
||||
** Returns Boolean - TRUE: creation of local SC OOB data set started.
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN SMP_CreateLocalSecureConnectionsOobData (
|
||||
tBLE_BD_ADDR *addr_to_send_to);
|
||||
tBLE_BD_ADDR *addr_to_send_to);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user