1635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*
2635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * Copyright 2012 The Android Open Source Project
3635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *
4635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * Licensed under the Apache License, Version 2.0 (the "License");
5635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * you may not use this file except in compliance with the License.
6635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * You may obtain a copy of the License at
7635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *
8635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *      http://www.apache.org/licenses/LICENSE-2.0
9635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *
10635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * Unless required by applicable law or agreed to in writing, software
11635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * distributed under the License is distributed on an "AS IS" BASIS,
12635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * See the License for the specific language governing permissions and
14635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * limitations under the License.
15635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch */
16635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
17635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef BT_VENDOR_QCOM_H
18635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define BT_VENDOR_QCOM_H
19635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
20635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#include "bt_vendor_lib.h"
21635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch//#include "vnd_buildcfg.h"
22635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
23635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
24635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef FALSE
25635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define FALSE  0
26635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif
27635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
28635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef TRUE
29635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define TRUE   (!FALSE)
30635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif
31635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
32635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define STREAM_TO_UINT16(u16, p) {u16 = ((uint16_t)(*(p)) + (((uint16_t)(*((p) + 1))) << 8)); (p) += 2;}
33635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define UINT16_TO_STREAM(p, u16) {*(p)++ = (uint8_t)(u16); *(p)++ = (uint8_t)((u16) >> 8);}
34635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#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);}
35635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
36635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef enum {
37635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    BT_SOC_DEFAULT = 0,
38635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    BT_SOC_SMD = BT_SOC_DEFAULT,
39635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    BT_SOC_ROME,
40635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    BT_SOC_AR3K,
41635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    /* Add chipset type here */
42635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    BT_SOC_RESERVED
43635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch}bt_soc_type;
44635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
45635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef enum {
46635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    BT_VND_OP_ANT_USERIAL_OPEN = 254,
47635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    BT_VND_OP_ANT_USERIAL_CLOSE
48635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch}ant_serial;
49635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
50635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschextern bt_vendor_callbacks_t *bt_vendor_cbacks;
51635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* HW_NEED_END_WITH_HCI_RESET
52635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
53635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    code implementation of sending a HCI_RESET command during the epilog
54635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    process. It calls back to the callers after command complete of HCI_RESET
55635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    is received.
56635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
57635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    Default TRUE .
58635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch*/
59635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef HW_NEED_END_WITH_HCI_RESET
60635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HW_NEED_END_WITH_HCI_RESET TRUE
61635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif
62635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
63635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_RESET  0x0C03
64635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_CMD_PREAMBLE_SIZE 3
65635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_EVT_CMD_CMPL_STATUS_RET_BYTE   5
66635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_EVT_CMD_CMPL_OPCODE        3
67635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
68635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif /* BT_VENDOR_QCOM_H */
69635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
70