2008-12-23 12:39:54 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* BlueZ - Bluetooth protocol stack for Linux
|
|
|
|
*
|
2010-01-02 09:08:17 +08:00
|
|
|
* Copyright (C) 2003-2010 Marcel Holtmann <marcel@holtmann.org>
|
2008-12-23 12:39:54 +08:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <termios.h>
|
|
|
|
|
|
|
|
#ifndef N_HCI
|
|
|
|
#define N_HCI 15
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define HCIUARTSETPROTO _IOW('U', 200, int)
|
|
|
|
#define HCIUARTGETPROTO _IOR('U', 201, int)
|
|
|
|
#define HCIUARTGETDEVICE _IOR('U', 202, int)
|
2010-07-12 22:38:29 +08:00
|
|
|
#define HCIUARTSETFLAGS _IOW('U', 203, int)
|
|
|
|
#define HCIUARTGETFLAGS _IOR('U', 204, int)
|
2008-12-23 12:39:54 +08:00
|
|
|
|
|
|
|
#define HCI_UART_H4 0
|
|
|
|
#define HCI_UART_BCSP 1
|
|
|
|
#define HCI_UART_3WIRE 2
|
|
|
|
#define HCI_UART_H4DS 3
|
|
|
|
#define HCI_UART_LL 4
|
2010-08-18 17:29:28 +08:00
|
|
|
#define HCI_UART_ATH3K 5
|
2008-12-23 12:39:54 +08:00
|
|
|
|
2010-07-12 22:38:29 +08:00
|
|
|
#define HCI_UART_RAW_DEVICE 0
|
2012-02-27 10:34:29 +08:00
|
|
|
#define HCI_UART_RESET_ON_INIT 1
|
|
|
|
#define HCI_UART_CREATE_AMP 2
|
2010-07-12 22:38:29 +08:00
|
|
|
|
2012-08-21 23:49:24 +08:00
|
|
|
int read_hci_event(int fd, unsigned char *buf, int size);
|
2008-12-23 12:39:54 +08:00
|
|
|
int set_speed(int fd, struct termios *ti, int speed);
|
2014-04-05 00:26:08 +08:00
|
|
|
int uart_speed(int speed);
|
2008-12-23 12:39:54 +08:00
|
|
|
|
2011-09-05 21:42:12 +08:00
|
|
|
int texas_init(int fd, int *speed, struct termios *ti);
|
2008-12-23 12:39:54 +08:00
|
|
|
int texas_post(int fd, struct termios *ti);
|
|
|
|
int texasalt_init(int fd, int speed, struct termios *ti);
|
|
|
|
int stlc2500_init(int fd, bdaddr_t *bdaddr);
|
|
|
|
int bgb2xx_init(int dd, bdaddr_t *bdaddr);
|
2010-11-23 18:59:23 +08:00
|
|
|
int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,
|
|
|
|
struct termios *ti);
|
2010-08-18 17:29:28 +08:00
|
|
|
int ath3k_post(int fd, int pm);
|
2010-08-24 00:17:47 +08:00
|
|
|
int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);
|
2012-05-16 01:23:29 +08:00
|
|
|
int intel_init(int fd, int init_speed, int *speed, struct termios *ti);
|
2014-04-05 00:26:08 +08:00
|
|
|
int bcm43xx_init(int fd, int speed, struct termios *ti, const char *bdaddr);
|