资源简介
usb otg 调试 patch,对于调试 otg 非常有用。
代码片段和文件信息
/*
* adk-skeleton.c : kernel module to initialize linux machine as android accessory
* and also talk to accessory interface using bulk transfer
*
* Skeleton code for ADK Host driver based on drivers/usb/usb-skeleton.c of
* kernel source v2.6.3 or higher by Greg Kroah-Hartman (greg@kroah.com) and
* https://github.com/gibsson/linux-adk by Gary Bisson
*
* Copyright (C) 2014 - Rajesh Sola
*
* 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 see
*/
#include
#include
#include “adk-common.h“
#include
//#include “adk-init.h“
int my_device_vid=0x22b8;//0x04e8;
int my_device_pid=0x2e76;//0x6865;
int init_on_probe=0; //initialize device within probe only if this value is true
//otherwise one need to go for ioctl later
module_param(my_device_vidintS_IRUGO);
module_param(my_device_pidintS_IRUGO);
module_param(init_on_probeintS_IRUGO);
#ifdef CONFIG_USB_AUTOlink
static char aoa_device_name[16] = “aoa-autolink%d“;
#else
static char aoa_device_name[16] = “aoa-skel%d“;
#endif
module_param_string(aoa_device_name aoa_device_name sizeof(aoa_device_name) 0644);
int aoa_read_req_num = 5;
module_param(aoa_read_req_num int 0644);
static struct usb_driver adk_aoa_driver;
/* table of devices that work with this driver */
static struct usb_device_id adk_aoa_table[] = {
{ USB_DEVICE(MY_DEV_VENDOR_ID MY_DEV_PRODUCT_ID) } //replaced by module params
{ USB_DEVICE(CUSTOM_VENDOR_ID CUSTOM_PRODUCT_ID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_ADB_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_AUDIO_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_AUDIO_ADB_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_AUDIO_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_AUDIO_ADB_PID) }
{ } /*Terminating entry*/
};
MODULE_DEVICE_TABLE(usb adk_aoa_table);
static void adk_aoa_delete(struct kref *kref)
{
struct usb_adk_aoa *dev = to_adk_aoa_dev(kref);
usb_put_dev(dev->udev);
if(dev->bulk_in_buffer)
kfree(dev->bulk_in_buffer);
kfree(dev->rdbuf.buf);
kfree(dev);
dev = NULL;
}
int adk_aoa_open(struct inode *inode struct file *file)
{
struct usb_adk_aoa *dev;
struct usb_interface *interface;
int subminor;
int retval = 0;
subminor = iminor(inode)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28732 2018-11-01 10:36 628_test_patch\628_b_otg
文件 57720 2018-10-29 08:22 628_test_patch\628_kernel_dev_bulk_iso
文件 5369 2018-10-29 10:47 628_test_patch\628_otg
文件 24172 2018-10-31 17:47 628_test_patch\628_otg1
文件 368 1980-01-01 00:00 628_test_patch\628_usb.sh
文件 15281 2018-10-18 13:45 628_test_patch\adk-common.c
文件 8818 2018-10-18 13:45 628_test_patch\aoa-skeleton.c
文件 12062 2018-10-19 19:19 628_test_patch\aoa_debug
文件 5114 2018-10-19 18:58 628_test_patch\cp_debu
文件 7074 2018-10-26 09:53 628_test_patch\ctrl_in_out
文件 19998 2018-10-26 18:43 628_test_patch\ehci_usb.c
文件 222271 2018-10-15 19:03 628_test_patch\ga.diff
文件 11236 2018-10-25 10:13 628_test_patch\group.c
文件 3206 2018-10-11 08:42 628_test_patch\kernel_host.differ
文件 21632 2018-10-22 11:53 628_test_patch\kernel_mouse
文件 21255 2018-10-22 19:18 628_test_patch\kernel_mouse1
文件 123407 2018-10-15 17:56 628_test_patch\kernel_op1
文件 10339 2018-10-16 10:06 628_test_patch\kernel_op2
文件 5725 2018-10-18 19:41 628_test_patch\kernel_op3
文件 4320 2018-10-23 15:49 628_test_patch\kernel_uvc
文件 1685 2018-10-15 19:06 628_test_patch\Makefile
文件 2360 2018-10-20 17:49 628_test_patch\master_commit.txt
文件 8572 2018-10-18 11:44 628_test_patch\master_debug
文件 19896 2018-10-20 12:32 628_test_patch\master_debug1
文件 18917 2018-10-20 14:11 628_test_patch\master_debug2
文件 19272 2018-10-20 15:38 628_test_patch\master_debug3
文件 4446 2018-10-20 17:48 628_test_patch\master_debug4
文件 2865 2018-10-24 17:39 628_test_patch\master_dev
文件 7373 2018-11-01 10:47 628_test_patch\master_dev_test
文件 9750 2018-10-22 10:38 628_test_patch\master_mouse
............此处省略21个文件信息
- 上一篇:IBM DS3512图解完整版
- 下一篇:zw_NMEA_Worker.zip
相关资源
- QT5检测USB设备
- stm32 产生的pwm的硬件电路
- OptiSystem_User_Reference
- Proteus 7.8 元件库
- 西门子300 PLC MODBUS TCP通讯 程序
- mac os 黑苹果usb wifi 万能驱动器
- Ginkgo_USB-I2C_Classic_Setup_v2.9.2.zip
- Modbus TCP/RTU 服务端、客户端源码、协
- Modbus Slave破解版
- Arbitrage Theory in Continuous Time
- modbus一个测试客户端与服务端及一个
- writing testbenches using systemverilog
- GL3520方案
- 使用Visual Studio+OpenCV进行的Susan算子边
- How to Write a Business Plan - Brian Finch.pdf
- 单独运行在U盘里的系统3in1_WinXP_Win7
- abaqus精典例题集
- fuse文件系统课程设计源代码和设计文
- 基于51单片机的波形发生器带仿真
- 内建MODBUS网关功能的串口服务器及M
- Digital Communication Systems Using SystemVue高
- vdmagdi.exekeil与proteus联调驱动
- modbus协议调试工具 支持TCP和串口
- [software] Petrify-4.2
- 基于Quartus II 的dds信号发生器.rar.rar
- Quartus_ii_11.0教程(包含modelsim仿真)
- usrp及usrp2使用教程
- 现场总线技术及其应用(第2版)(书
- SAP Business One 数据库表结构
- twincat modbus rtu lib
评论
共有 条评论