⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keyspan.h

📁 linux2.4.20下的针对三星公司的s3c2410的usb模块驱动代码
💻 H
📖 第 1 页 / 共 2 页
字号:
	instat_endpoint:	0x84,	glocont_endpoint:	-1,	calculate_baud_rate:	keyspan_usa19_calc_baud,	baudclk:		KEYSPAN_USA19_BAUDCLK,};static const struct keyspan_device_details usa19qi_device_details = {	product_id:		keyspan_usa19qi_product_id,	msg_format:		msg_usa28,	num_ports:		1,	indat_endp_flip:	1,	outdat_endp_flip:	1,	indat_endpoints:	{0x81},	outdat_endpoints:	{0x01},	inack_endpoints:	{0x83},	outcont_endpoints:	{0x03},	instat_endpoint:	0x84,	glocont_endpoint:	-1,	calculate_baud_rate:	keyspan_usa28_calc_baud,	baudclk:		KEYSPAN_USA19_BAUDCLK,};static const struct keyspan_device_details usa19qw_device_details = {	product_id:		keyspan_usa19qw_product_id,	msg_format:		msg_usa26,	num_ports:		1,	indat_endp_flip:	0,	outdat_endp_flip:	1,	indat_endpoints:	{0x81},	outdat_endpoints:	{0x01},	inack_endpoints:	{0x85},	outcont_endpoints:	{0x05},	instat_endpoint:	0x87,	glocont_endpoint:	0x07,	calculate_baud_rate:	keyspan_usa19w_calc_baud,	baudclk:		KEYSPAN_USA19W_BAUDCLK,};static const struct keyspan_device_details usa19w_device_details = {	product_id:		keyspan_usa19w_product_id,	msg_format:		msg_usa26,	num_ports:		1,	indat_endp_flip:	0,	outdat_endp_flip:	1,	indat_endpoints:	{0x81},	outdat_endpoints:	{0x01},	inack_endpoints:	{0x85},	outcont_endpoints:	{0x05},	instat_endpoint:	0x87,	glocont_endpoint:	0x07,	calculate_baud_rate:	keyspan_usa19w_calc_baud,	baudclk:		KEYSPAN_USA19W_BAUDCLK,};static const struct keyspan_device_details usa28_device_details = {	product_id:		keyspan_usa28_product_id,	msg_format:		msg_usa28,	num_ports:		2,	indat_endp_flip:	1,	outdat_endp_flip:	1,	indat_endpoints:	{0x81, 0x83},	outdat_endpoints:	{0x01, 0x03},	inack_endpoints:	{0x85, 0x86},	outcont_endpoints:	{0x05, 0x06},	instat_endpoint:	0x87,	glocont_endpoint:	0x07,	calculate_baud_rate:	keyspan_usa28_calc_baud,	baudclk:		KEYSPAN_USA28_BAUDCLK,		};static const struct keyspan_device_details usa28x_device_details = {	product_id:		keyspan_usa28x_product_id,	msg_format:		msg_usa26,	num_ports:		2,	indat_endp_flip:	0,	outdat_endp_flip:	1,	indat_endpoints:	{0x81, 0x83},	outdat_endpoints:	{0x01, 0x03},	inack_endpoints:	{0x85, 0x86},	outcont_endpoints:	{0x05, 0x06},	instat_endpoint:	0x87,	glocont_endpoint:	0x07,	calculate_baud_rate:	keyspan_usa19w_calc_baud,	baudclk:		KEYSPAN_USA28X_BAUDCLK,};static const struct keyspan_device_details usa28xa_device_details = {	product_id:		keyspan_usa28xa_product_id,	msg_format:		msg_usa26,	num_ports:		2,	indat_endp_flip:	0,	outdat_endp_flip:	1,	indat_endpoints:	{0x81, 0x83},	outdat_endpoints:	{0x01, 0x03},	inack_endpoints:	{0x85, 0x86},	outcont_endpoints:	{0x05, 0x06},	instat_endpoint:	0x87,	glocont_endpoint:	0x07,	calculate_baud_rate:	keyspan_usa19w_calc_baud,	baudclk:		KEYSPAN_USA28X_BAUDCLK,};/* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */static const struct keyspan_device_details usa49w_device_details = {	product_id:		keyspan_usa49w_product_id,	msg_format:		msg_usa49,	num_ports:		4,	indat_endp_flip:	0,	outdat_endp_flip:	0,	indat_endpoints:	{0x81, 0x82, 0x83, 0x84},	outdat_endpoints:	{0x01, 0x02, 0x03, 0x04},	inack_endpoints:	{-1, -1, -1, -1},	outcont_endpoints:	{-1, -1, -1, -1},	instat_endpoint:	0x87,	glocont_endpoint:	0x07,	calculate_baud_rate:	keyspan_usa19w_calc_baud,	baudclk:		KEYSPAN_USA49W_BAUDCLK,};static const struct keyspan_device_details *keyspan_devices[] = {	&usa18x_device_details,	&usa19_device_details,	&usa19qi_device_details,	&usa19qw_device_details,	&usa19w_device_details,	&usa28_device_details,	&usa28x_device_details,	&usa28xa_device_details,	/* 28xb not required as it renumerates as a 28x */	&usa49w_device_details,	NULL,};static __devinitdata struct usb_device_id keyspan_ids_combined[] = {	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id)},	{ } /* Terminating entry */};MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);/* usb_device_id table for the pre-firmware download keyspan devices */static struct usb_device_id keyspan_pre_ids[] = {	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_pre_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },	{ } /* Terminating entry */};static struct usb_device_id keyspan_1port_ids[] = {	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },	{ } /* Terminating entry */};static struct usb_device_id keyspan_2port_ids[] = {	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },	{ } /* Terminating entry */};static struct usb_device_id keyspan_4port_ids[] = {	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },	{ } /* Terminating entry */};/* Structs for the devices, pre and post renumeration. */static struct usb_serial_device_type keyspan_pre_device = {	owner:			THIS_MODULE,	name:			"Keyspan - (without firmware)",	id_table:		keyspan_pre_ids,	num_interrupt_in:	NUM_DONT_CARE,	num_bulk_in:		NUM_DONT_CARE,	num_bulk_out:		NUM_DONT_CARE,	num_ports:		1,	startup:		keyspan_fake_startup,};static struct usb_serial_device_type keyspan_1port_device = {	owner:			THIS_MODULE,	name:			"Keyspan 1 port adapter",	id_table:		keyspan_1port_ids,	num_interrupt_in:	NUM_DONT_CARE,	num_bulk_in:		3,	num_bulk_out:		4,	num_ports:		1,	open:			keyspan_open,	close:			keyspan_close,	write:			keyspan_write,	write_room:		keyspan_write_room,	chars_in_buffer:	keyspan_chars_in_buffer,	throttle:		keyspan_rx_throttle,	unthrottle:		keyspan_rx_unthrottle,	ioctl:			keyspan_ioctl,	set_termios:		keyspan_set_termios,	break_ctl:		keyspan_break_ctl,	startup:		keyspan_startup,	shutdown:		keyspan_shutdown,};static struct usb_serial_device_type keyspan_2port_device = {	owner:			THIS_MODULE,	name:			"Keyspan 2 port adapter",	id_table:		keyspan_2port_ids,	num_interrupt_in:	NUM_DONT_CARE,	num_bulk_in:		NUM_DONT_CARE,	num_bulk_out:		NUM_DONT_CARE,	num_ports:		2,	open:			keyspan_open,	close:			keyspan_close,	write:			keyspan_write,	write_room:		keyspan_write_room,	chars_in_buffer:	keyspan_chars_in_buffer,	throttle:		keyspan_rx_throttle,	unthrottle:		keyspan_rx_unthrottle,	ioctl:			keyspan_ioctl,	set_termios:		keyspan_set_termios,	break_ctl:		keyspan_break_ctl,	startup:		keyspan_startup,	shutdown:		keyspan_shutdown,};static struct usb_serial_device_type keyspan_4port_device = {	owner:			THIS_MODULE,	name:			"Keyspan 4 port adapter",	id_table:		keyspan_4port_ids,	num_interrupt_in:	NUM_DONT_CARE,	num_bulk_in:		5,	num_bulk_out:		5,	num_ports:		4,	open:			keyspan_open,	close:			keyspan_close,	write:			keyspan_write,	write_room:		keyspan_write_room,	chars_in_buffer:	keyspan_chars_in_buffer,	throttle:		keyspan_rx_throttle,	unthrottle:		keyspan_rx_unthrottle,	ioctl:			keyspan_ioctl,	set_termios:		keyspan_set_termios,	break_ctl:		keyspan_break_ctl,	startup:		keyspan_startup,	shutdown:		keyspan_shutdown,};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -