15738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/****************************************************************************** 25738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 35738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Copyright (C) 2003-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 195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/****************************************************************************** 205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * This is the public interface file for the BTA system manager. 225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project ******************************************************************************/ 245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_SYS_H 255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_H 265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "bt_target.h" 285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "gki.h" 295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/***************************************************************************** 315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Constants and data types 325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/ 33b203d478f4835f5e35217874a1787e1914328f7cAndre Eisenbach 34b203d478f4835f5e35217874a1787e1914328f7cAndre Eisenbach/* vendor specific event handler function type */ 35b203d478f4835f5e35217874a1787e1914328f7cAndre Eisenbachtypedef BOOLEAN (tBTA_SYS_VS_EVT_HDLR)(UINT16 evt, void *p); 365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* event handler function type */ 385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef BOOLEAN (tBTA_SYS_EVT_HDLR)(BT_HDR *p_msg); 395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* disable function type */ 415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (tBTA_SYS_DISABLE)(void); 425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* HW modules */ 455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_HW_BLUETOOTH, 485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_HW_RT, 495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_MAX_HW_MODULES 515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT16 tBTA_SYS_HW_MODULE; 545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_DM_NUM_JV_ID 565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_DM_NUM_JV_ID 2 575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* SW sub-systems */ 605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_SYS 0 /* system manager */ 615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* BLUETOOTH PART - from 0 to BTA_ID_BLUETOOTH_MAX */ 625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_DM 1 /* device manager */ 635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_DM_SEARCH 2 /* device manager search */ 645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_DM_SEC 3 /* device manager security */ 655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_DG 4 /* data gateway */ 665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_AG 5 /* audio gateway */ 675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_OPC 6 /* object push client */ 685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_OPS 7 /* object push server */ 695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_FTS 8 /* file transfer server */ 705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_CT 9 /* cordless telephony terminal */ 715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_FTC 10 /* file transfer client */ 725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_SS 11 /* synchronization server */ 735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_PR 12 /* Printer client */ 745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_BIC 13 /* Basic Imaging Client */ 755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_PAN 14 /* Personal Area Networking */ 765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_BIS 15 /* Basic Imaging Server */ 775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_ACC 16 /* Advanced Camera Client */ 785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_SC 17 /* SIM Card Access server */ 795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_AV 18 /* Advanced audio/video */ 805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_AVK 19 /* Audio/video sink */ 815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_HD 20 /* HID Device */ 825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_CG 21 /* Cordless Gateway */ 835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_BP 22 /* Basic Printing Client */ 845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_HH 23 /* Human Interface Device Host */ 855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_PBS 24 /* Phone Book Access Server */ 865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_PBC 25 /* Phone Book Access Client */ 875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_JV 26 /* Java */ 885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_HS 27 /* Headset */ 895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_MSE 28 /* Message Server Equipment */ 905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_MCE 29 /* Message Client Equipment */ 915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_HL 30 /* Health Device Profile*/ 925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_GATTC 31 /* GATT Client */ 935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_GATTS 32 /* GATT Client */ 948372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz#define BTA_ID_SDP 33 /* SDP Client */ 958372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz#define BTA_ID_BLUETOOTH_MAX 34 /* last BT profile */ 965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* GENERIC */ 985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_PRM 38 995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_SYSTEM 39 /* platform-specific */ 1005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_SWRAP 40 /* Insight script wrapper */ 1015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_MIP 41 /* Multicase Individual Polling */ 1025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_ID_RT 42 /* Audio Routing module: This module is always on. */ 1035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* JV */ 1068372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz#define BTA_ID_JV1 44 /* JV1 */ 1078372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz#define BTA_ID_JV2 45 /* JV2 */ 1085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1098372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz#define BTA_ID_MAX (44 + BTA_DM_NUM_JV_ID) 1105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_SYS_ID; 1125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_CONN_OPEN 0x00 1155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_CONN_CLOSE 0x01 1165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_APP_OPEN 0x02 1175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_APP_CLOSE 0x03 1185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_SCO_OPEN 0x04 1195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_SCO_CLOSE 0x05 1205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_CONN_IDLE 0x06 1215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_CONN_BUSY 0x07 1225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* for link policy */ 1245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_PLCY_SET 0x10 /* set the link policy to the given addr */ 1255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_PLCY_CLR 0x11 /* clear the link policy to the given addr */ 1265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_PLCY_DEF_SET 0x12 /* set the default link policy */ 1275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_PLCY_DEF_CLR 0x13 /* clear the default link policy */ 1285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_ROLE_CHANGE 0x14 /* role change */ 1295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_SYS_CONN_STATUS; 1315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* Bitmask of sys features */ 1335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_FEAT_PCM2 0x0001 1345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_FEAT_PCM2_MASTER 0x0002 1355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* tBTA_PREF_ROLES */ 1375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_SYS_PREF_ROLES; 1385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* conn callback for role / low power manager*/ 1405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (tBTA_SYS_CONN_CBACK)(tBTA_SYS_CONN_STATUS status,UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 1415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* conn callback for role / low power manager*/ 1435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (tBTA_SYS_SSR_CFG_CBACK)(UINT8 id, UINT8 app_id, UINT16 latency, UINT16 tout); 1445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1451e61ce1ae3fe8ef72443b30907f1cf8acae39674Chris Manton#if (BTA_EIR_CANNED_UUID_LIST != TRUE) 1465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* eir callback for adding/removeing UUID */ 1475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (tBTA_SYS_EIR_CBACK)(UINT16 uuid16, BOOLEAN adding); 1485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 1495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* registration structure */ 1515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 1525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_SYS_EVT_HDLR *evt_hdlr; 1545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_SYS_DISABLE *disable; 1555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_SYS_REG; 1565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data type to send events to BTA SYS HW manager */ 1585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct 1595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BT_HDR hdr; 1615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project tBTA_SYS_HW_MODULE hw_module; 1625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_SYS_HW_MSG; 1635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/***************************************************************************** 1655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Global data 1665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/ 1675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* trace level */ 1695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT8 appl_trace_level; 1705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/***************************************************************************** 1725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Macros 1735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/ 1745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* Calculate start of event enumeration; id is top 8 bits of event */ 1765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_SYS_EVT_START(id) ((id) << 8) 1775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/***************************************************************************** 1795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** events for BTA SYS HW manager 1805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/ 1815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* events sent to SYS HW manager - must be kept synchronized with tables in bta_sys_main.c */ 1835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 1845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 1855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project /* device manager local device API events */ 1865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_API_ENABLE_EVT = BTA_SYS_EVT_START(BTA_ID_SYS), 1875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_EVT_ENABLED_EVT, 1885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_EVT_STACK_ENABLED_EVT, 1895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_API_DISABLE_EVT, 1905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_EVT_DISABLED_EVT, 1915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_ERROR_EVT, 1925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_MAX_EVT 1945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 1955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 1985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* SYS HW status events - returned by SYS HW manager to other modules. */ 1995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum 2005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{ 2015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_HW_OFF_EVT, 2025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_HW_ON_EVT, 2035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_HW_STARTING_EVT, 2045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_HW_STOPPING_EVT, 2055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project BTA_SYS_HW_ERROR_EVT 2065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}; 2085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef UINT8 tBTA_SYS_HW_EVT; 2095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* HW enable callback type */ 2115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (tBTA_SYS_HW_CBACK)(tBTA_SYS_HW_EVT status); 2125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/***************************************************************************** 2145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Function declarations 2155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/ 2165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus 2185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern "C" { 2195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 2205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 22124933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void bta_sys_init(void); 22224933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void bta_sys_free(void); 22324933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void bta_sys_event(BT_HDR *p_msg); 22424933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern void bta_sys_set_trace_level(UINT8 level); 2255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_register(UINT8 id, const tBTA_SYS_REG *p_reg); 2265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_deregister(UINT8 id); 2275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern BOOLEAN bta_sys_is_register(UINT8 id); 2285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT16 bta_sys_get_sys_features(void); 2295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_sendmsg(void *p_msg); 2303ca27de478059136506cce747a17856f6470425aSharvil Nanavatiextern void bta_sys_start_timer(TIMER_LIST_ENT *p_tle, UINT16 type, INT32 timeout_ms); 2315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_stop_timer(TIMER_LIST_ENT *p_tle); 2325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_disable(tBTA_SYS_HW_MODULE module); 23376356aee883af67898ddc1aa3b628195f396d42aVenkatRaghavan VijayaRaghavanextern UINT32 bta_sys_get_remaining_ticks(TIMER_LIST_ENT *p_target_tle); 2345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_hw_register( tBTA_SYS_HW_MODULE module, tBTA_SYS_HW_CBACK *cback); 2365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_hw_unregister( tBTA_SYS_HW_MODULE module ); 2375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_rm_register(tBTA_SYS_CONN_CBACK * p_cback); 2405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_pm_register(tBTA_SYS_CONN_CBACK * p_cback); 2415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_policy_register(tBTA_SYS_CONN_CBACK * p_cback); 2435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_sco_register(tBTA_SYS_CONN_CBACK * p_cback); 2445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_conn_open(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_conn_close(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_app_open(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_app_close(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_sco_open(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_sco_close(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_sco_use(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_sco_unuse(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_idle(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_busy(UINT8 id, UINT8 app_id, BD_ADDR peer_addr); 2565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if (BTM_SSR_INCLUDED == TRUE) 2585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_ssr_cfg_register(tBTA_SYS_SSR_CFG_CBACK * p_cback); 2595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_chg_ssr_config (UINT8 id, UINT8 app_id, UINT16 max_latency, UINT16 min_tout); 2605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 2615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_role_chg_register(tBTA_SYS_CONN_CBACK * p_cback); 2635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_notify_role_chg(BD_ADDR_PTR p_bda, UINT8 new_role, UINT8 hci_status); 2645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_collision_register(UINT8 bta_id, tBTA_SYS_CONN_CBACK *p_cback); 2655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_notify_collision (BD_ADDR_PTR p_bda); 2665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2671e61ce1ae3fe8ef72443b30907f1cf8acae39674Chris Manton#if (BTA_EIR_CANNED_UUID_LIST != TRUE) 2685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_eir_register(tBTA_SYS_EIR_CBACK * p_cback); 2695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_add_uuid(UINT16 uuid16); 2705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_remove_uuid(UINT16 uuid16); 2715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#else 2725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define bta_sys_eir_register(ut) 2735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define bta_sys_add_uuid(ut) 2745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define bta_sys_remove_uuid(ut) 2755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 2765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_set_policy (UINT8 id, UINT8 policy, BD_ADDR peer_addr); 2785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_clear_policy (UINT8 id, UINT8 policy, BD_ADDR peer_addr); 2795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_set_default_policy (UINT8 id, UINT8 policy); 2805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void bta_sys_clear_default_policy (UINT8 id, UINT8 policy); 281b203d478f4835f5e35217874a1787e1914328f7cAndre Eisenbachextern BOOLEAN bta_sys_vs_hdl(UINT16 evt, void *p); 2825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus 2845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} 2855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 2865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 2875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif /* BTA_SYS_H */ 288