15738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/****************************************************************************** 25738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 35738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Copyright (C) 2002-2012 Broadcom Corporation 45738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 55738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 65738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * you may not use this file except in compliance with the License. 75738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * You may obtain a copy of the License at: 85738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 95738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * See the License for the specific language governing permissions and 155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * limitations under the License. 165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project ******************************************************************************/ 185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_HH_API_H 195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_API_H 205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "bta_api.h" 225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "hidh_api.h" 235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 242e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE) 252e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#include "gatt_api.h" 262e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#endif 272e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach 285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/***************************************************************************** 295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Constants and Type Definitions 305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/ 315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_HH_DEBUG 322e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_DEBUG TRUE 335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_HH_SSR_MAX_LATENCY_DEF 36ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_SSR_MAX_LATENCY_DEF 800 /* 500 ms*/ 375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_HH_SSR_MIN_TOUT_DEF 405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_SSR_MIN_TOUT_DEF 2 415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* BTA HID Host callback events */ 445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_ENABLE_EVT 0 /* HH enabled */ 455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DISABLE_EVT 1 /* HH disabled */ 465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_OPEN_EVT 2 /* connection opened */ 475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_CLOSE_EVT 3 /* connection closed */ 485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_GET_RPT_EVT 4 /* BTA_HhGetReport callback */ 495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_SET_RPT_EVT 5 /* BTA_HhSetReport callback */ 505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_GET_PROTO_EVT 6 /* BTA_GetProtoMode callback */ 515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_SET_PROTO_EVT 7 /* BTA_HhSetProtoMode callback */ 525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_GET_IDLE_EVT 8 /* BTA_HhGetIdle comes callback */ 535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_SET_IDLE_EVT 9 /* BTA_HhSetIdle finish callback */ 542e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_GET_DSCP_EVT 10 /* Get report descriptor */ 555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_ADD_DEV_EVT 11 /* Add Device callback */ 565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_RMV_DEV_EVT 12 /* remove device finished */ 575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_VC_UNPLUG_EVT 13 /* virtually unplugged */ 58ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_DATA_EVT 15 59ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_API_ERR_EVT 16 /* API error is caught */ 602e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_UPDATE_SCPP_EVT 17 /* update scan paramter complete */ 615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT16 tBTA_HH_EVT; 635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 64ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta/* application ID(none-zero) for each type of device */ 65ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_APP_ID_MI 1 66ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_APP_ID_KB 2 67ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_APP_ID_RMC 3 68ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_APP_ID_3DSG 4 69ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_APP_ID_JOY 5 70ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_APP_ID_GPAD 6 71ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_APP_ID_LE 0xff 72ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* defined the minimum offset */ 745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_MIN_OFFSET L2CAP_MIN_OFFSET+1 755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 76ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta/* HID_HOST_MAX_DEVICES can not exceed 15 for th design of BTA HH */ 77ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_IDX_INVALID 0xff 785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_MAX_KNOWN HID_HOST_MAX_DEVICES 79ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 802e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE) 812e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach/* GATT_MAX_PHY_CHANNEL can not exceed 14 for the design of BTA HH */ 822e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_LE_MAX_KNOWN GATT_MAX_PHY_CHANNEL 832e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_MAX_DEVICE (HID_HOST_MAX_DEVICES + GATT_MAX_PHY_CHANNEL) 842e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#else 852e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_MAX_DEVICE HID_HOST_MAX_DEVICES 862e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#endif 875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* invalid device handle */ 885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_INVALID_HANDLE 0xff 895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* type of protocol mode */ 915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_PROTO_RPT_MODE (0x00) 925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_PROTO_BOOT_MODE (0x01) 935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_PROTO_UNKNOWN (0xff) 945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_HH_PROTO_MODE; 955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_KEYBD_RPT_ID = 1, 995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_MOUSE_RPT_ID 1005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 1015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_HH_BOOT_RPT_ID; 1025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* type of devices, bit mask */ 1045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_UNKNOWN 0x00 1055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_JOS 0x01 /* joy stick */ 1065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_GPD 0x02 /* game pad */ 1075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_RMC 0x03 /* remote control */ 1085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_SED 0x04 /* sensing device */ 1095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_DGT 0x05 /* Digitizer tablet */ 1105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_CDR 0x06 /* card reader */ 1115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_KBD 0x10 /* keyboard */ 1125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_MIC 0x20 /* pointing device */ 1135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_COM 0x30 /* Combo keyboard/pointing */ 1145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_DEVT_OTHER 0x80 1155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_HH_DEVT; 1165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 1185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_OK, 1205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_HS_HID_NOT_READY, /* handshake error : device not ready */ 1215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_HS_INVALID_RPT_ID, /* handshake error : invalid report ID */ 1225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_HS_TRANS_NOT_SPT, /* handshake error : transaction not spt */ 1235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_HS_INVALID_PARAM, /* handshake error : invalid paremter */ 1245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_HS_ERROR, /* handshake error : unspecified HS error */ 1255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_ERR, /* general BTA HH error */ 1265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_ERR_SDP, /* SDP error */ 1275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_ERR_PROTO, /* SET_Protocol error, 1285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project only used in BTA_HH_OPEN_EVT callback */ 1292e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach 1305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_ERR_DB_FULL, /* device database full error, used in 1315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_OPEN_EVT/BTA_HH_ADD_DEV_EVT */ 1325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_ERR_TOD_UNSPT, /* type of device not supported */ 1335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_ERR_NO_RES, /* out of system resources */ 1345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_ERR_AUTH_FAILED, /* authentication fail */ 135ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta BTA_HH_ERR_HDL, 136ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta BTA_HH_ERR_SEC 1375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 1385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_HH_STATUS; 1395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_VIRTUAL_CABLE HID_VIRTUAL_CABLE 1425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_NORMALLY_CONNECTABLE HID_NORMALLY_CONNECTABLE 1435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_RECONN_INIT HID_RECONN_INIT 1445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_SDP_DISABLE HID_SDP_DISABLE 1455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_BATTERY_POWER HID_BATTERY_POWER 1465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_REMOTE_WAKE HID_REMOTE_WAKE 1475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_SUP_TOUT_AVLBL HID_SUP_TOUT_AVLBL 1485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_SEC_REQUIRED HID_SEC_REQUIRED 1495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT16 tBTA_HH_ATTR_MASK; 1505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* supported type of device and corresponding application ID */ 1525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 1535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_DEVT tod; /* type of device */ 1555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 app_id; /* corresponding application ID */ 1565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}tBTA_HH_SPT_TOD; 1575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* configuration struct */ 1595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 1605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 max_devt_spt; /* max number of types of devices spt */ 1625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_SPT_TOD *p_devt_list; /* supported types of device list */ 1635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT16 sdp_db_size; 1645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}tBTA_HH_CFG; 1655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 1675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_RPTT_RESRV, /* reserved */ 1695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_RPTT_INPUT, /* input report */ 1705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_RPTT_OUTPUT, /* output report */ 1715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_RPTT_FEATURE /* feature report */ 1725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 1735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_HH_RPT_TYPE; 1745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* HID_CONTROL operation code used in BTA_HhSendCtrl() 1765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*/ 1775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 1785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_CTRL_NOP = 0 + HID_PAR_CONTROL_NOP ,/* mapping from BTE */ 1805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_CTRL_HARD_RESET, /* hard reset */ 1815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_CTRL_SOFT_RESET, /* soft reset */ 1825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_CTRL_SUSPEND, /* enter suspend */ 1835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_CTRL_EXIT_SUSPEND, /* exit suspend */ 1845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG /* virtual unplug */ 1855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 1865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_HH_TRANS_CTRL_TYPE; 1875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef tHID_DEV_DSCP_INFO tBTA_HH_DEV_DESCR; 1895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 190ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta#define BTA_HH_SSR_PARAM_INVALID HID_SSR_PARAM_INVALID 191ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 1925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* id DI is not existing in remote device, vendor_id in tBTA_HH_DEV_DSCP_INFO will be set to 0xffff */ 1935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_HH_VENDOR_ID_INVALID 0xffff 1945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* report descriptor information */ 1975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 1985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT16 vendor_id; /* vendor ID */ 2005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT16 product_id; /* product ID */ 2015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT16 version; /* version */ 202ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta UINT16 ssr_max_latency; /* SSR max latency, BTA_HH_SSR_PARAM_INVALID if unknown */ 203ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta UINT16 ssr_min_tout; /* SSR min timeout, BTA_HH_SSR_PARAM_INVALID if unknown */ 2045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 ctry_code; /*Country Code.*/ 2052e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE) 2062e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_LE_REMOTE_WAKE 0x01 2072e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#define BTA_HH_LE_NORMAL_CONN 0x02 2082e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach 2092e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach UINT8 flag; 2102e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#endif 2115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_DEV_DESCR descriptor; 2125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}tBTA_HH_DEV_DSCP_INFO; 2135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* callback event data for BTA_HH_OPEN_EVT */ 2155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 2165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BD_ADDR bda; /* HID device bd address */ 2185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_STATUS status; /* operation status */ 2195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 handle; /* device handle */ 2202e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE) 2212e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach BOOLEAN le_hid; /* is LE devices? */ 2222e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach BOOLEAN scps_supported; /* scan parameter service supported */ 2232e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#endif 2242e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach 2255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_HH_CONN; 2265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef tBTA_HH_CONN tBTA_HH_DEV_INFO; 2285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* callback event data */ 2305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 2315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_STATUS status; /* operation status */ 2335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 handle; /* device handle */ 2345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_HH_CBDATA; 2355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 2375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_MOD_CTRL_KEY, 2395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_MOD_SHFT_KEY, 2405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_MOD_ALT_KEY, 2415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_MOD_GUI_KEY, 2425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_MOD_MAX_KEY 2435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 2445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* parsed boot mode keyboard report */ 2465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 2475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 this_char[6]; /* virtual key code */ 2495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BOOLEAN mod_key[BTA_HH_MOD_MAX_KEY]; 2505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project /* ctrl, shift, Alt, GUI */ 2515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project /* modifier key: is Shift key pressed */ 2525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project /* modifier key: is Ctrl key pressed */ 2535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project /* modifier key: is Alt key pressed */ 2545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project /* modifier key: GUI up/down */ 2555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BOOLEAN caps_lock; /* is caps locked */ 2565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BOOLEAN num_lock; /* is Num key pressed */ 2575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_HH_KEYBD_RPT; 2585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* parsed boot mode mouse report */ 2605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 2615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 mouse_button; /* mouse button is clicked */ 2635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project INT8 delta_x; /* displacement x */ 2645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project INT8 delta_y; /* displacement y */ 2655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}tBTA_HH_MICE_RPT; 2665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* parsed Boot report */ 2685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 2695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_BOOT_RPT_ID dev_type; /* type of device report */ 2715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project union 2725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project { 2735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_KEYBD_RPT keybd_rpt; /* keyboard report */ 2745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_MICE_RPT mice_rpt; /* mouse report */ 2755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project } data_rpt; 2765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_HH_BOOT_RPT; 2775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* handshake data */ 2795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 2805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_STATUS status; /* handshake status */ 2825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 handle; /* device handle */ 2835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project union 2845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project { 2855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_PROTO_MODE proto_mode; /* GET_PROTO_EVT :protocol mode */ 2865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BT_HDR *p_rpt_data; /* GET_RPT_EVT : report data */ 2875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project UINT8 idle_rate; /* GET_IDLE_EVT : idle rate */ 2885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project } rsp_data; 2895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}tBTA_HH_HSDATA; 2915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* union of data associated with HD callback */ 2935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef union 2945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_DEV_INFO dev_info; /* BTA_HH_ADD_DEV_EVT, BTA_HH_RMV_DEV_EVT */ 2965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_CONN conn; /* BTA_HH_OPEN_EVT */ 2975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_CBDATA dev_status; /* BTA_HH_CLOSE_EVT, 2985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_SET_PROTO_EVT 2995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_SET_RPT_EVT 3002e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach BTA_HH_SET_IDLE_EVT 3012e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach BTA_HH_UPDATE_SCPP_EVT */ 3025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_STATUS status; /* BTA_HH_ENABLE_EVT */ 3045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_DEV_DSCP_INFO dscp_info; /* BTA_HH_GET_DSCP_EVT */ 3055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_HH_HSDATA hs_data; /* GET_ transaction callback 3065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_GET_RPT_EVT 3075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_GET_PROTO_EVT 3085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_HH_GET_IDLE_EVT */ 3095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_HH; 3105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* BTA HH callback function */ 3125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (tBTA_HH_CBACK) (tBTA_HH_EVT event, tBTA_HH *p_data); 3135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/***************************************************************************** 3165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** External Function Declarations 3175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/ 3185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus 3195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern "C" 3205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 3215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 3225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 3245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhRegister 3265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description This function enable HID host and registers HID-Host with 3285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** lower layers. 3295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 3315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 33324933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhEnable(tBTA_SEC sec_mask, tBTA_HH_CBACK *p_cback); 3345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 3365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhDeregister 3385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description This function is called when the host is about power down. 3405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 3425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 34424933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhDisable(void); 3455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 3475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhOpen 3495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description This function is called to start an inquiry and read SDP 3515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** record of responding devices; connect to a device if only 3525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** one active HID device is found. 3535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 3555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 35724933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhOpen (BD_ADDR dev_bda, tBTA_HH_PROTO_MODE mode, 35824933b5b1a06274c47133debac5251a97128a267June R. Tate-Gans tBTA_SEC sec_mask); 3595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 3615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhClose 3635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description This function disconnects the device. 3655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 3675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 36924933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhClose(UINT8 dev_handle); 3705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 3725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhSetProtoMode 3745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description This function set the protocol mode at specified HID handle 3765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 3785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 38024933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhSetProtoMode(UINT8 handle, tBTA_HH_PROTO_MODE t_type); 3815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 3825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 3835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhGetProtoMode 3855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description This function get the protocol mode of a specified HID device. 3875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 3895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 39124933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhGetProtoMode(UINT8 dev_handle); 3925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 3935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhSetReport 3955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description send SET_REPORT to device. 3975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 3985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 3995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 40124933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhSetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type, 40224933b5b1a06274c47133debac5251a97128a267June R. Tate-Gans BT_HDR *p_data); 4035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 4045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 4055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhGetReport 4075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description Send a GET_REPORT to HID device. 4095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 4115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 41324933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhGetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type, 41424933b5b1a06274c47133debac5251a97128a267June R. Tate-Gans UINT8 rpt_id, UINT16 buf_size); 4155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 4165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 417ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** Function BTA_HhSetIdle 418ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 419ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** Description send SET_IDLE to device. 420ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 421ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** Returns void 422ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 423ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta*******************************************************************************/ 42424933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhSetIdle(UINT8 dev_handle, UINT16 idle_rate); 425ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 426ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta/******************************************************************************* 427ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 428ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** Function BTA_HhGetIdle 429ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 430ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** Description Send a GET_IDLE to HID device. 431ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 432ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** Returns void 433ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 434ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta*******************************************************************************/ 43524933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhGetIdle(UINT8 dev_handle); 436ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 437ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta/******************************************************************************* 438ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta** 4395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhSendCtrl 4405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description Send HID_CONTROL request to a HID device. 4425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 4445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 44624933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhSendCtrl(UINT8 dev_handle, 44724933b5b1a06274c47133debac5251a97128a267June R. Tate-Gans tBTA_HH_TRANS_CTRL_TYPE c_type); 4485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 4495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 4505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhSetIdle 4525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description send SET_IDLE to device. 4545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 4565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 45824933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhSetIdle(UINT8 dev_handle, UINT16 idle_rate); 4595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 4605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 4615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 4625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhGetIdle 4645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description Send a GET_IDLE from HID device. 4665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 4685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 47024933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhGetIdle(UINT8 dev_handle); 4715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 4725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 4735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhSendData 4755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description Send DATA transaction to a HID device. 4775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 4795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 48124933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhSendData(UINT8 dev_handle, BD_ADDR dev_bda, BT_HDR *p_buf); 4825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 4835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 4845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhGetDscpInfo 4865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description Get report descriptor of the device 4885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 4905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 49224933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhGetDscpInfo(UINT8 dev_handle); 4935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 4945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 4955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhAddDev 4965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 4975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description Add a virtually cabled device into HID-Host device list 4985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** to manage and assign a device handle for future API call, 4995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** host applciation call this API at start-up to initialize its 5005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** virtually cabled devices. 5015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 5035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 50524933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask, 50624933b5b1a06274c47133debac5251a97128a267June R. Tate-Gans UINT8 sub_class, UINT8 app_id, 50724933b5b1a06274c47133debac5251a97128a267June R. Tate-Gans tBTA_HH_DEV_DSCP_INFO dscp_info); 5085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 5095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhRemoveDev 5115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description Remove a device from the HID host devices list. 5135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 5155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 51724933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhRemoveDev(UINT8 dev_handle ); 518ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 5195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 5205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Parsing Utility Functions 5225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 5245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 5255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function BTA_HhParseBootRpt 5275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Description This utility function parse a boot mode report. 5295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Returns void 5315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** 5325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/ 53324933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhParseBootRpt(tBTA_HH_BOOT_RPT *p_data, UINT8 *p_report, 53424933b5b1a06274c47133debac5251a97128a267June R. Tate-Gans UINT16 report_len); 5355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 5362e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#if BTA_HH_LE_INCLUDED == TRUE 5372e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach/******************************************************************************* 5382e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** 5392e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** Function BTA_HhUpdateLeScanParam 5402e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** 5412e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** Description Update the scan paramteters if connected to a LE hid device as 5422e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** report host. 5432e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** 5442e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** Returns void 5452e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach** 5462e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach*******************************************************************************/ 54724933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void BTA_HhUpdateLeScanParam(UINT8 dev_handle, UINT16 scan_int, UINT16 scan_win); 5482e7fa68bfd9723b7ec7b6b0b128d89f31a2e06eeAndre Eisenbach#endif 549ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta/* test commands */ 55024933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void bta_hh_le_hid_read_rpt_clt_cfg(BD_ADDR bd_addr, UINT8 rpt_id); 551ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 552ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 553ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta 5545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus 5555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} 5565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 5575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 5585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif /* BTA_HH_API_H */ 559