资源简介
Linux下的CDC-ACM驱动源码,USB虚拟串口驱动程序,欢迎下载学习!
代码片段和文件信息
/*
* cdc-acm.c
*
* Copyright (c) 1999 Armin Fuerst
* Copyright (c) 1999 Pavel Machek
* Copyright (c) 1999 Johannes Erdfelt
* Copyright (c) 2000 Vojtech Pavlik
* Copyright (c) 2004 Oliver Neukum
* Copyright (c) 2005 David Kubicek
* Copyright (c) 2011 Johan Hovold
*
* USB Abstract Control Model driver for USB modems and ISDN adapters
*
* Sponsored by SuSE
*
* 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
*/
#undef DEBUG
#undef VERBOSE_DEBUG
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “cdc-acm.h“
#define DRIVER_AUTHOR “Armin Fuerst Pavel Machek Johannes Erdfelt Vojtech Pavlik David Kubicek Johan Hovold“
#define DRIVER_DESC “USB Abstract Control Model driver for USB modems and ISDN adapters“
static struct usb_driver acm_driver;
static struct tty_driver *acm_tty_driver;
static struct acm *acm_table[ACM_TTY_MINORS];
static DEFINE_MUTEX(open_mutex);
#define ACM_READY(acm) (acm && acm->dev && acm->port.count)
static const struct tty_port_operations acm_port_ops = {
};
/*
* Functions for ACM control messages.
*/
static int acm_ctrl_msg(struct acm *acm int request int value
void *buf int len)
{
int retval = usb_control_msg(acm->dev usb_sndctrlpipe(acm->dev 0)
request USB_RT_ACM value
acm->control->altsetting[0].desc.bInterfaceNumber
buf len 5000);
dev_dbg(&acm->control->dev
“%s - rq 0x%02x val %#x len %#x result %d\n“
__func__ request value len retval);
return retval < 0 ? retval : 0;
}
/* devices aren‘t required to support these requests.
* the cdc acm descriptor tells whether they do...
*/
#define acm_set_control(acm control) \
acm_ctrl_msg(acm USB_CDC_REQ_SET_CONTROL_LINE_STATE control NULL 0)
#define acm_set_line(acm line) \
acm_ctrl_msg(acm USB_CDC_REQ_SET_LINE_CODING 0 line sizeof *(line))
#define acm_send_break(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 121 2017-03-07 09:03 class\.built-in.o.cmd
文件 27331 2017-03-07 09:03 class\.cdc-acm.o.cmd
文件 164984 2017-03-07 09:03 class\built-in.o
文件 45016 2017-03-27 09:50 class\cdc-acm.c
文件 3542 2017-03-07 09:03 class\cdc-acm.h
文件 164984 2017-03-07 09:03 class\cdc-acm.o
文件 20917 2017-03-07 09:03 class\cdc-wdm.c
文件 1552 2017-03-07 09:03 class\Kconfig
文件 221 2017-03-07 09:03 class\Makefile
文件 36 2017-03-07 09:03 class\modules.builtin
文件 0 2017-03-07 09:03 class\modules.order
文件 39815 2017-03-07 09:03 class\usblp.c
文件 27588 2017-03-07 09:03 class\usbtmc.c
目录 0 2017-03-07 09:03 class
----------- --------- ---------- ----- ----
496107 14
- 上一篇:物联网智慧农业
- 下一篇:KNX/EIB 为欧洲标准总线协议。完全版协议。
相关资源
- 剖析Linux系统下基于NUMA构建的服务
- linux SPI设备注册和驱动小结
- 周立功PCI CAN卡LINUX驱动ubuntu16.04内核
- 实现Windows与Linux两系统间自由切换
- 在双引导Linux系统上实现OS自动切换
- 如何删除Linux系统后找回Windows的启动
- Linux命令详解,循序渐进Linux
- Linux系统文件命令精通指南(下)
- Linux系统命令及Shell脚本实践指南
- RK3308 LINUX开发者指南(1).pdf
- S3C4510 开发板中uCLinux系统开发
- 嵌入式操作系统的解析
- Linux点阵字库和字库生成器.rar
- Linux-UNIX系统编程手册上、下册中文版
- 基于ARM的电子相册源码含动态库可运
- PSFTP.EXE 工具
- 如何实现Linux与windows文件互传
- Linux内核函数Start_kernel()的功能
- 一只老鸟的嵌入式ARM学习心得
- cximage的linux版本源码
- yaf-2.1.17.tgz
- IBM eServer xSeries 445 EXP400在Linux下的双
- 如何在本地无光驱软驱时通过PXE远程
- Linux操作系统下配置无密码的RSH访问
- 如何利用mdadm在Linux中配置RAID
- db2 v9.5 linux 许可证
- linux telnet服务安装包
- SUSE Linux Enterprise——助力曙光高
- 运行LINUX的中高端HP INTEGRITY服务器
- lsoflist open files命令
评论
共有 条评论