blob: 156d6c00932be6ab20338e9238e13f5ce2c86893 [file] [log] [blame]
Mekala Natarajan38776972015-04-30 20:28:11 -07001/*
2 * Copyright 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef BT_VENDOR_QCOM_H
18#define BT_VENDOR_QCOM_H
19
20#include "bt_vendor_lib.h"
21//#include "vnd_buildcfg.h"
22
23#define STREAM_TO_UINT16(u16, p) {u16 = ((uint16_t)(*(p)) + (((uint16_t)(*((p) + 1))) << 8)); (p) += 2;}
24#define UINT16_TO_STREAM(p, u16) {*(p)++ = (uint8_t)(u16); *(p)++ = (uint8_t)((u16) >> 8);}
25#define UINT32_TO_STREAM(p, u32) {*(p)++ = (uint8_t)(u32); *(p)++ = (uint8_t)((u32) >> 8); *(p)++ = (uint8_t)((u32) >> 16); *(p)++ = (uint8_t)((u32) >> 24);}
26
27#ifndef FALSE
28#define FALSE 0
29#endif
30
31#ifndef TRUE
32#define TRUE (!FALSE)
33#endif
34
35typedef enum {
36 BT_SOC_DEFAULT = 0,
37 BT_SOC_SMD = BT_SOC_DEFAULT,
38 BT_SOC_ROME,
39 BT_SOC_AR3K,
40 /* Add chipset type here */
41 BT_SOC_RESERVED
42}bt_soc_type;
43
Ketut Putu Kumajayaad4b0822016-07-17 15:27:26 +070044typedef enum {
45 BT_VND_OP_ANT_USERIAL_OPEN = 254,
46 BT_VND_OP_ANT_USERIAL_CLOSE
47}ant_serial;
Mekala Natarajan38776972015-04-30 20:28:11 -070048
49extern bt_vendor_callbacks_t *bt_vendor_cbacks;
50/* HW_NEED_END_WITH_HCI_RESET
51
52 code implementation of sending a HCI_RESET command during the epilog
53 process. It calls back to the callers after command complete of HCI_RESET
54 is received.
55
56 Default TRUE .
57*/
58#ifndef HW_NEED_END_WITH_HCI_RESET
59#define HW_NEED_END_WITH_HCI_RESET TRUE
60#endif
61
62#define HCI_RESET 0x0C03
63#define HCI_CMD_PREAMBLE_SIZE 3
64#define HCI_EVT_CMD_CMPL_STATUS_RET_BYTE 5
65#define HCI_EVT_CMD_CMPL_OPCODE 3
66
67#endif /* BT_VENDOR_QCOM_H */
68