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

📄 readme.txt

📁 USb in User space, a kernel module that use usb layer
💻 TXT
字号:
usu: USb in User space, a kernel module that use usb layer.     Expose usb device as file without seek() and assuming as model 1-reader, many-writer      (more similar to pipe than file)=== COMPILE ===Open 'Makefile' and set variable 'LINUX_SRC' to place where kernel src was present, then:make=== CUSTOMIZE MODULE===	(es usb bluetooth dongle)	...	static struct LinkT topol[]={		{{0x00, 6}}, /* (OUTPUT, CONTROL). Never pass under our probe() because already created.*/		{{0x81, 6}}, /* (INPUT, INTERRUPT) endpoint.*/		{{0x02, 7}}, /* (OUTPUT, BULK) endpoint.*/		{{0x82, 7}}, /* (INPUT, BULK) endpoint.*/		{{0x03, 10}},/* (OUTPUT, ISOC) endpoint.*/		{{0x83, 10}},/* (INPUT, ISOC) endpoint.*/	};	struct usb_device_id idta[] = {		{USB_DEVICE(0x50d,0x012)}, /* Belkin.*/		{USB_DEVICE(0xa12,0x001)}, /* Surecom.*/		{USB_DEVICE(1131,1001)},   /* Sitel.*/	/*	{USB_DEVICE(0xea0,0x2168)}, * UsbPen.*/		{}	};	...1) Fill 'topol[]' array with (endpointId, instanceId)  - endpointId: is endpoint number that you found in /proc/bus/usb/devices.txt  - instanceId: indentify instance that'll manage such endpoint.		 0..9  : instance of class 'BuffRead'		10..19 : instance of class 'DoubleBuff'		'BuffRead'   class: can manage interrup, control, bulk I/O endpoint.		'DoubleBuff' class: can manage isoc endpoint.				Input endpoint are used during read()		Output endpoint are used during write() 2) Fill 'idta[]' array with idVendor, idProduct, see /proc/bus/usb/devices.txt=== KNOWN PROBLEMS/COMMON MISTAKES === - setting non standard usb interfaces require custom code.    TODO: Perhaps some option could be put in file name?

⌨️ 快捷键说明

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