Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/hcitools/hciattach.h
Views: 3959
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2003-2010 Marcel Holtmann <[email protected]>5*6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA20*21*/2223#include <termios.h>2425#include <bluetooth.h>2627#ifndef N_HCI28#define N_HCI 1529#endif3031#define HCIUARTSETPROTO _IOW('U', 200, int)32#define HCIUARTGETPROTO _IOR('U', 201, int)33#define HCIUARTGETDEVICE _IOR('U', 202, int)34#define HCIUARTSETFLAGS _IOW('U', 203, int)35#define HCIUARTGETFLAGS _IOR('U', 204, int)3637#define HCI_UART_H4 038#define HCI_UART_BCSP 139#define HCI_UART_3WIRE 240#define HCI_UART_H4DS 341#define HCI_UART_LL 442#define HCI_UART_ATH3K 54344#define HCI_UART_RAW_DEVICE 045#define HCI_UART_RESET_ON_INIT 146#define HCI_UART_CREATE_AMP 24748struct uart_t {49char *type;50int m_id;51int p_id;52int proto;53int init_speed;54int speed;55int flags;56int pm;57char *bdaddr;58int (*init) (int fd, struct uart_t *u, struct termios *ti);59int (*post) (int fd, struct uart_t *u, struct termios *ti);60};6162#define FLOW_CTL 0x000163#define AMP_DEV 0x000264#define ENABLE_PM 165#define DISABLE_PM 06667int read_hci_event(int fd, unsigned char *buf, int size);68int set_speed(int fd, struct termios *ti, int speed);69int uart_speed(int speed);7071int texas_init(int fd, int *speed, struct termios *ti);72int texas_post(int fd, struct termios *ti);73int texasalt_init(int fd, int speed, struct termios *ti);74int stlc2500_init(int fd, bdaddr_t *bdaddr);75int bgb2xx_init(int dd, bdaddr_t *bdaddr);76int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,77struct termios *ti);78int ath3k_post(int fd, int pm);79int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);80int intel_init(int fd, int init_speed, int *speed, struct termios *ti);81int bcm43xx_init(int fd, int speed, struct termios *ti, const char *bdaddr);8283//Realtek_add_start84//add realtek init and post process for realtek Bluetooth chip85int rtk_init(int fd, int proto, int speed, struct termios *ti);86int rtk_post(int fd, int proto, struct termios *ti);87//Realtek_add_end8889// add xradio init and post process for xradio Bluetooth chip (xr829)90int xr_init(int fd, struct uart_t *u, struct termios *ti);91int xr_post(int fd, struct uart_t *u, struct termios *ti);9293// add sprd init and post process for sprd Bluetooth chip (UWE5622)94int sprd_config_init(int fd, struct uart_t *u, struct termios *ti);95int sprd_config_post(int fd, struct uart_t *u, struct termios *ti);969798