⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hci_uart.h

📁 HCI USB driver for Linux Bluetooth protocol stack
💻 H
字号:
/* * *  Bluetooth HCI UART driver * *  Copyright (C) 2000-2001  Qualcomm Incorporated *  Copyright (C) 2002-2003  Maxim Krasnyansky <maxk@qualcomm.com> *  Copyright (C) 2004-2005  Marcel Holtmann <marcel@holtmann.org> * * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * */#ifndef N_HCI#define N_HCI	15#endif/* Ioctls */#define HCIUARTSETPROTO	_IOW('U', 200, int)#define HCIUARTGETPROTO	_IOR('U', 201, int)/* UART protocols */#define HCI_UART_MAX_PROTO	4#define HCI_UART_H4	0#define HCI_UART_BCSP	1#define HCI_UART_3WIRE	2#define HCI_UART_H4DS	3struct hci_uart;struct hci_uart_proto {	unsigned int id;	int (*open)(struct hci_uart *hu);	int (*close)(struct hci_uart *hu);	int (*flush)(struct hci_uart *hu);	int (*recv)(struct hci_uart *hu, void *data, int len);	int (*enqueue)(struct hci_uart *hu, struct sk_buff *skb);	struct sk_buff *(*dequeue)(struct hci_uart *hu);};struct hci_uart {	struct tty_struct	*tty;	struct hci_dev		*hdev;	unsigned long		flags;	struct hci_uart_proto	*proto;	void			*priv;	struct sk_buff		*tx_skb;	unsigned long		tx_state;	spinlock_t		rx_lock;};/* HCI_UART flag bits */#define HCI_UART_PROTO_SET	0/* TX states  */#define HCI_UART_SENDING	1#define HCI_UART_TX_WAKEUP	2int hci_uart_register_proto(struct hci_uart_proto *p);int hci_uart_unregister_proto(struct hci_uart_proto *p);int hci_uart_tx_wakeup(struct hci_uart *hu);#ifdef CONFIG_BT_HCIUART_H4int h4_init(void);int h4_deinit(void);#endif#ifdef CONFIG_BT_HCIUART_BCSPint bcsp_init(void);int bcsp_deinit(void);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -