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

📄 io_usbvend.h

📁 基于S3CEB2410平台LINUX操作系统下 USB驱动源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/************************************************************************ * *	USBVEND.H		Vendor-specific USB definitions * *	NOTE: This must be kept in sync with the Edgeport firmware and *	must be kept backward-compatible with older firmware. * ************************************************************************ * *	Copyright (c) 1998 Inside Out Networks, Inc. *	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. * ************************************************************************/#if !defined(_USBVEND_H)#define	_USBVEND_H#ifndef __KERNEL__#include "ionprag.h"	/* Extra I/O Networks pragmas */#include <usbdi.h>#include "iondef.h"	/* Standard I/O Networks definitions */#endif/************************************************************************ * *		D e f i n e s   /   T y p e d e f s * ************************************************************************///// Definitions of USB product IDs// #define	USB_VENDOR_ID_ION	0x1608		// Our VID//// Definitions of USB product IDs (PID)// We break the USB-defined PID into an OEM Id field (upper 6 bits)// and a Device Id (bottom 10 bits). The Device Id defines what// device this actually is regardless of what the OEM wants to// call it.//// ION-device OEM IDs#define	ION_OEM_ID_ION		0		// 00h Inside Out Networks#define	ION_OEM_ID_NLYNX	1		// 01h NLynx Systems	  #define	ION_OEM_ID_GENERIC	2		// 02h Generic OEM#define	ION_OEM_ID_MAC		3		// 03h Mac Version#define	ION_OEM_ID_MEGAWOLF	4		// 04h Lupusb OEM Mac version (MegaWolf)#define	ION_OEM_ID_MULTITECH	5		// 05h Multitech Rapidports	// ION-device Device IDs// Product IDs - assigned to match middle digit of serial number// The ION_DEVICE_ID_GENERATION_2 bit (0x20) will be ORed into the existing edgeport// PIDs to identify 80251+Netchip hardware.  This will guarantee that if a second// generation edgeport device is plugged into a PC with an older (pre 2.0) driver,// it will not enumerate.#define ION_DEVICE_ID_GENERATION_2	0x020	// This bit is set in the PID if this edgeport hardware															// is based on the 80251+Netchip.  #define EDGEPORT_DEVICE_ID_MASK			0x3df	// Not including GEN_2 bit#define	ION_DEVICE_ID_UNCONFIGURED_EDGE_DEVICE	0x000	// In manufacturing only#define ION_DEVICE_ID_EDGEPORT_4		0x001	// Edgeport/4 RS232//	ION_DEVICE_ID_HUBPORT_7			0x002	// Hubport/7 (Placeholder, not used by software)#define ION_DEVICE_ID_RAPIDPORT_4		0x003	// Rapidport/4#define ION_DEVICE_ID_EDGEPORT_4T		0x004	// Edgeport/4 RS232 for Telxon (aka "Fleetport")#define ION_DEVICE_ID_EDGEPORT_2		0x005	// Edgeport/2 RS232#define ION_DEVICE_ID_EDGEPORT_4I		0x006	// Edgeport/4 RS422#define ION_DEVICE_ID_EDGEPORT_2I		0x007	// Edgeport/2 RS422/RS485//	ION_DEVICE_ID_HUBPORT_4			0x008	// Hubport/4 (Placeholder, not used by software)//	ION_DEVICE_ID_EDGEPORT_8_HANDBUILT	0x009	// Hand-built Edgeport/8 (Placeholder, used in middle digit of serial number only!)//	ION_DEVICE_ID_MULTIMODEM_4X56		0x00A	// MultiTech version of RP/4 (Placeholder, used in middle digit of serial number only!)#define	ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT	0x00B	// Edgeport/(4)21 Parallel port (USS720)#define	ION_DEVICE_ID_EDGEPORT_421		0x00C	// Edgeport/421 Hub+RS232+Parallel#define	ION_DEVICE_ID_EDGEPORT_21		0x00D	// Edgeport/21  RS232+Parallel#define ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU	0x00E	// Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB)#define ION_DEVICE_ID_EDGEPORT_8		0x00F	// Edgeport/8 (single-CPU)#define ION_DEVICE_ID_EDGEPORT_2_DIN		0x010	// Edgeport/2 RS232 with Apple DIN connector#define ION_DEVICE_ID_EDGEPORT_4_DIN		0x011	// Edgeport/4 RS232 with Apple DIN connector#define ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU	0x012	// Half of an Edgeport/16 (the kind with 2 EP/8s)#define ION_DEVICE_ID_EDGEPORT_COMPATIBLE	0x013	// Edgeport Compatible, for NCR, Axiohm etc. testing#define ION_DEVICE_ID_EDGEPORT_8I		0x014	// Edgeport/8 RS422 (single-CPU)#define ION_DEVICE_ID_MT4X56USB			0x1403	// OEM device// These IDs are used by the Edgeport.exe program for uninstalling.// #define EDGEPORT_DEVICE_IDS	{0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \				 0x00C, 0x00D, 0x00E, 0x00F, 0x010, 0x011, 0x012, \				 0x013, 0x014 }#define	MAKE_USB_PRODUCT_ID( OemId, DeviceId )					\			( (__u16) (((OemId) << 10) || (DeviceId)) )#define	DEVICE_ID_FROM_USB_PRODUCT_ID( ProductId )				\			( (__u16) ((ProductId) & (EDGEPORT_DEVICE_ID_MASK)) )#define	OEM_ID_FROM_USB_PRODUCT_ID( ProductId )					\			( (__u16) (((ProductId) >> 10) & 0x3F) )//// Definitions of parameters for download code. Note that these are// specific to a given version of download code and must change if the// corresponding download code changes.//// TxCredits value below which driver won't bother sending (to prevent too many small writes).// Send only if above 25%#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit)	(max(((InitialCredit) / 4), EDGE_FW_BULK_MAX_PACKET_SIZE))#define	EDGE_FW_BULK_MAX_PACKET_SIZE		64	// Max Packet Size for Bulk In Endpoint (EP1)#define EDGE_FW_BULK_READ_BUFFER_SIZE		1024	// Size to use for Bulk reads#define	EDGE_FW_INT_MAX_PACKET_SIZE		32	// Max Packet Size for Interrupt In Endpoint							// Note that many units were shipped with MPS=16, we							// force an upgrade to this value).#define EDGE_FW_INT_INTERVAL			2	// 2ms polling on IntPipe//// Definitions of I/O Networks vendor-specific requests// for default endpoint////	bmRequestType = 00100000	Set vendor-specific, to device//	bmRequestType = 10100000	Get vendor-specific, to device//// These are the definitions for the bRequest field for the// above bmRequestTypes.//// For the read/write Edgeport memory commands, the parameters// are as follows://		wValue = 16-bit address//		wIndex = unused (though we could put segment 00: or FF: here)//		wLength = # bytes to read/write (max 64)//							#define USB_REQUEST_ION_RESET_DEVICE	0	// Warm reboot Edgeport, retaining USB address#define USB_REQUEST_ION_GET_EPIC_DESC	1	// Get Edgeport Compatibility Descriptor// unused				2	// Unused, available#define USB_REQUEST_ION_READ_RAM	3	// Read  EdgePort RAM at specified addr#define USB_REQUEST_ION_WRITE_RAM	4	// Write EdgePort RAM at specified addr#define USB_REQUEST_ION_READ_ROM	5	// Read  EdgePort ROM at specified addr#define USB_REQUEST_ION_WRITE_ROM	6	// Write EdgePort ROM at specified addr#define USB_REQUEST_ION_EXEC_DL_CODE	7	// Begin execution of RAM-based download						// code by jumping to address in wIndex:wValue//					8	// Unused, available#define USB_REQUEST_ION_ENABLE_SUSPEND	9	// Enable/Disable suspend feature						// (wValue != 0: Enable; wValue = 0: Disable)//// Define parameter values for our vendor-specific commands//// Values for iDownloadFile#define	EDGE_DOWNLOAD_FILE_NONE		0	// No download requested#define	EDGE_DOWNLOAD_FILE_INTERNAL	0xFF	// Download the file compiled into driver (930 version)#define	EDGE_DOWNLOAD_FILE_I930		0xFF	// Download the file compiled into driver (930 version)#define	EDGE_DOWNLOAD_FILE_80251	0xFE	// Download the file compiled into driver (80251 version)/* *	Special addresses for READ/WRITE_RAM/ROM */// Version 1 (original) format of DeviceParams#define	EDGE_MANUF_DESC_ADDR_V1		0x00FF7F00#define	EDGE_MANUF_DESC_LEN_V1		sizeof(EDGE_MANUF_DESCRIPTOR_V1)// Version 2 format of DeviceParams. This format is longer (3C0h)// and starts lower in memory, at the uppermost 1K in ROM.#define	EDGE_MANUF_DESC_ADDR		0x00FF7C00#define	EDGE_MANUF_DESC_LEN		sizeof(EDGE_MANUF_DESCRIPTOR)// Boot params descriptor#define	EDGE_BOOT_DESC_ADDR		0x00FF7FC0

⌨️ 快捷键说明

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