1 /******************************************************************************
3 * Copyright (C) 2002-2012 Broadcom Corporation
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 ******************************************************************************/
19 /******************************************************************************
21 * This file contains HID HOST internal definitions
23 ******************************************************************************/
37 typedef struct per_device_ctb
40 BD_ADDR addr; /* BD-Addr of the host device */
41 UINT16 attr_mask; /* 0x01- virtual_cable; 0x02- normally_connectable; 0x03- reconn_initiate;
43 UINT8 state; /* Device state if in HOST-KNOWN mode */
45 UINT8 conn_tries; /* Remembers to the number of connection attempts while CONNECTING */
47 tHID_CONN conn; /* L2CAP channel info */
50 typedef struct host_ctb
52 tHID_HOST_DEV_CTB devices[HID_HOST_MAX_DEVICES];
53 tHID_HOST_DEV_CALLBACK *callback; /* Application callbacks */
54 tL2CAP_CFG_INFO l2cap_cfg;
56 #define MAX_SERVICE_DB_SIZE 4000
59 tHID_HOST_SDP_CALLBACK *sdp_cback;
60 tSDP_DISCOVERY_DB *p_sdp_db;
61 tHID_DEV_SDP_INFO sdp_rec;
66 extern tHID_STATUS hidh_conn_snd_data(UINT8 dhandle, UINT8 trans_type, UINT8 param, \
67 UINT16 data,UINT8 rpt_id, BT_HDR *buf);
68 extern tHID_STATUS hidh_conn_reg (void);
69 extern void hidh_conn_dereg( void );
70 extern tHID_STATUS hidh_conn_disconnect (UINT8 dhandle);
71 extern tHID_STATUS hidh_conn_initiate (UINT8 dhandle);
72 extern void hidh_process_repage_timer_timeout(void *data);
73 extern void hidh_try_repage(UINT8 dhandle);
80 /******************************************************************************
82 *******************************************************************************/
83 #if HID_DYNAMIC_MEMORY == FALSE
84 extern tHID_HOST_CTB hh_cb;
86 extern tHID_HOST_CTB *hidh_cb_ptr;
87 #define hh_cb (*hidh_cb_ptr)