1 /******************************************************************************
3 * Copyright (C) 2005-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 is the interface file for hid host call-out functions.
23 ******************************************************************************/
27 #include "bta_hh_api.h"
33 tBTA_HH_RPT_TYPE rpt_type;
36 }tBTA_HH_RPT_CACHE_ENTRY;
38 /*******************************************************************************
40 ** Function bta_hh_co_data
42 ** Description This callout function is executed by HH when data is received
43 ** in interupt channel.
48 *******************************************************************************/
49 extern void bta_hh_co_data(UINT8 dev_handle, UINT8 *p_rpt, UINT16 len,
50 tBTA_HH_PROTO_MODE mode, UINT8 sub_class,
51 UINT8 ctry_code, BD_ADDR peer_addr, UINT8 app_id);
53 /*******************************************************************************
55 ** Function bta_hh_co_open
57 ** Description This callout function is executed by HH when connection is
58 ** opened, and application may do some device specific
63 *******************************************************************************/
64 extern void bta_hh_co_open(UINT8 dev_handle, UINT8 sub_class,
65 UINT16 attr_mask, UINT8 app_id);
67 /*******************************************************************************
69 ** Function bta_hh_co_close
71 ** Description This callout function is executed by HH when connection is
72 ** closed, and device specific finalizatio nmay be needed.
76 *******************************************************************************/
77 extern void bta_hh_co_close(UINT8 dev_handle, UINT8 app_id);
79 #if (BLE_INCLUDED == TRUE && BTA_HH_LE_INCLUDED == TRUE)
80 /*******************************************************************************
82 ** Function bta_hh_le_co_rpt_info
84 ** Description This callout function is to convey the report information on
85 ** a HOGP device to the application. Application can save this
86 ** information in NV if device is bonded and load it back when
89 ** Parameters remote_bda - remote device address
90 ** p_entry - report entry pointer
91 ** app_id - application id
95 *******************************************************************************/
96 extern void bta_hh_le_co_rpt_info(BD_ADDR remote_bda,
97 tBTA_HH_RPT_CACHE_ENTRY *p_entry,
100 /*******************************************************************************
102 ** Function bta_hh_le_co_cache_load
104 ** Description This callout function is to request the application to load the
105 ** cached HOGP report if there is any. When cache reading is completed,
106 ** bta_hh_le_ci_cache_load() is called by the application.
108 ** Parameters remote_bda - remote device address
109 ** p_num_rpt: number of cached report
110 ** app_id - application id
112 ** Returns the acched report array
114 *******************************************************************************/
115 extern tBTA_HH_RPT_CACHE_ENTRY *bta_hh_le_co_cache_load (BD_ADDR remote_bda,
119 /*******************************************************************************
121 ** Function bta_hh_le_co_reset_rpt_cache
123 ** Description This callout function is to reset the HOGP device cache.
125 ** Parameters remote_bda - remote device address
129 *******************************************************************************/
130 extern void bta_hh_le_co_reset_rpt_cache (BD_ADDR remote_bda, UINT8 app_id);
132 #endif /* #if (BLE_INCLUDED == TRUE && BTA_HH_LE_INCLUDED == TRUE) */
133 #endif /* BTA_HH_CO_H */