Quelltext /~heha/ewa/Kram/igr-251008.zip/descriptors.i15

; USB-Deskriptoren. Hier nur WebUSB.
dtw	macro x
	dt	low x,high x
	endm

DEVICE_DESC
	dt	18		; bLength
	dt	1		; bDescriptorType
	dtw	0x0210		; bcdUSB (USB 2.10)
	dt	0xFF		; bDeviceClass (Vendor)
	dt	0		; bDeviceSubclass
	dt	0		; bDeviceProtocol
	dt	1<<E0_SSH	; bMaxPacketSize0 (8 Byte)
	dtw	0x04D8		; idVendor (Microchip)
	dtw	0xEFDD		; idProduct
	dtw	0x11		; bcdDevice
	dt	1		; iManufacturer
	dt	2		; iProduct
	dt	3		; iSerialNumber
	dt	1		; bNumConfigurations

CONFIG_DESC
	dt	9		; bLength
	dt	2		; bDescriptorType
	dtw	CONFIG_DESC_LEN	; wTotalLength
	dt	1		; bNumInterfaces
CONST1	dt	1		; bConfigurationValue
CONST0	dt	0		; iConfiguration
	dt	0x80		; bmAttributes
	dt	20		; bMaxPower (40 mA)
;Iface-Desc: WebUSB
	dt	9		; bLength
	dt	4		; bDescriptorType (INTERFACE)
	dt	0		; bInterfaceNumber
	dt	0		; bAlternateSetting
	dt	1		; bNumEndpoints
	dt	0xFF		; bInterfaceClass
	dt	0		; bInterfaceSubclass
	dt	0		; bInterfaceProtocol
	dt	0		; iInterface
;Endpoint-Desc
	dt	7		; bLength
	dt	5		; bDescriptorType (ENDPOINT)
	dt	0x81		; bEndpointAddress (1 IN)
	dt	0x03		; bmAttributes (transfer type: interrupt)
	dtw	1<<E1I_SSH	; wMaxPacketSize (8 Byte)
	dt	50		; bInterval (50 ms) genügt zu Anzeigezwecken

CONFIG_DESC_LEN	equ $-CONFIG_DESC

STRING_DESC
S0	dt	S1-S0,3
	dtw	0x0407		; deutsch
S1	dt	S2-S1,3
	dt	'T',0,'U',0,' ',0,'C',0,'h',0,'e',0,'m',0,'n',0
	dt	'i',0,'t',0,'z',0,',',0,' ',0,'E',0,'W',0,'A',0
	dt	' ',0,'(',0,'V',0,'E',0,'B',0,' ',0,'C',0,'a',0
	dt	'r',0,'l',0,' ',0,'Z',0,'e',0,'i',0,'s',0,'s',0
	dt	' ',0,'J',0,'e',0,'n',0,'a',0,')',0
S2	dt	S3-S2,3
	dt	'I',0,'n',0,'k',0,'r',0,'e',0,'m',0,'e',0,'n',0
	dt	't',0,'a',0,'l',0,'e',0,'r',0,' ',0,'D',0,'r',0
	dt	'e',0,'h',0,'g',0,'e',0,'b',0,'e',0,'r',0,' ',0
	dt	'I',0,'G',0,'R',0,'1',0,'0',0,'0',0,'0',0
S3	dt	S4-S3,3
	dt	'h',0,'e',0,'h',0,'a',0,'@',0,'h',0,'r',0,'z',0
	dt	'.',0,'t',0,'u',0,'-',0,'c',0,'h',0,'e',0,'m',0
	dt	'n',0,'i',0,'t',0,'z',0,'.',0,'d',0,'e',0
S4	equ	$
STRING_DESC_N equ 4		;0..3

BOS_DESC
	dt	5,15
	dtw	BOS_DESC_LEN
	dt	2	;Anzahl der Deskriptoren
	dt	24,16,5,0
	dt	0x38,0xB6,0x08,0x34,0xA9,0x09,0xA0,0x47
	dt	0x8B,0xFD,0xA0,0x76,0x88,0x15,0xB6,0x65	;WebUSB GUID
	dtw	0x100
	dt	1,1	;bRequest, iLandingPage
	dt	28,16,5,0
	dt	0xDF,0x60,0xDD,0xD8,0x89,0x45,0xC7,0x4C
	dt	0x9C,0xD2,0x65,0x9D,0x9E,0x64,0x8A,0x9F	;MS OS 2.0 GUID
	dt	0,0,3,6	;dwWindowsVersion
	dtw	MSOS20_DESC_LEN
	dt	2,0	;bRequest
BOS_DESC_LEN equ $-BOS_DESC

MSOS20_DESC	;for single-interface device
	dt	0x0A,0,0x00,0,0,0,3,6,0xA2,0
	dt	20,0,3,0,"WINUSB",0,0
	dt	0,0,0,0,0,0,0,0
	dt	4+21+1+40<<1,0,4,0,7,0,21<<1,0
	dt	'D',0,'e',0,'v',0,'i',0,'c',0,'e',0
	dt	'I',0,'n',0,'t',0,'e',0,'r',0,'f',0,'a',0,'c',0,'e',0
	dt	'G',0,'U',0,'I',0,'D',0,'s',0,0,0
	dt	40<<1,0
	dt	'{',0,'9',0,'7',0,'5',0,'F',0,'4',0,'4',0,'D',0,'9',0,'-',0
	dt	'0',0,'D',0,'0',0,'8',0,'-',0,'4',0,'3',0,'F',0,'D',0,'-',0
	dt	'8',0,'B',0,'3',0,'E',0,'-',0,'1',0,'2',0,'7',0,'C',0,'A',0
	dt	'8',0,'A',0,'F',0,'F',0,'F',0,'9',0,'D',0,'}',0,0  ,0,0  ,0
MSOS20_DESC_LEN equ $-MSOS20_DESC

URL_DESC
	dt	URL_DESC_LEN,3
	dt	1		;0 = "http://", 1 = "https://"
	dt	"www.tu-chemnitz.de/~heha/ewa/Kram/igr.htm"
URL_DESC_LEN equ $-URL_DESC
Vorgefundene Kodierung: UTF-80