资源简介
linux下RTL8821蓝牙驱动,ubuntu
![](http://www.nz998.com/pic/45397.jpg)
代码片段和文件信息
/*
*
* Realtek Bluetooth USB driver
*
*
* 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
*
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “rtk_bt.h“
#define VERSION “3.1“
#ifdef BTCOEX
#include “rtk_coex.h“
#endif
static uint8_t gEVersion = 0xFF;
#if HCI_VERSION_CODE >= KERNEL_VERSION(3 7 1)
static bool reset = 0;
#endif
static struct usb_driver btusb_driver;
static struct usb_device_id btusb_table[] = {
{
.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
USB_DEVICE_ID_MATCH_INT_INFO
.idVendor = 0x0bda
.bInterfaceClass = 0xe0
.bInterfaceSubClass = 0x01
.bInterfaceProtocol = 0x01
} {
.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
USB_DEVICE_ID_MATCH_INT_INFO
.idVendor = 0x13d3
.bInterfaceClass = 0xe0
.bInterfaceSubClass = 0x01
.bInterfaceProtocol = 0x01
} {
.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
USB_DEVICE_ID_MATCH_INT_INFO
.idVendor = 0x0489
.bInterfaceClass = 0xe0
.bInterfaceSubClass = 0x01
.bInterfaceProtocol = 0x01
} { }
};
static void rtk_free(struct btusb_data *data)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(3 7 1)
kfree(data);
#endif
return;
}
static struct btusb_data *rtk_alloc(struct usb_interface *intf)
{
struct btusb_data *data;
#if LINUX_VERSION_CODE < KERNEL_VERSION(3 7 1)
data = kzalloc(sizeof(*data) GFP_KERNEL);
#else
data = devm_kzalloc(&intf->dev sizeof(*data) GFP_KERNEL);
#endif
return data;
}
MODULE_DEVICE_TABLE(usb btusb_table);
static int inc_tx(struct btusb_data *data)
{
unsigned long flags;
int rv;
spin_lock_irqsave(&data->txlock flags);
rv = test_bit(BTUSB_SUSPENDING &data->flags);
if (!rv)
data->tx_in_flight++;
spin_unlock_irqrestore(&data->txlock flags);
return rv;
}
#if HCI_VERSION_CODE >= KERNEL_VERSION(3 18 0)
static inline void btusb_free_frags(struct btusb_data *data)
{
unsigned long flags;
spin_lock_irqsave(&data->rxlock flags);
kfree_skb(data->evt_skb);
data->evt_skb = NULL;
kfree_skb(data->acl_skb);
data->acl_skb = NULL;
kfree_skb(data->sco_skb);
data->sco_skb = NULL;
spin_un
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-04-10 10:45 LINUX_BT\
目录 0 2017-04-10 10:46 LINUX_BT\8821AU\
文件 321 2017-04-10 10:46 LINUX_BT\8821AU\Makefile
文件 40024 2017-04-10 10:36 LINUX_BT\8821AU\rtl8821a_fw
目录 0 2017-06-30 19:50 LINUX_BT\bluetooth_usb_driver\
文件 300 2017-03-14 14:37 LINUX_BT\bluetooth_usb_driver\Makefile
文件 68598 2017-04-10 10:56 LINUX_BT\bluetooth_usb_driver\rtk_bt.c
文件 5577 2017-03-14 14:37 LINUX_BT\bluetooth_usb_driver\rtk_bt.h
文件 67923 2017-03-14 14:37 LINUX_BT\bluetooth_usb_driver\rtk_coex.c
文件 9894 2017-03-14 14:37 LINUX_BT\bluetooth_usb_driver\rtk_coex.h
目录 0 2017-06-30 20:50 LINUX_BT\bluetooth_usb_driver\SI\
文件 53248 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IAB
文件 848 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IAD
文件 12288 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IMB
文件 448 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.IMD
文件 16 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PFI
文件 776 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PO
文件 1760 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PR
文件 8608 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PRI
文件 103884 2017-06-30 19:51 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.PS
文件 39 2017-06-30 20:50 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.SearchResults
文件 13669 2017-06-30 20:50 LINUX_BT\bluetooth_usb_driver\SI\bluetooth_usb_driver.WK3
文件 761 2017-04-10 10:45 LINUX_BT\Makefile
文件 5209 2017-03-14 14:37 LINUX_BT\Readme.txt
- 上一篇:游程编码实现图像压缩
- 下一篇:springCloud demo
相关资源
- 由浅入深,蓝牙4.0/BLE协议栈开发攻略
- 基于蓝牙4.0的设备通信方案设计与实
- STM32蓝牙和串口程序
- uboot到linux logo显示不间断 补丁
- 基于MSP430G2553的蓝牙控制小车
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- 蓝牙工作原理(不懂的可以下来看看
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- 基于ARM蓝牙传输源程序
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
- linux扫雷游戏代码
评论
共有 条评论