1635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*
2635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  Copyright (c) 2013, The Linux Foundation. All rights reserved.
3635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  Not a Contribution.
4635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  Copyright (C) 2009-2012 Broadcom Corporation
5635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *
6635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  Licensed under the Apache License, Version 2.0 (the "License");
7635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  you may not use this file except in compliance with the License.
8635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  You may obtain a copy of the License at
9635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *
10635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  http://www.apache.org/licenses/LICENSE-2.0
11635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *
12635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  Unless required by applicable law or agreed to in writing, software
13635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  distributed under the License is distributed on an "AS IS" BASIS,
14635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  See the License for the specific language governing permissions and
16635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch *  limitations under the License.
17635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch */
18635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
19635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef HCI_UART_H
20635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_UART_H
21635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
22635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* Variables to identify the platform */
23635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*BT HS UART TTY DEVICE */
24635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define BT_HS_UART_DEVICE "/dev/ttyHS0"
25635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
26635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/**** baud rates ****/
27635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_300        0
28635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_600        1
29635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_1200       2
30635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_2400       3
31635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_9600       4
32635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_19200      5
33635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_57600      6
34635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_115200     7
35635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_230400     8
36635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_460800     9
37635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_921600     10
38635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_1M         11
39635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_1_5M       12
40635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_2M         13
41635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_3M         14
42635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_4M         15
43635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_BAUD_AUTO       16
44635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
45635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/**** Data Format ****/
46635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* Stop Bits */
47635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_STOPBITS_1      1
48635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_STOPBITS_1_5    (1<<1)
49635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_STOPBITS_2      (1<<2)
50635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
51635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* Parity Bits */
52635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_PARITY_NONE     (1<<3)
53635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_PARITY_EVEN     (1<<4)
54635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_PARITY_ODD      (1<<5)
55635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
56635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* Data Bits */
57635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_DATABITS_5      (1<<6)
58635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_DATABITS_6      (1<<7)
59635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_DATABITS_7      (1<<8)
60635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_DATABITS_8      (1<<9)
61635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
62635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* HCI Packet types */
63635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_COMMAND_PKT     0x01
64635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_ACLDATA_PKT      0x02
65635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_SCODATA_PKT     0x03
66635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_EVENT_PKT           0x04
67635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_VENDOR_PKT        0xff
68635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
69635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* HCI Command/Event Opcode */
70635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define HCI_RESET                       0x0C03
71635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define EVT_CMD_COMPLETE       0x0E
72635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
73635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* Command opcode pack/unpack */
74635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define cmd_opcode_pack(ogf, ocf)   (uint16_t)((ocf & 0x03ff)|(ogf << 10))
75635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
76635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)
77635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* These are the ioctl values used for bt_wake ioctl via UART driver. you may
78635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * need to redefine them on you platform!
79635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch * Logically they need to be unique and not colide with existing uart ioctl's.
80635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch */
81635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef USERIAL_IOCTL_BT_WAKE_ASSERT
82635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_IOCTL_BT_WAKE_ASSERT   0x8003
83635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif
84635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef USERIAL_IOCTL_BT_WAKE_DEASSERT
85635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_IOCTL_BT_WAKE_DEASSERT 0x8004
86635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif
87635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#ifndef USERIAL_IOCTL_BT_WAKE_GET_ST
88635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_IOCTL_BT_WAKE_GET_ST   0x8005
89635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif
90635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif // (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)
91635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
92635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* UART CLOCK IOCTLS*/
93635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_OP_CLK_ON 0x5441
94635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_OP_CLK_OFF 0x5442
95635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define USERIAL_OP_CLK_STATE 0x5443
96635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/******************************************************************************
97635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**  Type definitions
98635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch******************************************************************************/
99635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
100635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* Structure used to configure serial port during open */
101635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef struct
102635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch{
103635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint16_t fmt;       /* Data format */
104635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint8_t  baud;      /* Baud rate */
105635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch} tUSERIAL_CFG;
106635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
107635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef enum {
108635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)
109635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    USERIAL_OP_ASSERT_BT_WAKE,
110635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    USERIAL_OP_DEASSERT_BT_WAKE,
111635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    USERIAL_OP_GET_BT_WAKE_STATE,
112635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif
113635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    USERIAL_OP_FLOW_ON,
114635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    USERIAL_OP_FLOW_OFF,
115635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    USERIAL_OP_NOP,
116635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch} userial_vendor_ioctl_op_t;
117635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
118635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* UPIO signals */
119635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschenum {
120635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    UPIO_BT_WAKE = 0,
121635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    UPIO_HOST_WAKE,
122635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    UPIO_LPM_MODE,
123635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    UPIO_MAX_COUNT
124635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch};
125635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
126635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* UPIO assertion/deassertion */
127635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschenum {
128635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    UPIO_UNKNOWN = 0,
129635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    UPIO_DEASSERT,
130635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    UPIO_ASSERT
131635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch};
132635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
133635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#define VND_PORT_NAME_MAXLEN    256
134635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
135635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/* vendor serial control block */
136635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef struct
137635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch{
138635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    int fd;                     /* fd to Bluetooth device */
139635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    struct termios termios;     /* serial terminal of BT port */
140635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    char port_name[VND_PORT_NAME_MAXLEN];
141635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch} vnd_userial_cb_t;
142635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
143635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef struct {
144635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint8_t     ncmd;
145635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint16_t    opcode;
146635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch} __attribute__ ((packed)) evt_cmd_complete;
147635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
148635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef struct {
149635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint8_t     status;
150635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint8_t     ncmd;
151635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint16_t    opcode;
152635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch} __attribute__ ((packed)) evt_cmd_status;
153635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
154635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef struct {
155635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint16_t    opcode;
156635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint8_t     plen;
157635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch} __attribute__ ((packed))  hci_command_hdr;
158635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
159635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschtypedef struct {
160635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint8_t     evt;
161635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch    uint8_t     plen;
162635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch} __attribute__ ((packed))  hci_event_hdr;
163635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
164635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/******************************************************************************
165635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**  Extern
166635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch******************************************************************************/
167635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschextern vnd_userial_cb_t vnd_userial;
168635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
169635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
170635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*******************************************************************************
171635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
172635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Function        userial_vendor_init
173635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
174635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Description     Initialize userial vendor-specific control block
175635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
176635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Returns         None
177635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
178635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch*******************************************************************************/
179635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschvoid userial_vendor_init(void);
180635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
181635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*******************************************************************************
182635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
183635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Function        userial_vendor_open
184635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
185635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Description     Open the serial port with the given configuration
186635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
187635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Returns         device fd
188635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
189635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch*******************************************************************************/
190635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschint userial_vendor_open(tUSERIAL_CFG *p_cfg);
191635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
192635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*******************************************************************************
193635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
194635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Function        userial_vendor_close
195635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
196635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Description     Conduct vendor-specific close work
197635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
198635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Returns         None
199635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
200635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch*******************************************************************************/
201635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschvoid userial_vendor_close(void);
202635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
203635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*******************************************************************************
204635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
205635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Function        userial_vendor_set_baud
206635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
207635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Description     Set new baud rate
208635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
209635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Returns         None
210635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
211635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch*******************************************************************************/
212635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschvoid userial_vendor_set_baud(uint8_t userial_baud);
213635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
214635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*******************************************************************************
215635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
216635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Function        userial_vendor_ioctl
217635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
218635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Description     ioctl inteface
219635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
220635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Returns         int error
221635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
222635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch*******************************************************************************/
223635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschint userial_vendor_ioctl(userial_vendor_ioctl_op_t op, int *p_data);
224635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
225635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch/*******************************************************************************
226635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
227635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Function        read_hci_event
228635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
229635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Description     Read HCI event during vendor initialization
230635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
231635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch** Returns         int: size to read
232635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch**
233635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch*******************************************************************************/
234635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetschint read_hci_event(int fd, unsigned char* buf, int size);
235635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch
236635682da6daf370cdba78511b917e166f0b6dbecSteve Pfetsch#endif /* HCI_UART_H */
237