1 /****************************************************************************** 2 * 3 * Copyright (C) 2005-2012 Broadcom Corporation 4 * 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: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 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. 16 * 17 ******************************************************************************/ 18 19 /****************************************************************************** 20 * 21 * This file contains compile-time configurable constants for the BTA Hid 22 * Host. 23 * 24 ******************************************************************************/ 25 26 #include "bt_target.h" 27 #include "bta_hh_api.h" 28 29 /* max number of device types supported by BTA */ 30 #define BTA_HH_MAX_DEVT_SPT 9 31 32 /* size of database for service discovery */ 33 #ifndef BTA_HH_DISC_BUF_SIZE 34 #define BTA_HH_DISC_BUF_SIZE GKI_MAX_BUF_SIZE 35 #endif 36 37 /* application ID(none-zero) for each type of device */ 38 #define BTA_HH_APP_ID_MI 1 39 #define BTA_HH_APP_ID_KB 2 40 #define BTA_HH_APP_ID_RMC 3 41 #define BTA_HH_APP_ID_3DSG 4 42 #define BTA_HH_APP_ID_JOY 5 43 #define BTA_HH_APP_ID_GPAD 6 44 45 46 /* The type of devices supported by BTA HH and corresponding application ID */ 47 tBTA_HH_SPT_TOD p_devt_list[BTA_HH_MAX_DEVT_SPT] = 48 { 49 {BTA_HH_DEVT_MIC, BTA_HH_APP_ID_MI}, 50 {BTA_HH_DEVT_KBD, BTA_HH_APP_ID_KB}, 51 {BTA_HH_DEVT_KBD|BTA_HH_DEVT_MIC, BTA_HH_APP_ID_KB}, 52 {BTA_HH_DEVT_RMC, BTA_HH_APP_ID_RMC}, 53 {BTA_HH_DEVT_RMC | BTA_HH_DEVT_KBD, BTA_HH_APP_ID_RMC}, 54 {BTA_HH_DEVT_MIC | BTA_HH_DEVT_DGT, BTA_HH_APP_ID_MI}, 55 {BTA_HH_DEVT_JOS, BTA_HH_APP_ID_JOY}, 56 {BTA_HH_DEVT_GPD, BTA_HH_APP_ID_GPAD}, 57 {BTA_HH_DEVT_UNKNOWN, BTA_HH_APP_ID_3DSG} 58 }; 59 60 61 const tBTA_HH_CFG bta_hh_cfg = 62 { 63 BTA_HH_MAX_DEVT_SPT, /* number of supported type of devices */ 64 p_devt_list, /* ToD & AppID list */ 65 BTA_HH_DISC_BUF_SIZE /* HH SDP discovery database size */ 66 }; 67 68 69 tBTA_HH_CFG *p_bta_hh_cfg = (tBTA_HH_CFG *)&bta_hh_cfg; 70