The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Copyright (C) 1999-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 | #ifndef HCIMSGS_H |
| 20 | #define HCIMSGS_H |
| 21 | |
| 22 | #include "bt_target.h" |
| 23 | #include "hcidefs.h" |
| 24 | #include "bt_types.h" |
| 25 | |
Chris Manton | f857d64 | 2014-09-26 13:31:41 -0700 | [diff] [blame] | 26 | void bte_main_hci_send(BT_HDR *p_msg, UINT16 event); |
| 27 | void bte_main_lpm_allow_bt_device_sleep(void); |
| 28 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 29 | /* Message by message.... */ |
| 30 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 31 | extern BOOLEAN btsnd_hcic_inquiry(const LAP inq_lap, UINT8 duration, |
| 32 | UINT8 response_cnt); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 33 | |
| 34 | #define HCIC_PARAM_SIZE_INQUIRY 5 |
| 35 | |
| 36 | |
| 37 | #define HCIC_INQ_INQ_LAP_OFF 0 |
| 38 | #define HCIC_INQ_DUR_OFF 3 |
| 39 | #define HCIC_INQ_RSP_CNT_OFF 4 |
| 40 | /* Inquiry */ |
| 41 | |
| 42 | /* Inquiry Cancel */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 43 | extern BOOLEAN btsnd_hcic_inq_cancel(void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 44 | |
| 45 | #define HCIC_PARAM_SIZE_INQ_CANCEL 0 |
| 46 | |
| 47 | /* Periodic Inquiry Mode */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 48 | extern BOOLEAN btsnd_hcic_per_inq_mode(UINT16 max_period, UINT16 min_period, |
| 49 | const LAP inq_lap, UINT8 duration, |
| 50 | UINT8 response_cnt); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 51 | |
| 52 | #define HCIC_PARAM_SIZE_PER_INQ_MODE 9 |
| 53 | |
| 54 | #define HCI_PER_INQ_MAX_INTRVL_OFF 0 |
| 55 | #define HCI_PER_INQ_MIN_INTRVL_OFF 2 |
| 56 | #define HCI_PER_INQ_INQ_LAP_OFF 4 |
| 57 | #define HCI_PER_INQ_DURATION_OFF 7 |
| 58 | #define HCI_PER_INQ_RSP_CNT_OFF 8 |
| 59 | /* Periodic Inquiry Mode */ |
| 60 | |
| 61 | /* Exit Periodic Inquiry Mode */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 62 | extern BOOLEAN btsnd_hcic_exit_per_inq(void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 63 | |
| 64 | #define HCIC_PARAM_SIZE_EXIT_PER_INQ 0 |
| 65 | /* Create Connection */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 66 | extern BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types, |
| 67 | UINT8 page_scan_rep_mode, |
| 68 | UINT8 page_scan_mode, |
| 69 | UINT16 clock_offset, |
| 70 | UINT8 allow_switch); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 71 | |
| 72 | #define HCIC_PARAM_SIZE_CREATE_CONN 13 |
| 73 | |
| 74 | #define HCIC_CR_CONN_BD_ADDR_OFF 0 |
| 75 | #define HCIC_CR_CONN_PKT_TYPES_OFF 6 |
| 76 | #define HCIC_CR_CONN_REP_MODE_OFF 8 |
| 77 | #define HCIC_CR_CONN_PAGE_SCAN_MODE_OFF 9 |
| 78 | #define HCIC_CR_CONN_CLK_OFF_OFF 10 |
| 79 | #define HCIC_CR_CONN_ALLOW_SWITCH_OFF 12 |
| 80 | /* Create Connection */ |
| 81 | |
| 82 | /* Disconnect */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 83 | extern BOOLEAN btsnd_hcic_disconnect(UINT16 handle, UINT8 reason); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 84 | |
| 85 | #define HCIC_PARAM_SIZE_DISCONNECT 3 |
| 86 | |
| 87 | #define HCI_DISC_HANDLE_OFF 0 |
| 88 | #define HCI_DISC_REASON_OFF 2 |
| 89 | /* Disconnect */ |
| 90 | |
| 91 | #if BTM_SCO_INCLUDED == TRUE |
| 92 | /* Add SCO Connection */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 93 | extern BOOLEAN btsnd_hcic_add_SCO_conn (UINT16 handle, UINT16 packet_types); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 94 | #endif /* BTM_SCO_INCLUDED */ |
| 95 | |
| 96 | #define HCIC_PARAM_SIZE_ADD_SCO_CONN 4 |
| 97 | |
| 98 | #define HCI_ADD_SCO_HANDLE_OFF 0 |
| 99 | #define HCI_ADD_SCO_PACKET_TYPES_OFF 2 |
| 100 | /* Add SCO Connection */ |
| 101 | |
| 102 | /* Create Connection Cancel */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 103 | extern BOOLEAN btsnd_hcic_create_conn_cancel(BD_ADDR dest); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 104 | |
| 105 | #define HCIC_PARAM_SIZE_CREATE_CONN_CANCEL 6 |
| 106 | |
| 107 | #define HCIC_CR_CONN_CANCEL_BD_ADDR_OFF 0 |
| 108 | /* Create Connection Cancel */ |
| 109 | |
| 110 | /* Accept Connection Request */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 111 | extern BOOLEAN btsnd_hcic_accept_conn (BD_ADDR bd_addr, UINT8 role); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 112 | |
| 113 | #define HCIC_PARAM_SIZE_ACCEPT_CONN 7 |
| 114 | |
| 115 | #define HCI_ACC_CONN_BD_ADDR_OFF 0 |
| 116 | #define HCI_ACC_CONN_ROLE_OFF 6 |
| 117 | /* Accept Connection Request */ |
| 118 | |
| 119 | /* Reject Connection Request */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 120 | extern BOOLEAN btsnd_hcic_reject_conn (BD_ADDR bd_addr, UINT8 reason); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 121 | |
| 122 | #define HCIC_PARAM_SIZE_REJECT_CONN 7 |
| 123 | |
| 124 | #define HCI_REJ_CONN_BD_ADDR_OFF 0 |
| 125 | #define HCI_REJ_CONN_REASON_OFF 6 |
| 126 | /* Reject Connection Request */ |
| 127 | |
| 128 | /* Link Key Request Reply */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 129 | extern BOOLEAN btsnd_hcic_link_key_req_reply (BD_ADDR bd_addr, |
| 130 | LINK_KEY link_key); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 131 | |
| 132 | #define HCIC_PARAM_SIZE_LINK_KEY_REQ_REPLY 22 |
| 133 | |
| 134 | #define HCI_LINK_KEY_REPLY_BD_ADDR_OFF 0 |
| 135 | #define HCI_LINK_KEY_REPLY_LINK_KEY_OFF 6 |
| 136 | /* Link Key Request Reply */ |
| 137 | |
| 138 | /* Link Key Request Neg Reply */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 139 | extern BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 140 | |
| 141 | #define HCIC_PARAM_SIZE_LINK_KEY_NEG_REPLY 6 |
| 142 | |
| 143 | #define HCI_LINK_KEY_NEG_REP_BD_ADR_OFF 0 |
| 144 | /* Link Key Request Neg Reply */ |
| 145 | |
| 146 | /* PIN Code Request Reply */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 147 | extern BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, |
| 148 | UINT8 pin_code_len, |
| 149 | PIN_CODE pin_code); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 150 | |
| 151 | #define HCIC_PARAM_SIZE_PIN_CODE_REQ_REPLY 23 |
| 152 | |
| 153 | #define HCI_PIN_CODE_REPLY_BD_ADDR_OFF 0 |
| 154 | #define HCI_PIN_CODE_REPLY_PIN_LEN_OFF 6 |
| 155 | #define HCI_PIN_CODE_REPLY_PIN_CODE_OFF 7 |
| 156 | /* PIN Code Request Reply */ |
| 157 | |
| 158 | /* Link Key Request Neg Reply */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 159 | extern BOOLEAN btsnd_hcic_pin_code_neg_reply (BD_ADDR bd_addr); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 160 | |
| 161 | #define HCIC_PARAM_SIZE_PIN_CODE_NEG_REPLY 6 |
| 162 | |
| 163 | #define HCI_PIN_CODE_NEG_REP_BD_ADR_OFF 0 |
| 164 | /* Link Key Request Neg Reply */ |
| 165 | |
| 166 | /* Change Connection Type */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 167 | extern BOOLEAN btsnd_hcic_change_conn_type (UINT16 handle, UINT16 packet_types); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 168 | |
| 169 | #define HCIC_PARAM_SIZE_CHANGE_CONN_TYPE 4 |
| 170 | |
| 171 | #define HCI_CHNG_PKT_TYPE_HANDLE_OFF 0 |
| 172 | #define HCI_CHNG_PKT_TYPE_PKT_TYPE_OFF 2 |
| 173 | /* Change Connection Type */ |
| 174 | |
| 175 | #define HCIC_PARAM_SIZE_CMD_HANDLE 2 |
| 176 | |
| 177 | #define HCI_CMD_HANDLE_HANDLE_OFF 0 |
| 178 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 179 | extern BOOLEAN btsnd_hcic_auth_request (UINT16 handle); /* Authentication Request */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 180 | |
| 181 | /* Set Connection Encryption */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 182 | extern BOOLEAN btsnd_hcic_set_conn_encrypt (UINT16 handle, BOOLEAN enable); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 183 | #define HCIC_PARAM_SIZE_SET_CONN_ENCRYPT 3 |
| 184 | |
| 185 | |
| 186 | #define HCI_SET_ENCRYPT_HANDLE_OFF 0 |
| 187 | #define HCI_SET_ENCRYPT_ENABLE_OFF 2 |
| 188 | /* Set Connection Encryption */ |
| 189 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 190 | /* Remote Name Request */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 191 | extern BOOLEAN btsnd_hcic_rmt_name_req (BD_ADDR bd_addr, |
| 192 | UINT8 page_scan_rep_mode, |
| 193 | UINT8 page_scan_mode, |
| 194 | UINT16 clock_offset); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 195 | |
| 196 | #define HCIC_PARAM_SIZE_RMT_NAME_REQ 10 |
| 197 | |
| 198 | #define HCI_RMT_NAME_BD_ADDR_OFF 0 |
| 199 | #define HCI_RMT_NAME_REP_MODE_OFF 6 |
| 200 | #define HCI_RMT_NAME_PAGE_SCAN_MODE_OFF 7 |
| 201 | #define HCI_RMT_NAME_CLK_OFF_OFF 8 |
| 202 | /* Remote Name Request */ |
| 203 | |
| 204 | /* Remote Name Request Cancel */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 205 | extern BOOLEAN btsnd_hcic_rmt_name_req_cancel(BD_ADDR bd_addr); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 206 | |
| 207 | #define HCIC_PARAM_SIZE_RMT_NAME_REQ_CANCEL 6 |
| 208 | |
| 209 | #define HCI_RMT_NAME_CANCEL_BD_ADDR_OFF 0 |
| 210 | /* Remote Name Request Cancel */ |
| 211 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 212 | extern BOOLEAN btsnd_hcic_rmt_features_req(UINT16 handle); /* Remote Features Request */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 213 | |
| 214 | /* Remote Extended Features */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 215 | extern BOOLEAN btsnd_hcic_rmt_ext_features(UINT16 handle, UINT8 page_num); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 216 | |
| 217 | #define HCIC_PARAM_SIZE_RMT_EXT_FEATURES 3 |
| 218 | |
| 219 | #define HCI_RMT_EXT_FEATURES_HANDLE_OFF 0 |
| 220 | #define HCI_RMT_EXT_FEATURES_PAGE_NUM_OFF 2 |
| 221 | /* Remote Extended Features */ |
| 222 | |
| 223 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 224 | extern BOOLEAN btsnd_hcic_rmt_ver_req(UINT16 handle); /* Remote Version Info Request */ |
| 225 | extern BOOLEAN btsnd_hcic_read_rmt_clk_offset(UINT16 handle); /* Remote Clock Offset */ |
| 226 | extern BOOLEAN btsnd_hcic_read_lmp_handle(UINT16 handle); /* Remote LMP Handle */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 227 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 228 | extern BOOLEAN btsnd_hcic_setup_esco_conn (UINT16 handle, |
| 229 | UINT32 tx_bw, UINT32 rx_bw, |
| 230 | UINT16 max_latency, UINT16 voice, |
| 231 | UINT8 retrans_effort, |
| 232 | UINT16 packet_types); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 233 | #define HCIC_PARAM_SIZE_SETUP_ESCO 17 |
| 234 | |
| 235 | #define HCI_SETUP_ESCO_HANDLE_OFF 0 |
| 236 | #define HCI_SETUP_ESCO_TX_BW_OFF 2 |
| 237 | #define HCI_SETUP_ESCO_RX_BW_OFF 6 |
| 238 | #define HCI_SETUP_ESCO_MAX_LAT_OFF 10 |
| 239 | #define HCI_SETUP_ESCO_VOICE_OFF 12 |
| 240 | #define HCI_SETUP_ESCO_RETRAN_EFF_OFF 14 |
| 241 | #define HCI_SETUP_ESCO_PKT_TYPES_OFF 15 |
| 242 | |
| 243 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 244 | extern BOOLEAN btsnd_hcic_accept_esco_conn (BD_ADDR bd_addr, |
| 245 | UINT32 tx_bw, UINT32 rx_bw, |
| 246 | UINT16 max_latency, |
| 247 | UINT16 content_fmt, |
| 248 | UINT8 retrans_effort, |
| 249 | UINT16 packet_types); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 250 | #define HCIC_PARAM_SIZE_ACCEPT_ESCO 21 |
| 251 | |
| 252 | #define HCI_ACCEPT_ESCO_BDADDR_OFF 0 |
| 253 | #define HCI_ACCEPT_ESCO_TX_BW_OFF 6 |
| 254 | #define HCI_ACCEPT_ESCO_RX_BW_OFF 10 |
| 255 | #define HCI_ACCEPT_ESCO_MAX_LAT_OFF 14 |
| 256 | #define HCI_ACCEPT_ESCO_VOICE_OFF 16 |
| 257 | #define HCI_ACCEPT_ESCO_RETRAN_EFF_OFF 18 |
| 258 | #define HCI_ACCEPT_ESCO_PKT_TYPES_OFF 19 |
| 259 | |
| 260 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 261 | extern BOOLEAN btsnd_hcic_reject_esco_conn (BD_ADDR bd_addr, UINT8 reason); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 262 | #define HCIC_PARAM_SIZE_REJECT_ESCO 7 |
| 263 | |
| 264 | #define HCI_REJECT_ESCO_BDADDR_OFF 0 |
| 265 | #define HCI_REJECT_ESCO_REASON_OFF 6 |
| 266 | |
| 267 | /* Hold Mode */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 268 | extern BOOLEAN btsnd_hcic_hold_mode(UINT16 handle, UINT16 max_hold_period, |
| 269 | UINT16 min_hold_period); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 270 | |
| 271 | #define HCIC_PARAM_SIZE_HOLD_MODE 6 |
| 272 | |
| 273 | #define HCI_HOLD_MODE_HANDLE_OFF 0 |
| 274 | #define HCI_HOLD_MODE_MAX_PER_OFF 2 |
| 275 | #define HCI_HOLD_MODE_MIN_PER_OFF 4 |
| 276 | /* Hold Mode */ |
| 277 | |
| 278 | /* Sniff Mode */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 279 | extern BOOLEAN btsnd_hcic_sniff_mode(UINT16 handle, |
| 280 | UINT16 max_sniff_period, |
| 281 | UINT16 min_sniff_period, |
| 282 | UINT16 sniff_attempt, |
| 283 | UINT16 sniff_timeout); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 284 | |
| 285 | #define HCIC_PARAM_SIZE_SNIFF_MODE 10 |
| 286 | |
| 287 | |
| 288 | #define HCI_SNIFF_MODE_HANDLE_OFF 0 |
| 289 | #define HCI_SNIFF_MODE_MAX_PER_OFF 2 |
| 290 | #define HCI_SNIFF_MODE_MIN_PER_OFF 4 |
| 291 | #define HCI_SNIFF_MODE_ATTEMPT_OFF 6 |
| 292 | #define HCI_SNIFF_MODE_TIMEOUT_OFF 8 |
| 293 | /* Sniff Mode */ |
| 294 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 295 | extern BOOLEAN btsnd_hcic_exit_sniff_mode(UINT16 handle); /* Exit Sniff Mode */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 296 | |
| 297 | /* Park Mode */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 298 | extern BOOLEAN btsnd_hcic_park_mode (UINT16 handle, |
| 299 | UINT16 beacon_max_interval, |
| 300 | UINT16 beacon_min_interval); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 301 | |
| 302 | #define HCIC_PARAM_SIZE_PARK_MODE 6 |
| 303 | |
| 304 | #define HCI_PARK_MODE_HANDLE_OFF 0 |
| 305 | #define HCI_PARK_MODE_MAX_PER_OFF 2 |
| 306 | #define HCI_PARK_MODE_MIN_PER_OFF 4 |
| 307 | /* Park Mode */ |
| 308 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 309 | extern BOOLEAN btsnd_hcic_exit_park_mode(UINT16 handle); /* Exit Park Mode */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 310 | |
| 311 | /* QoS Setup */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 312 | extern BOOLEAN btsnd_hcic_qos_setup (UINT16 handle, UINT8 flags, |
| 313 | UINT8 service_type, |
| 314 | UINT32 token_rate, UINT32 peak, |
| 315 | UINT32 latency, UINT32 delay_var); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 316 | |
| 317 | #define HCIC_PARAM_SIZE_QOS_SETUP 20 |
| 318 | |
| 319 | #define HCI_QOS_HANDLE_OFF 0 |
| 320 | #define HCI_QOS_FLAGS_OFF 2 |
| 321 | #define HCI_QOS_SERVICE_TYPE_OFF 3 |
| 322 | #define HCI_QOS_TOKEN_RATE_OFF 4 |
| 323 | #define HCI_QOS_PEAK_BANDWIDTH_OFF 8 |
| 324 | #define HCI_QOS_LATENCY_OFF 12 |
| 325 | #define HCI_QOS_DELAY_VAR_OFF 16 |
| 326 | /* QoS Setup */ |
| 327 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 328 | /* Switch Role Request */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 329 | extern BOOLEAN btsnd_hcic_switch_role (BD_ADDR bd_addr, UINT8 role); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 330 | |
| 331 | #define HCIC_PARAM_SIZE_SWITCH_ROLE 7 |
| 332 | |
| 333 | #define HCI_SWITCH_BD_ADDR_OFF 0 |
| 334 | #define HCI_SWITCH_ROLE_OFF 6 |
| 335 | /* Switch Role Request */ |
| 336 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 337 | /* Write Policy Settings */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 338 | extern BOOLEAN btsnd_hcic_write_policy_set(UINT16 handle, UINT16 settings); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 339 | |
| 340 | #define HCIC_PARAM_SIZE_WRITE_POLICY_SET 4 |
| 341 | |
| 342 | #define HCI_WRITE_POLICY_HANDLE_OFF 0 |
| 343 | #define HCI_WRITE_POLICY_SETTINGS_OFF 2 |
| 344 | /* Write Policy Settings */ |
| 345 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 346 | /* Write Default Policy Settings */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 347 | extern BOOLEAN btsnd_hcic_write_def_policy_set(UINT16 settings); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 348 | |
| 349 | #define HCIC_PARAM_SIZE_WRITE_DEF_POLICY_SET 2 |
| 350 | |
| 351 | #define HCI_WRITE_DEF_POLICY_SETTINGS_OFF 0 |
| 352 | /* Write Default Policy Settings */ |
| 353 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 354 | /****************************************** |
| 355 | ** Lisbon Features |
| 356 | *******************************************/ |
| 357 | #if BTM_SSR_INCLUDED == TRUE |
| 358 | /* Sniff Subrating */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 359 | extern BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat, |
| 360 | UINT16 min_remote_lat, |
| 361 | UINT16 min_local_lat); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 362 | |
| 363 | #define HCIC_PARAM_SIZE_SNIFF_SUB_RATE 8 |
| 364 | |
| 365 | #define HCI_SNIFF_SUB_RATE_HANDLE_OFF 0 |
| 366 | #define HCI_SNIFF_SUB_RATE_MAX_LAT_OFF 2 |
| 367 | #define HCI_SNIFF_SUB_RATE_MIN_REM_LAT_OFF 4 |
| 368 | #define HCI_SNIFF_SUB_RATE_MIN_LOC_LAT_OFF 6 |
| 369 | /* Sniff Subrating */ |
| 370 | |
| 371 | #else /* BTM_SSR_INCLUDED == FALSE */ |
| 372 | |
| 373 | #define btsnd_hcic_sniff_sub_rate(handle, max_lat, min_remote_lat, min_local_lat) FALSE |
| 374 | |
| 375 | #endif /* BTM_SSR_INCLUDED */ |
| 376 | |
| 377 | /* Extended Inquiry Response */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 378 | extern void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 379 | |
| 380 | #define HCIC_PARAM_SIZE_EXT_INQ_RESP 241 |
| 381 | |
| 382 | #define HCIC_EXT_INQ_RESP_FEC_OFF 0 |
| 383 | #define HCIC_EXT_INQ_RESP_RESPONSE 1 |
Chris Manton | 1e61ce1 | 2014-10-24 09:12:41 -0700 | [diff] [blame] | 384 | /* IO Capabilities Response */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 385 | extern BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capability, |
| 386 | UINT8 oob_present, UINT8 auth_req); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 387 | |
| 388 | #define HCIC_PARAM_SIZE_IO_CAP_RESP 9 |
| 389 | |
| 390 | #define HCI_IO_CAP_BD_ADDR_OFF 0 |
| 391 | #define HCI_IO_CAPABILITY_OFF 6 |
| 392 | #define HCI_IO_CAP_OOB_DATA_OFF 7 |
| 393 | #define HCI_IO_CAP_AUTH_REQ_OFF 8 |
| 394 | |
| 395 | /* IO Capabilities Req Neg Reply */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 396 | extern BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 err_code); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 397 | |
| 398 | #define HCIC_PARAM_SIZE_IO_CAP_NEG_REPLY 7 |
| 399 | |
| 400 | #define HCI_IO_CAP_NR_BD_ADDR_OFF 0 |
| 401 | #define HCI_IO_CAP_NR_ERR_CODE 6 |
| 402 | |
| 403 | /* Read Local OOB Data */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 404 | extern BOOLEAN btsnd_hcic_read_local_oob_data (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 405 | |
| 406 | #define HCIC_PARAM_SIZE_R_LOCAL_OOB 0 |
| 407 | |
| 408 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 409 | extern BOOLEAN btsnd_hcic_user_conf_reply (BD_ADDR bd_addr, BOOLEAN is_yes); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 410 | |
| 411 | #define HCIC_PARAM_SIZE_UCONF_REPLY 6 |
| 412 | |
| 413 | #define HCI_USER_CONF_BD_ADDR_OFF 0 |
| 414 | |
| 415 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 416 | extern BOOLEAN btsnd_hcic_user_passkey_reply (BD_ADDR bd_addr, UINT32 value); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 417 | |
| 418 | #define HCIC_PARAM_SIZE_U_PKEY_REPLY 10 |
| 419 | |
| 420 | #define HCI_USER_PASSKEY_BD_ADDR_OFF 0 |
| 421 | #define HCI_USER_PASSKEY_VALUE_OFF 6 |
| 422 | |
| 423 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 424 | extern BOOLEAN btsnd_hcic_user_passkey_neg_reply (BD_ADDR bd_addr); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 425 | |
| 426 | #define HCIC_PARAM_SIZE_U_PKEY_NEG_REPLY 6 |
| 427 | |
| 428 | #define HCI_USER_PASSKEY_NEG_BD_ADDR_OFF 0 |
| 429 | |
| 430 | /* Remote OOB Data Request Reply */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 431 | extern BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c, |
| 432 | UINT8 *p_r); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 433 | |
| 434 | #define HCIC_PARAM_SIZE_REM_OOB_REPLY 38 |
| 435 | |
| 436 | #define HCI_REM_OOB_DATA_BD_ADDR_OFF 0 |
| 437 | #define HCI_REM_OOB_DATA_C_OFF 6 |
| 438 | #define HCI_REM_OOB_DATA_R_OFF 22 |
| 439 | |
| 440 | /* Remote OOB Data Request Negative Reply */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 441 | extern BOOLEAN btsnd_hcic_rem_oob_neg_reply (BD_ADDR bd_addr); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 442 | |
| 443 | #define HCIC_PARAM_SIZE_REM_OOB_NEG_REPLY 6 |
| 444 | |
| 445 | #define HCI_REM_OOB_DATA_NEG_BD_ADDR_OFF 0 |
| 446 | |
| 447 | /* Read Tx Power Level */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 448 | extern BOOLEAN btsnd_hcic_read_inq_tx_power (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 449 | |
| 450 | #define HCIC_PARAM_SIZE_R_TX_POWER 0 |
| 451 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 452 | /* Read Default Erroneous Data Reporting */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 453 | extern BOOLEAN btsnd_hcic_read_default_erroneous_data_rpt (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 454 | |
| 455 | #define HCIC_PARAM_SIZE_R_ERR_DATA_RPT 0 |
| 456 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 457 | #if L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 458 | extern BOOLEAN btsnd_hcic_enhanced_flush (UINT16 handle, UINT8 packet_type); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 459 | |
| 460 | #define HCIC_PARAM_SIZE_ENHANCED_FLUSH 3 |
| 461 | #endif |
| 462 | |
| 463 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 464 | extern BOOLEAN btsnd_hcic_send_keypress_notif (BD_ADDR bd_addr, UINT8 notif); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 465 | |
| 466 | #define HCIC_PARAM_SIZE_SEND_KEYPRESS_NOTIF 7 |
| 467 | |
| 468 | #define HCI_SEND_KEYPRESS_NOTIF_BD_ADDR_OFF 0 |
| 469 | #define HCI_SEND_KEYPRESS_NOTIF_NOTIF_OFF 6 |
| 470 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 471 | /**** end of Simple Pairing Commands ****/ |
| 472 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 473 | /* Store Current Settings */ |
| 474 | #define MAX_FILT_COND (sizeof (BD_ADDR) + 1) |
| 475 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 476 | extern BOOLEAN btsnd_hcic_set_event_filter(UINT8 filt_type, |
| 477 | UINT8 filt_cond_type, |
| 478 | UINT8 *filt_cond, |
| 479 | UINT8 filt_cond_len); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 480 | |
| 481 | #define HCIC_PARAM_SIZE_SET_EVT_FILTER 9 |
| 482 | |
| 483 | #define HCI_FILT_COND_FILT_TYPE_OFF 0 |
| 484 | #define HCI_FILT_COND_COND_TYPE_OFF 1 |
| 485 | #define HCI_FILT_COND_FILT_OFF 2 |
| 486 | /* Set Event Filter */ |
| 487 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 488 | /* Delete Stored Key */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 489 | extern BOOLEAN btsnd_hcic_delete_stored_key (BD_ADDR bd_addr, BOOLEAN delete_all_flag); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 490 | |
| 491 | #define HCIC_PARAM_SIZE_DELETE_STORED_KEY 7 |
| 492 | |
| 493 | #define HCI_DELETE_KEY_BD_ADDR_OFF 0 |
| 494 | #define HCI_DELETE_KEY_ALL_FLAG_OFF 6 |
| 495 | /* Delete Stored Key */ |
| 496 | |
Bandari Ramesh | 6b77cf6 | 2016-09-26 19:43:24 +0530 | [diff] [blame] | 497 | extern BOOLEAN btsnd_hcic_reset(UINT8 local_controller_id); /* Reset */ |
| 498 | |
| 499 | #define HCIC_PARAM_SIZE_RESET 0 /* Reset */ |
| 500 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 501 | /* Change Local Name */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 502 | extern BOOLEAN btsnd_hcic_change_name(BD_NAME name); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 503 | |
| 504 | #define HCIC_PARAM_SIZE_CHANGE_NAME BD_NAME_LEN |
| 505 | |
| 506 | #define HCI_CHANGE_NAME_NAME_OFF 0 |
| 507 | /* Change Local Name */ |
| 508 | |
| 509 | |
| 510 | #define HCIC_PARAM_SIZE_READ_CMD 0 |
| 511 | |
| 512 | #define HCIC_PARAM_SIZE_WRITE_PARAM1 1 |
| 513 | |
| 514 | #define HCIC_WRITE_PARAM1_PARAM_OFF 0 |
| 515 | |
| 516 | #define HCIC_PARAM_SIZE_WRITE_PARAM2 2 |
| 517 | |
| 518 | #define HCIC_WRITE_PARAM2_PARAM_OFF 0 |
| 519 | |
| 520 | #define HCIC_PARAM_SIZE_WRITE_PARAM3 3 |
| 521 | |
| 522 | #define HCIC_WRITE_PARAM3_PARAM_OFF 0 |
| 523 | |
Sunny Kapdi | 3d5a283 | 2017-04-05 17:32:01 -0700 | [diff] [blame] | 524 | #define HCIC_PARAM_SIZE_WRITE_PARAM4 4 |
| 525 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 526 | #define HCIC_PARAM_SIZE_SET_AFH_CHANNELS 10 |
| 527 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 528 | extern BOOLEAN btsnd_hcic_write_pin_type(UINT8 type); /* Write PIN Type */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 529 | extern BOOLEAN btsnd_hcic_write_auto_accept(UINT8 flag); /* Write Auto Accept */ |
| 530 | extern BOOLEAN btsnd_hcic_read_name (void); /* Read Local Name */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 531 | extern BOOLEAN btsnd_hcic_write_page_tout(UINT16 timeout); /* Write Page Timout */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 532 | extern BOOLEAN btsnd_hcic_write_scan_enable(UINT8 flag); /* Write Scan Enable */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 533 | extern BOOLEAN btsnd_hcic_write_pagescan_cfg(UINT16 interval, |
| 534 | UINT16 window); /* Write Page Scan Activity */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 535 | |
| 536 | #define HCIC_PARAM_SIZE_WRITE_PAGESCAN_CFG 4 |
| 537 | |
| 538 | #define HCI_SCAN_CFG_INTERVAL_OFF 0 |
| 539 | #define HCI_SCAN_CFG_WINDOW_OFF 2 |
| 540 | /* Write Page Scan Activity */ |
| 541 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 542 | /* Write Inquiry Scan Activity */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 543 | extern BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 544 | |
| 545 | #define HCIC_PARAM_SIZE_WRITE_INQSCAN_CFG 4 |
| 546 | |
| 547 | #define HCI_SCAN_CFG_INTERVAL_OFF 0 |
| 548 | #define HCI_SCAN_CFG_WINDOW_OFF 2 |
| 549 | /* Write Inquiry Scan Activity */ |
| 550 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 551 | extern BOOLEAN btsnd_hcic_write_auth_enable(UINT8 flag); /* Write Authentication Enable */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 552 | extern BOOLEAN btsnd_hcic_write_dev_class(DEV_CLASS dev); /* Write Class of Device */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 553 | extern BOOLEAN btsnd_hcic_write_voice_settings(UINT16 flags); /* Write Voice Settings */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 554 | |
| 555 | /* Host Controller to Host flow control */ |
| 556 | #define HCI_HOST_FLOW_CTRL_OFF 0 |
| 557 | #define HCI_HOST_FLOW_CTRL_ACL_ON 1 |
| 558 | #define HCI_HOST_FLOW_CTRL_SCO_ON 2 |
| 559 | #define HCI_HOST_FLOW_CTRL_BOTH_ON 3 |
| 560 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 561 | extern BOOLEAN btsnd_hcic_write_auto_flush_tout(UINT16 handle, |
| 562 | UINT16 timeout); /* Write Retransmit Timout */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 563 | |
| 564 | #define HCIC_PARAM_SIZE_WRITE_AUTO_FLUSH_TOUT 4 |
| 565 | |
| 566 | #define HCI_FLUSH_TOUT_HANDLE_OFF 0 |
| 567 | #define HCI_FLUSH_TOUT_TOUT_OFF 2 |
| 568 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 569 | extern BOOLEAN btsnd_hcic_read_tx_power(UINT16 handle, UINT8 type); /* Read Tx Power */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 570 | |
| 571 | #define HCIC_PARAM_SIZE_READ_TX_POWER 3 |
| 572 | |
| 573 | #define HCI_READ_TX_POWER_HANDLE_OFF 0 |
| 574 | #define HCI_READ_TX_POWER_TYPE_OFF 2 |
| 575 | |
| 576 | /* Read transmit power level parameter */ |
| 577 | #define HCI_READ_CURRENT 0x00 |
| 578 | #define HCI_READ_MAXIMUM 0x01 |
| 579 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 580 | extern BOOLEAN btsnd_hcic_host_num_xmitted_pkts (UINT8 num_handles, |
| 581 | UINT16 *handle, |
| 582 | UINT16 *num_pkts); /* Set Host Buffer Size */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 583 | |
| 584 | #define HCIC_PARAM_SIZE_NUM_PKTS_DONE_SIZE sizeof(btmsg_hcic_num_pkts_done_t) |
| 585 | |
| 586 | #define MAX_DATA_HANDLES 10 |
| 587 | |
| 588 | #define HCI_PKTS_DONE_NUM_HANDLES_OFF 0 |
| 589 | #define HCI_PKTS_DONE_HANDLE_OFF 1 |
| 590 | #define HCI_PKTS_DONE_NUM_PKTS_OFF 3 |
| 591 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 592 | /* Write Link Supervision Timeout */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 593 | extern BOOLEAN btsnd_hcic_write_link_super_tout(UINT8 local_controller_id, UINT16 handle, UINT16 timeout); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 594 | |
| 595 | #define HCIC_PARAM_SIZE_WRITE_LINK_SUPER_TOUT 4 |
| 596 | |
| 597 | #define HCI_LINK_SUPER_TOUT_HANDLE_OFF 0 |
| 598 | #define HCI_LINK_SUPER_TOUT_TOUT_OFF 2 |
| 599 | /* Write Link Supervision Timeout */ |
| 600 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 601 | extern BOOLEAN btsnd_hcic_write_cur_iac_lap (UINT8 num_cur_iac, |
| 602 | LAP * const iac_lap); /* Write Current IAC LAP */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 603 | |
| 604 | #define MAX_IAC_LAPS 0x40 |
| 605 | |
| 606 | #define HCI_WRITE_IAC_LAP_NUM_OFF 0 |
| 607 | #define HCI_WRITE_IAC_LAP_LAP_OFF 1 |
| 608 | /* Write Current IAC LAP */ |
| 609 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 610 | extern BOOLEAN btsnd_hcic_get_link_quality (UINT16 handle); /* Get Link Quality */ |
| 611 | extern BOOLEAN btsnd_hcic_read_rssi (UINT16 handle); /* Read RSSI */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 612 | extern BOOLEAN btsnd_hcic_enable_test_mode (void); /* Enable Device Under Test Mode */ |
| 613 | extern BOOLEAN btsnd_hcic_write_pagescan_type(UINT8 type); /* Write Page Scan Type */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 614 | extern BOOLEAN btsnd_hcic_write_inqscan_type(UINT8 type); /* Write Inquiry Scan Type */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 615 | extern BOOLEAN btsnd_hcic_write_inquiry_mode(UINT8 type); /* Write Inquiry Mode */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 616 | |
| 617 | #define HCI_DATA_HANDLE_MASK 0x0FFF |
| 618 | |
| 619 | #define HCID_GET_HANDLE_EVENT(p) (UINT16)((*((UINT8 *)((p) + 1) + p->offset) + \ |
| 620 | (*((UINT8 *)((p) + 1) + p->offset + 1) << 8))) |
| 621 | |
| 622 | #define HCID_GET_HANDLE(u16) (UINT16)((u16) & HCI_DATA_HANDLE_MASK) |
| 623 | |
| 624 | #define HCI_DATA_EVENT_MASK 3 |
| 625 | #define HCI_DATA_EVENT_OFFSET 12 |
| 626 | #define HCID_GET_EVENT(u16) (UINT8)(((u16) >> HCI_DATA_EVENT_OFFSET) & HCI_DATA_EVENT_MASK) |
| 627 | |
| 628 | #define HCI_DATA_BCAST_MASK 3 |
| 629 | #define HCI_DATA_BCAST_OFFSET 10 |
| 630 | #define HCID_GET_BCAST(u16) (UINT8)(((u16) >> HCI_DATA_BCAST_OFFSET) & HCI_DATA_BCAST_MASK) |
| 631 | |
| 632 | #define HCID_GET_ACL_LEN(p) (UINT16)((*((UINT8 *)((p) + 1) + p->offset + 2) + \ |
| 633 | (*((UINT8 *)((p) + 1) + p->offset + 3) << 8))) |
| 634 | |
| 635 | #define HCID_HEADER_SIZE 4 |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 636 | |
| 637 | #define HCID_GET_SCO_LEN(p) (*((UINT8 *)((p) + 1) + p->offset + 2)) |
Srinu Jella | 895e852 | 2013-12-06 15:25:26 +0530 | [diff] [blame] | 638 | extern void btsnd_hcic_raw_cmd (void *buffer, UINT16 opcode, UINT8 len, |
| 639 | UINT8 *p_data, void *p_cmd_cplt_cback); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 640 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 641 | extern void btsnd_hcic_vendor_spec_cmd (void *buffer, UINT16 opcode, |
| 642 | UINT8 len, UINT8 *p_data, |
| 643 | void *p_cmd_cplt_cback); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 644 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 645 | #if (BLE_INCLUDED == TRUE) |
| 646 | /******************************************************************************** |
| 647 | ** BLE Commands |
| 648 | ** Note: "local_controller_id" is for transport, not counted in HCI message size |
| 649 | *********************************************************************************/ |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 650 | #define HCIC_BLE_RAND_DI_SIZE 8 |
| 651 | #define HCIC_BLE_ENCRYT_KEY_SIZE 16 |
| 652 | #define HCIC_BLE_IRK_SIZE 16 |
| 653 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 654 | #define HCIC_PARAM_SIZE_SET_USED_FEAT_CMD 8 |
| 655 | #define HCIC_PARAM_SIZE_WRITE_RANDOM_ADDR_CMD 6 |
| 656 | #define HCIC_PARAM_SIZE_BLE_WRITE_ADV_PARAMS 15 |
| 657 | #define HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP 31 |
| 658 | #define HCIC_PARAM_SIZE_WRITE_ADV_ENABLE 1 |
| 659 | #define HCIC_PARAM_SIZE_BLE_WRITE_SCAN_PARAM 7 |
| 660 | #define HCIC_PARAM_SIZE_BLE_WRITE_SCAN_ENABLE 2 |
Subramanian Srinivasan | 9c9c752 | 2016-07-11 13:01:37 -0700 | [diff] [blame] | 661 | |
| 662 | #define HCIC_PARAM_SIZE_BLE_WRITE_EXT_SCAN_PARAM 8 |
| 663 | #define HCIC_PARAM_SIZE_BLE_WRITE_EXT_SCAN_ENABLE 6 |
| 664 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 665 | #define HCIC_PARAM_SIZE_BLE_CREATE_LL_CONN 25 |
| 666 | #define HCIC_PARAM_SIZE_BLE_CREATE_CONN_CANCEL 0 |
Subramanian Srinivasan | 9c9c752 | 2016-07-11 13:01:37 -0700 | [diff] [blame] | 667 | #define HCIC_PARAM_SIZE_BLE_EXT_CREATE_LL_CONN 26 |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 668 | #define HCIC_PARAM_SIZE_CLEAR_WHITE_LIST 0 |
| 669 | #define HCIC_PARAM_SIZE_ADD_WHITE_LIST 7 |
| 670 | #define HCIC_PARAM_SIZE_REMOVE_WHITE_LIST 7 |
| 671 | #define HCIC_PARAM_SIZE_BLE_UPD_LL_CONN_PARAMS 14 |
| 672 | #define HCIC_PARAM_SIZE_SET_HOST_CHNL_CLASS 5 |
| 673 | #define HCIC_PARAM_SIZE_READ_CHNL_MAP 2 |
| 674 | #define HCIC_PARAM_SIZE_BLE_READ_REMOTE_FEAT 2 |
| 675 | #define HCIC_PARAM_SIZE_BLE_ENCRYPT 32 |
| 676 | #define HCIC_PARAM_SIZE_BLE_RAND 0 |
Priti Aghera | 636d671 | 2014-12-18 13:55:48 -0800 | [diff] [blame] | 677 | #define HCIC_PARAM_SIZE_WRITE_LE_HOST_SUPPORTED 2 |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 678 | |
| 679 | #define HCIC_BLE_RAND_DI_SIZE 8 |
| 680 | #define HCIC_BLE_ENCRYT_KEY_SIZE 16 |
| 681 | #define HCIC_PARAM_SIZE_BLE_START_ENC (4 + HCIC_BLE_RAND_DI_SIZE + HCIC_BLE_ENCRYT_KEY_SIZE) |
| 682 | #define HCIC_PARAM_SIZE_LTK_REQ_REPLY (2 + HCIC_BLE_ENCRYT_KEY_SIZE) |
Priti Aghera | 636d671 | 2014-12-18 13:55:48 -0800 | [diff] [blame] | 683 | #define HCIC_PARAM_SIZE_LTK_REQ_NEG_REPLY 2 |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 684 | #define HCIC_BLE_CHNL_MAP_SIZE 5 |
| 685 | #define HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA 31 |
| 686 | |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 687 | #define HCIC_PARAM_SIZE_BLE_ADD_DEV_RESOLVING_LIST (7 + HCIC_BLE_IRK_SIZE * 2) |
| 688 | #define HCIC_PARAM_SIZE_BLE_RM_DEV_RESOLVING_LIST 7 |
Nitin Arora | 36fa3c5 | 2016-11-02 15:26:09 -0700 | [diff] [blame] | 689 | #define HCIC_PARAM_SIZE_BLE_SET_PRIVACY_MODE 8 |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 690 | #define HCIC_PARAM_SIZE_BLE_CLEAR_RESOLVING_LIST 0 |
| 691 | #define HCIC_PARAM_SIZE_BLE_READ_RESOLVING_LIST_SIZE 0 |
| 692 | #define HCIC_PARAM_SIZE_BLE_READ_RESOLVABLE_ADDR_PEER 7 |
| 693 | #define HCIC_PARAM_SIZE_BLE_READ_RESOLVABLE_ADDR_LOCAL 7 |
| 694 | #define HCIC_PARAM_SIZE_BLE_SET_ADDR_RESOLUTION_ENABLE 1 |
| 695 | #define HCIC_PARAM_SIZE_BLE_SET_RAND_PRIV_ADDR_TIMOUT 2 |
Priti Aghera | 636d671 | 2014-12-18 13:55:48 -0800 | [diff] [blame] | 696 | #define HCIC_PARAM_SIZE_BLE_SET_DATA_LENGTH 6 |
Andre Eisenbach | 7113d8a | 2015-05-21 17:07:21 -0700 | [diff] [blame] | 697 | #define HCIC_PARAM_SIZE_BLE_WRITE_EXTENDED_SCAN_PARAM 11 |
Nitin Arora | 6bcfadd | 2015-10-29 18:21:35 -0700 | [diff] [blame] | 698 | #define HCIC_PARAM_SIZE_BLE_WRITE_DEFAULT_PHY 3 |
| 699 | #define HCIC_PARAM_SIZE_BLE_WRITE_PHY 7 |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 700 | |
Nitin Arora | bd46d60 | 2016-02-24 18:15:44 -0800 | [diff] [blame] | 701 | #define HCIC_PARAM_SIZE_BLE_WRITE_EXTENDED_ADV_PARAMS 25 |
Subramanian Srinivasan | 9c9c752 | 2016-07-11 13:01:37 -0700 | [diff] [blame] | 702 | #define HCIC_PARAM_SIZE_BLE_WRITE_EXTENDED_ADV_DATA 251 |
| 703 | #define HCIC_PARAM_SIZE_BLE_WRITE_EXTENDED_SCAN_RSP 251 |
Nitin Arora | bd46d60 | 2016-02-24 18:15:44 -0800 | [diff] [blame] | 704 | #define HCIC_PARAM_SIZE_WRITE_EXTENDED_ADV_ENABLE 2 |
| 705 | #define HCIC_PARAM_SIZE_WRITE_EXTENDED_ADV_RPA 7 |
| 706 | |
Subramanian Srinivasan | 9c9c752 | 2016-07-11 13:01:37 -0700 | [diff] [blame] | 707 | #define HCIC_SCAN_PHY_LE_1M 1 |
| 708 | #define HCIC_SCAN_PHY_LE_CODED 4 |
| 709 | #define HCIC_SCAN_PHY_LE_1M_CODED 5 |
| 710 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 711 | /* ULP HCI command */ |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 712 | extern BOOLEAN btsnd_hcic_ble_set_evt_mask (BT_EVENT_MASK event_mask); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 713 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 714 | extern BOOLEAN btsnd_hcic_ble_read_buffer_size (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 715 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 716 | extern BOOLEAN btsnd_hcic_ble_read_local_spt_feat (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 717 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 718 | extern BOOLEAN btsnd_hcic_ble_set_local_used_feat (UINT8 feat_set[8]); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 719 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 720 | extern BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_addr); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 721 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 722 | extern BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max, |
| 723 | UINT8 adv_type, UINT8 addr_type_own, |
| 724 | UINT8 addr_type_dir, BD_ADDR direct_bda, |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 725 | UINT8 channel_map, UINT8 adv_filter_policy); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 726 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 727 | extern BOOLEAN btsnd_hcic_ble_read_adv_chnl_tx_power (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 728 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 729 | extern BOOLEAN btsnd_hcic_ble_set_adv_data (UINT8 data_len, UINT8 *p_data); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 730 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 731 | extern BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 *p_scan_rsp); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 732 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 733 | extern BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 734 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 735 | extern BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type, |
| 736 | UINT16 scan_int, UINT16 scan_win, |
| 737 | UINT8 addr_type, UINT8 scan_filter_policy); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 738 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 739 | extern BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 740 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 741 | extern BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win, |
| 742 | UINT8 init_filter_policy, UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 addr_type_own, |
| 743 | UINT16 conn_int_min, UINT16 conn_int_max, UINT16 conn_latency, UINT16 conn_timeout, |
| 744 | UINT16 min_ce_len, UINT16 max_ce_len); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 745 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 746 | extern BOOLEAN btsnd_hcic_ble_create_conn_cancel (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 747 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 748 | extern BOOLEAN btsnd_hcic_ble_read_white_list_size (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 749 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 750 | extern BOOLEAN btsnd_hcic_ble_clear_white_list (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 751 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 752 | extern BOOLEAN btsnd_hcic_ble_add_white_list (UINT8 addr_type, BD_ADDR bda); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 753 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 754 | extern BOOLEAN btsnd_hcic_ble_remove_from_white_list (UINT8 addr_type, BD_ADDR bda); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 755 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 756 | extern BOOLEAN btsnd_hcic_ble_upd_ll_conn_params (UINT16 handle, UINT16 conn_int_min, UINT16 conn_int_max, |
| 757 | UINT16 conn_latency, UINT16 conn_timeout, UINT16 min_len, UINT16 max_len); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 758 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 759 | extern BOOLEAN btsnd_hcic_ble_set_host_chnl_class (UINT8 chnl_map[HCIC_BLE_CHNL_MAP_SIZE]); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 760 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 761 | extern BOOLEAN btsnd_hcic_ble_read_chnl_map (UINT16 handle); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 762 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 763 | extern BOOLEAN btsnd_hcic_ble_read_remote_feat ( UINT16 handle); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 764 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 765 | extern BOOLEAN btsnd_hcic_ble_encrypt (UINT8* key, UINT8 key_len, UINT8* plain_text, UINT8 pt_len, void *p_cmd_cplt_cback); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 766 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 767 | extern BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 768 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 769 | extern BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle, |
| 770 | UINT8 rand[HCIC_BLE_RAND_DI_SIZE], |
| 771 | UINT16 ediv, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 772 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 773 | extern BOOLEAN btsnd_hcic_ble_ltk_req_reply (UINT16 handle, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 774 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 775 | extern BOOLEAN btsnd_hcic_ble_ltk_req_neg_reply (UINT16 handle); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 776 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 777 | extern BOOLEAN btsnd_hcic_ble_read_supported_states (void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 778 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 779 | extern BOOLEAN btsnd_hcic_ble_write_host_supported (UINT8 le_host_spt, UINT8 simul_le_host_spt); |
Ganesh Ganapathi Batta | ead3cde | 2013-02-05 15:22:31 -0800 | [diff] [blame] | 780 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 781 | extern BOOLEAN btsnd_hcic_ble_read_host_supported (void); |
Ganesh Ganapathi Batta | ead3cde | 2013-02-05 15:22:31 -0800 | [diff] [blame] | 782 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 783 | extern BOOLEAN btsnd_hcic_ble_receiver_test(UINT8 rx_freq); |
Ganesh Ganapathi Batta | ead3cde | 2013-02-05 15:22:31 -0800 | [diff] [blame] | 784 | |
Sunny Kapdi | 3d5a283 | 2017-04-05 17:32:01 -0700 | [diff] [blame] | 785 | extern BOOLEAN btsnd_hcic_ble_enh_receiver_test(UINT8 rx_freq, UINT8 phy, UINT8 mod_index); |
| 786 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 787 | extern BOOLEAN btsnd_hcic_ble_transmitter_test(UINT8 tx_freq, UINT8 test_data_len, |
| 788 | UINT8 payload); |
Sunny Kapdi | 3d5a283 | 2017-04-05 17:32:01 -0700 | [diff] [blame] | 789 | |
| 790 | extern BOOLEAN btsnd_hcic_ble_enh_transmitter_test(UINT8 tx_freq, UINT8 test_data_len, |
| 791 | UINT8 payload, UINT8 phy); |
| 792 | |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 793 | extern BOOLEAN btsnd_hcic_ble_test_end(void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 794 | |
Ganesh Ganapathi Batta | 7fa4fba | 2014-04-16 16:50:09 -0700 | [diff] [blame] | 795 | #if (defined BLE_LLT_INCLUDED) && (BLE_LLT_INCLUDED == TRUE) |
| 796 | |
| 797 | #define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_REPLY 14 |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 798 | extern BOOLEAN btsnd_hcic_ble_rc_param_req_reply(UINT16 handle, |
| 799 | UINT16 conn_int_min, UINT16 conn_int_max, |
| 800 | UINT16 conn_latency, UINT16 conn_timeout, |
| 801 | UINT16 min_ce_len, UINT16 max_ce_len); |
Ganesh Ganapathi Batta | 7fa4fba | 2014-04-16 16:50:09 -0700 | [diff] [blame] | 802 | |
| 803 | #define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_NEG_REPLY 3 |
June R. Tate-Gans | 24933b5 | 2014-09-24 15:25:02 -0700 | [diff] [blame] | 804 | extern BOOLEAN btsnd_hcic_ble_rc_param_req_neg_reply(UINT16 handle, UINT8 reason); |
Ganesh Ganapathi Batta | 7fa4fba | 2014-04-16 16:50:09 -0700 | [diff] [blame] | 805 | |
| 806 | #endif /* BLE_LLT_INCLUDED */ |
| 807 | |
Priti Aghera | 636d671 | 2014-12-18 13:55:48 -0800 | [diff] [blame] | 808 | extern BOOLEAN btsnd_hcic_ble_set_data_length(UINT16 conn_handle, UINT16 tx_octets, |
| 809 | UINT16 tx_time); |
Ganesh Ganapathi Batta | 7fa4fba | 2014-04-16 16:50:09 -0700 | [diff] [blame] | 810 | |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 811 | extern BOOLEAN btsnd_hcic_ble_add_device_resolving_list (UINT8 addr_type_peer, |
| 812 | BD_ADDR bda_peer, |
| 813 | UINT8 irk_peer[HCIC_BLE_IRK_SIZE], |
| 814 | UINT8 irk_local[HCIC_BLE_IRK_SIZE]); |
| 815 | |
| 816 | extern BOOLEAN btsnd_hcic_ble_rm_device_resolving_list (UINT8 addr_type_peer, |
| 817 | BD_ADDR bda_peer); |
| 818 | |
Nitin Arora | 36fa3c5 | 2016-11-02 15:26:09 -0700 | [diff] [blame] | 819 | extern BOOLEAN btsnd_hcic_ble_set_privacy_mode (UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 privacy_type); |
| 820 | |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 821 | extern BOOLEAN btsnd_hcic_ble_clear_resolving_list (void); |
| 822 | |
| 823 | extern BOOLEAN btsnd_hcic_ble_read_resolvable_addr_peer (UINT8 addr_type_peer, |
| 824 | BD_ADDR bda_peer); |
| 825 | |
| 826 | extern BOOLEAN btsnd_hcic_ble_read_resolvable_addr_local (UINT8 addr_type_peer, |
| 827 | BD_ADDR bda_peer); |
| 828 | |
| 829 | extern BOOLEAN btsnd_hcic_ble_set_addr_resolution_enable (UINT8 addr_resolution_enable); |
| 830 | |
| 831 | extern BOOLEAN btsnd_hcic_ble_set_rand_priv_addr_timeout (UINT16 rpa_timout); |
| 832 | |
Nitin Arora | 6bcfadd | 2015-10-29 18:21:35 -0700 | [diff] [blame] | 833 | extern BOOLEAN btsnd_hcic_ble_set_default_data_rate(UINT8 all_phy, UINT8 tx_phy, UINT8 rx_phy); |
| 834 | |
| 835 | extern BOOLEAN btsnd_hcic_ble_set_data_rate(UINT16 handle, UINT8 all_phy, UINT8 tx_phy, |
| 836 | UINT8 rx_phy, UINT16 phy_options); |
| 837 | |
Nitin Arora | bd46d60 | 2016-02-24 18:15:44 -0800 | [diff] [blame] | 838 | #if (defined BLE_EXTENDED_ADV_SUPPORT && (BLE_EXTENDED_ADV_SUPPORT == TRUE)) |
| 839 | extern BOOLEAN btsnd_hcic_ble_set_extended_adv_params (UINT8 set_id, UINT16 event_properties, |
| 840 | UINT32 adv_int_min, UINT32 adv_int_max, |
| 841 | UINT8 channel_map, UINT8 addr_type_own, |
| 842 | UINT8 addr_type_dir, BD_ADDR direct_bda, |
| 843 | UINT8 adv_filter_policy, UINT8 adv_tx_power, |
| 844 | UINT8 primary_adv_phy, UINT8 secondary_max_skip, |
| 845 | UINT8 secondary_adv_phy, UINT8 advertising_sid, |
| 846 | UINT8 scan_req_not_enb); |
| 847 | |
| 848 | extern BOOLEAN btsnd_hcic_ble_set_extended_adv_data (UINT8 set_id, UINT8 operation, UINT8 fragment_pref, |
| 849 | UINT8 data_len, UINT8 *p_data); |
| 850 | |
| 851 | extern BOOLEAN btsnd_hcic_ble_set_extended_scan_rsp_data (UINT8 set_id, UINT8 operation, UINT8 fragement_pref, |
| 852 | UINT8 data_len, UINT8 *p_scan_rsp); |
| 853 | |
| 854 | extern BOOLEAN btsnd_hcic_ble_set_extended_adv_enable (UINT8 adv_enable, UINT8 num_sets, UINT8* handles, |
| 855 | UINT16* durations, UINT8* max_adv_events); |
| 856 | |
| 857 | extern BOOLEAN btsnd_hcic_ble_read_num_adv_sets (void); |
| 858 | |
| 859 | extern BOOLEAN btsnd_hcic_ble_read_extended_max_adv_len (void); |
| 860 | |
| 861 | extern BOOLEAN btsnd_hcic_ble_write_extended_rpa (UINT8 set_id, BD_ADDR rpa); |
Subramanian Srinivasan | 9c9c752 | 2016-07-11 13:01:37 -0700 | [diff] [blame] | 862 | |
| 863 | extern BOOLEAN btsnd_hcic_ble_set_extended_scan_params (UINT8 scan_phys, |
| 864 | UINT8 scan_type, |
| 865 | UINT16 scan_int, UINT16 scan_win, |
| 866 | UINT16 scan_int_coded, UINT16 scan_win_coded, |
| 867 | UINT8 addr_type_own, UINT8 scan_filter_policy); |
| 868 | |
| 869 | extern BOOLEAN btsnd_hcic_ble_set_extended_scan_enable (UINT8 scan_enable, UINT8 duplicate, |
| 870 | UINT16 duraton, UINT16 period); |
| 871 | |
| 872 | extern BOOLEAN btsnd_hcic_ble_ext_create_ll_conn (UINT8 ini_phy, UINT16 scan_int, UINT16 scan_win, |
| 873 | UINT8 init_filter_policy, |
| 874 | UINT8 addr_type_peer, BD_ADDR bda_peer, |
| 875 | UINT8 addr_type_own, |
| 876 | UINT16 conn_int_min, UINT16 conn_int_max, |
| 877 | UINT16 conn_latency, UINT16 conn_timeout, |
| 878 | UINT16 min_ce_len, UINT16 max_ce_len); |
Nitin Arora | bd46d60 | 2016-02-24 18:15:44 -0800 | [diff] [blame] | 879 | #endif |
| 880 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 881 | #endif /* BLE_INCLUDED */ |
| 882 | |
Satya Calloji | 444a8da | 2015-03-06 10:38:22 -0800 | [diff] [blame] | 883 | extern BOOLEAN btsnd_hcic_read_authenticated_payload_tout(UINT16 handle); |
| 884 | |
| 885 | extern BOOLEAN btsnd_hcic_write_authenticated_payload_tout(UINT16 handle, |
| 886 | UINT16 timeout); |
| 887 | |
| 888 | #define HCIC_PARAM_SIZE_WRITE_AUTHENT_PAYLOAD_TOUT 4 |
| 889 | |
| 890 | #define HCI__WRITE_AUTHENT_PAYLOAD_TOUT_HANDLE_OFF 0 |
| 891 | #define HCI__WRITE_AUTHENT_PAYLOAD_TOUT_TOUT_OFF 2 |
| 892 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 893 | #endif |