-
大小: 24KB文件類(lèi)型: .c金幣: 1下載: 0 次發(fā)布日期: 2021-05-08
- 語(yǔ)言: 其他
- 標(biāo)簽: 驅(qū)動(dòng)程序??
資源簡(jiǎn)介
linux下usb轉(zhuǎn)串口系列驅(qū)動(dòng),支持cp21xx系列
代碼片段和文件信息
/*
?*?Silicon?Laboratories?CP2101/CP2102?USB?to?RS232?serial?adaptor?driver
?*
?*?Copyright?(C)?2005?Craig?Shelley?(craig@microtron.org.uk)
?*
?* This?program?is?free?software;?you?can?redistribute?it?and/or
?* modify?it?under?the?terms?of?the?GNU?General?Public?License?version
?* 2?as?published?by?the?Free?Software?Foundation.
?*
?*?Support?to?set?flow?control?line?levels?using?TIOCMGET?and?TIOCMSET
?*?thanks?to?Karl?Hiramoto?karl@hiramoto.org.?RTSCTS?hardware?flow
?*?control?thanks?to?Munir?Nassar?nassarmu@real-time.com
?*
?*/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
/*
?*?Version?Information
?*/
#define?DRIVER_VERSION?“v0.08“
#define?DRIVER_DESC?“Silicon?Labs?CP2101/CP2102?RS232?serial?adaptor?driver“
/*
?*?Function?Prototypes
?*/
static?int?cp2101_open(struct?tty_struct?*?struct?usb_serial_port?*
struct?file?*);
static?void?cp2101_cleanup(struct?usb_serial_port?*);
static?void?cp2101_close(struct?tty_struct?*?struct?usb_serial_port?*
struct?file*);
static?void?cp2101_get_termios(struct?tty_struct?*
struct?usb_serial_port?*port);
static?void?cp2101_get_termios_port(struct?usb_serial_port?*port
unsigned?int?*cflagp?unsigned?int?*baudp);
static?void?cp2101_set_termios(struct?tty_struct?*?struct?usb_serial_port?*
struct?ktermios*);
static?int?cp2101_tiocmget(struct?tty_struct?*?struct?file?*);
static?int?cp2101_tiocmset(struct?tty_struct?*?struct?file?*
unsigned?int?unsigned?int);
static?int?cp2101_tiocmset_port(struct?usb_serial_port?*port?struct?file?*
unsigned?int?unsigned?int);
static?void?cp2101_break_ctl(struct?tty_struct?*?int);
static?int?cp2101_startup(struct?usb_serial?*);
static?void?cp2101_disconnect(struct?usb_serial?*);
static?int?debug;
static?struct?usb_device_id?id_table?[]?=?{
{?USB_DEVICE(0x0471?0x066A)?}?/*?AKTAKOM?ACE-1001?cable?*/
{?USB_DEVICE(0x0489?0xE000)?}?/*?Pirelli?Broadband?S.p.A?DP-L10?SIP/GSM?Mobile?*/
{?USB_DEVICE(0x08e6?0x5501)?}?/*?Gemalto?Prox-PU/CU?contactless?smartcard?reader?*/
{?USB_DEVICE(0x0FCF?0x1003)?}?/*?Dynastream?ANT?development?board?*/
{?USB_DEVICE(0x0FCF?0x1004)?}?/*?Dynastream?ANT2USB?*/
{?USB_DEVICE(0x0FCF?0x1006)?}?/*?Dynastream?ANT?development?board?*/
{?USB_DEVICE(0x10A6?0xAA26)?}?/*?Knock-off?DCU-11?cable?*/
{?USB_DEVICE(0x10AB?0x10C5)?}?/*?Siemens?MC60?Cable?*/
{?USB_DEVICE(0x10B5?0xAC70)?}?/*?Nokia?CA-42?USB?*/
{?USB_DEVICE(0x10C4?0x800A)?}?/*?SPORTident?BSM7-D-USB?main?station?*/
{?USB_DEVICE(0x10C4?0x803B)?}?/*?Pololu?USB-serial?converter?*/
{?USB_DEVICE(0x10C4?0x8053)?}?/*?Enfora?EDG1228?*/
{?USB_DEVICE(0x10C4?0x8054)?}?/*?Enfora?GSM2228?*/
{?USB_DEVICE(0x10C4?0x8066)?}?/*?Argussoft?In-System?Programmer?*/
{?USB_DEVICE(0x10C4?0x807A)?}?/*?Crumb128?board?*/
{?USB_DEVICE(0x10C4
評(píng)論
共有 條評(píng)論