1 | ;;-----------------------------------------------------------------------------
|
2 | ;; File: dscr.a51
|
3 | ;; Contents: This file contains descriptor data tables.
|
4 | ;;
|
5 | ;; Copyright (c) 1997 AnchorChips, Inc. All rights reserved
|
6 | ;;-----------------------------------------------------------------------------
|
7 |
|
8 | DSCR_DEVICE equ 1 ;; Descriptor type: Device
|
9 | DSCR_CONFIG equ 2 ;; Descriptor type: Configuration
|
10 | DSCR_STRING equ 3 ;; Descriptor type: String
|
11 | DSCR_INTRFC equ 4 ;; Descriptor type: Interface
|
12 | DSCR_ENDPNT equ 5 ;; Descriptor type: Endpoint
|
13 | DSCR_DEVQUAL equ 6 ;; Descriptor type: Device Qualifier
|
14 |
|
15 | DSCR_DEVICE_LEN equ 18
|
16 | DSCR_CONFIG_LEN equ 9
|
17 | DSCR_INTRFC_LEN equ 9
|
18 | DSCR_ENDPNT_LEN equ 7
|
19 | DSCR_DEVQUAL_LEN equ 10
|
20 |
|
21 | ET_CONTROL equ 0 ;; Endpoint type: Control
|
22 | ET_ISO equ 1 ;; Endpoint type: Isochronous
|
23 | ET_BULK equ 2 ;; Endpoint type: Bulk
|
24 | ET_INT equ 3 ;; Endpoint type: Interrupt
|
25 |
|
26 | public DeviceDscr, DeviceQualDscr, HighSpeedConfigDscr, FullSpeedConfigDscr, StringDscr, UserDscr
|
27 |
|
28 | ;; TGE DSCR SEGMENT CODE
|
29 |
|
30 | ;;-----------------------------------------------------------------------------
|
31 | ;; Global Variables
|
32 | ;;-----------------------------------------------------------------------------
|
33 |
|
34 | ;; TGE rseg DSCR ;; locate the descriptor table in on-part memory.
|
35 |
|
36 | ; cseg at 90H ;; TODO: this needs to be changed before release
|
37 | cseg at 0x0090
|
38 | DeviceDscr:
|
39 | db DSCR_DEVICE_LEN ;; Descriptor length => 18 bytes
|
40 | db DSCR_DEVICE ;; Decriptor type => this is device descriptor = 01h
|
41 | dw 0002H ;; Specification Version (BCD)
|
42 | db 0FFH ;; Device class => vendor specific
|
43 | db 0FFH ;; Device sub-class => vendor specific
|
44 | db 0FFH ;; Device protocol => vendor specific
|
45 | db 64 ;; Maximum packet size of EP0 =>
|
46 | dw 0xB404 ;; Vendor ID => Cypress Semi
|
47 | dw 0x1386 ;; Product ID (Sample Device) => ES USB FX2LP
|
48 | dw 0100H ;; Product version ID / Device Release Number
|
49 | db StringDscr1 ;; Manufacturer string index
|
50 | db StringDscr2 ;; Product string index
|
51 | db 0 ;; Serial number string index
|
52 | db 1 ;; Number of configurations
|
53 |
|
54 | DeviceQualDscr:
|
55 | db DSCR_DEVQUAL_LEN ;; Descriptor length
|
56 | db DSCR_DEVQUAL ;; Decriptor type
|
57 | dw 0002H ;; Specification Version (BCD)
|
58 | db 0FFH ;; Device class
|
59 | db 0FFH ;; Device sub-class
|
60 | db 0FFH ;; Device protocol
|
61 | db 64 ;; Maximum packet size
|
62 | db 1 ;; Number of configurations
|
63 | db 0 ;; Reserved
|
64 |
|
65 | HighSpeedConfigDscr:
|
66 | db DSCR_CONFIG_LEN ;; Descriptor length
|
67 | db DSCR_CONFIG ;; Descriptor type
|
68 | db (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) mod 256 ;; Total Length (LSB) ?
|
69 | db (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) / 256 ;; Total Length (MSB) ?
|
70 | db 1 ;; Number of interfaces
|
71 | db 1 ;; Configuration value , which one should be selected by set_config request
|
72 | db 0 ;; Configuration string
|
73 | db 80H ;; Attributes: Bus powered (b7) , no wakeup
|
74 | db 7DH ;; 7DH = 125 * 2mA = 250mA (maximum requestable)
|
75 |
|
76 | ;; Interface Descriptor
|
77 | db DSCR_INTRFC_LEN ;; Descriptor length
|
78 | db DSCR_INTRFC ;; Descriptor type
|
79 | db 0 ;; Zero-based index of this interface
|
80 | db 0 ;; Alternate setting
|
81 | db 2 ;; Number of end points
|
82 | db 0FFH ;; Interface class
|
83 | db 0FFH ;; Interface sub class
|
84 | db 0FFH ;; Interface protocol
|
85 | db 0 ;; Interface descriptor string index
|
86 |
|
87 | ;; Endpoint Descriptor 1 IN
|
88 | db DSCR_ENDPNT_LEN ;; Descriptor length
|
89 | db DSCR_ENDPNT ;; Descriptor type
|
90 | db 81H ;; Endpoint number, and direction ;; EP 1 IN
|
91 | db ET_BULK ;; Endpoint type
|
92 | db 00H ;; Maximun packet size (LSB)
|
93 | db 04H ;; Max packect size (MSB)
|
94 | db 00H ;; Polling interval
|
95 |
|
96 | ;; Endpoint Descriptor 1 OUT
|
97 | db DSCR_ENDPNT_LEN ;; Descriptor length
|
98 | db DSCR_ENDPNT ;; Descriptor type
|
99 | db 01H ;; Endpoint number, and direction ;; EP 1 OUT
|
100 | db ET_BULK ;; Endpoint type
|
101 | db 00H ;; Maximun packet size (LSB)
|
102 | db 04H ;; Max packect size (MSB)
|
103 | db 00H ;; Polling interval
|
104 | HighSpeedConfigDscrEnd:
|
105 |
|
106 | FullSpeedConfigDscr:
|
107 | db DSCR_CONFIG_LEN ;; Descriptor length
|
108 | db DSCR_CONFIG ;; Descriptor type
|
109 | db (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) mod 256 ;; Total Length (LSB)
|
110 | db (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) / 256 ;; Total Length (MSB)
|
111 | db 1 ;; Number of interfaces
|
112 | db 1 ;; Configuration number
|
113 | db 0 ;; Configuration string
|
114 | db 80H ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
|
115 | db 7DH ;; Power requirement (div 2 ma)
|
116 |
|
117 | ;; Interface Descriptor
|
118 | db DSCR_INTRFC_LEN ;; Descriptor length
|
119 | db DSCR_INTRFC ;; Descriptor type
|
120 | db 0 ;; Zero-based index of this interface
|
121 | db 0 ;; Alternate setting
|
122 | db 2 ;; Number of end points
|
123 | db 0ffH ;; Interface class
|
124 | db 0ffH ;; Interface sub class
|
125 | db 0ffH ;; Interface sub sub class
|
126 | db 0 ;; Interface descriptor string index
|
127 |
|
128 |
|
129 | ;; Endpoint Descriptor 1 IN
|
130 | db DSCR_ENDPNT_LEN ;; Descriptor length
|
131 | db DSCR_ENDPNT ;; Descriptor type
|
132 | db 81H ;; Endpoint number, and direction ;; EP 1 IN
|
133 | db ET_BULK ;; Endpoint type
|
134 | db 40H ;; Maximun packet size (LSB)
|
135 | db 00H ;; Max packect size (MSB)
|
136 | db 00H ;; Polling interval
|
137 |
|
138 | ;; Endpoint Descriptor 1 OUT
|
139 | db DSCR_ENDPNT_LEN ;; Descriptor length
|
140 | db DSCR_ENDPNT ;; Descriptor type
|
141 | db 01H ;; Endpoint number, and direction ;; EP 1 OUT
|
142 | db ET_BULK ;; Endpoint type
|
143 | db 40H ;; Maximun packet size (LSB)
|
144 | db 00H ;; Max packect size (MSB)
|
145 | db 00H ;; Polling interval
|
146 |
|
147 | FullSpeedConfigDscrEnd:
|
148 |
|
149 | StringDscr:
|
150 |
|
151 | StringDscr0:
|
152 | db StringDscr0End-StringDscr0 ;; String descriptor length
|
153 | db DSCR_STRING
|
154 | db 09H,04H
|
155 | StringDscr0End:
|
156 |
|
157 | StringDscr1:
|
158 | db StringDscr1End-StringDscr1 ;; String descriptor length
|
159 | db DSCR_STRING
|
160 | db 'x',00
|
161 | db 'x',00
|
162 | db 'x',00
|
163 | db '/',00
|
164 | db 'x',00
|
165 | db 'x',00
|
166 | db 'x',00
|
167 | StringDscr1End:
|
168 |
|
169 | StringDscr2:
|
170 | db StringDscr2End-StringDscr2 ;; Descriptor length
|
171 | db DSCR_STRING
|
172 | db 'x',00
|
173 | db 'x',00
|
174 | db 'x',00
|
175 | db '-',00
|
176 | db 'x',00
|
177 | db 'x',00
|
178 | db 'x',00
|
179 | db 'x',00
|
180 | db 'x',00
|
181 | StringDscr2End:
|
182 |
|
183 | UserDscr:
|
184 | dw 0000H
|
185 | end
|