A51 MACRO ASSEMBLER DSCR 12/28/2007 10:51:02 PAGE 1 MACRO ASSEMBLER A51 V8.00d OBJECT MODULE PLACED IN .\Debug\DSCR.obj ASSEMBLER INVOKED BY: C:\Program Files\Keil\C51\BIN\A51.EXE DSCR.A51 SET(SMALL) DEBUG OBJECT(.\Debug\DSCR.obj) EP LOC OBJ LINE SOURCE 1 ;;------------------------------------------------------------------------------ 2 ;; File: dscr.a51 3 ;; Contents: This file contains descriptor data tables. 4 ;; 5 ;; $Archive: /USB/Examples/Fx2lp/bulkloop/dscr.a51 $ 6 ;; $Date: 9/01/03 8:51p $ 7 ;; $Revision: 3 $ 8 ;; 9 ;; 10 ;;------------------------------------------------------------------------------ 11 ;; Copyright 2003, Cypress Semiconductor Corporation 12 ;;------------------------------------------------------------------------------ 13 14 ;;______________________________________________________________________________ 15 ;; {Trace} 16 ;; [File name] "DSCR.A51" 17 ;; [Language] "Assembly for A8051 Standard" 18 ;; [Last revision] "02 Nov 2007" 19 ;; [Author] "Cypress" 20 ;; [Modified by] "Piero Giubilato" 21 ;; [Member of] "FX2 Firmware" 22 ;; [Description] "This file is the assembly descriptor containing the device" 23 ;; "specifications, like PID, VID, DID, ...." 24 ;; [Compiler] "" 25 ;; [Key documentation] "Cypress EZ-USB Technical Reference Manual" 26 ;; {Trace} 27 ;;______________________________________________________________________________ 28 29 ;;------------------------------------------------------------------------------ 30 ;; Pay attention: Words used here are BIG ENDIAN due to descriptor convention, 31 ;; while USB convention requires for LITTLE EENDIAN, so remember that values 32 ;; must be byte-swapped! 33 ;;------------------------------------------------------------------------------ 34 35 0001 36 DSCR_DEVICE equ 1 ;; Descriptor type: Device 0002 37 DSCR_CONFIG equ 2 ;; Descriptor type: Configuration 0003 38 DSCR_STRING equ 3 ;; Descriptor type: String 0004 39 DSCR_INTRFC equ 4 ;; Descriptor type: Interface 0005 40 DSCR_ENDPNT equ 5 ;; Descriptor type: Endpoint 0006 41 DSCR_DEVQUAL equ 6 ;; Descriptor type: Device Qualifier 42 0012 43 DSCR_DEVICE_LEN equ 18 0009 44 DSCR_CONFIG_LEN equ 9 0009 45 DSCR_INTRFC_LEN equ 9 0007 46 DSCR_ENDPNT_LEN equ 7 000A 47 DSCR_DEVQUAL_LEN equ 10 48 0000 49 ET_CONTROL equ 0 ;; Endpoint type: Control 0001 50 ET_ISO equ 1 ;; Endpoint type: Isochronous 0002 51 ET_BULK equ 2 ;; Endpoint type: Bulk 0003 52 ET_INT equ 3 ;; Endpoint type: Interrupt 53 54 public DeviceDscr, DeviceQualDscr, HighSpeedConfigDscr, FullSpeedConfigDscr, StringDsc r, UserDscr 55 56 DSCR SEGMENT CODE PAGE 57 A51 MACRO ASSEMBLER DSCR 12/28/2007 10:51:02 PAGE 2 58 ;;------------------------------------------------------------------------------ 59 ;; Global Variables 60 ;;------------------------------------------------------------------------------ ---- 61 rseg DSCR ;; locate the descriptor table in on-part memory. 62 0000 63 DeviceDscr: 0000 12 64 db DSCR_DEVICE_LEN ;; Descriptor length 0001 01 65 db DSCR_DEVICE ;; Decriptor type 0002 0002 66 dw 0002H ;; Specification Version (BCD) 0004 00 67 db 00H ;; Device class 0005 00 68 db 00H ;; Device sub-class 0006 00 69 db 00H ;; Device sub-sub-class 0007 40 70 db 64 ;; Maximum packet size 0008 0E0B 71 dw 0e0bH ;; Vendor ID 000A 0A0D 72 dw 0a0dH ;; Product ID (Sample Device) 000C 0100 73 dw 0100H ;; Product version ID 000E 01 74 db 1 ;; Manufacturer string index 000F 02 75 db 2 ;; Product string index 0010 00 76 db 0 ;; Serial number string index 0011 01 77 db 1 ;; Number of configurations 78 0012 79 DeviceQualDscr: 0012 0A 80 db DSCR_DEVQUAL_LEN ;; Descriptor length 0013 06 81 db DSCR_DEVQUAL ;; Decriptor type 0014 0002 82 dw 0002H ;; Specification Version (BCD) 0016 00 83 db 00H ;; Device class 0017 00 84 db 00H ;; Device sub-class 0018 00 85 db 00H ;; Device sub-sub-class 0019 40 86 db 64 ;; Maximum packet size 001A 01 87 db 1 ;; Number of configurations 001B 00 88 db 0 ;; Reserved 89 001C 90 HighSpeedConfigDscr: 001C 09 91 db DSCR_CONFIG_LEN ;; Descriptor length 001D 02 92 db DSCR_CONFIG ;; Descriptor type 001E 2E 93 db (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) mod 256 ;; Total Length (LSB) 001F 00 94 db (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) / 256 ;; Total Length (MSB) 0020 01 95 db 1 ;; Number of interfaces 0021 01 96 db 1 ;; Configuration number 0022 00 97 db 0 ;; Configuration string 0023 80 98 db 10000000b ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu) 0024 32 99 db 50 ;; Power requirement (div 2 ma) 100 101 ;; Interface Descriptor 0025 09 102 db DSCR_INTRFC_LEN ;; Descriptor length 0026 04 103 db DSCR_INTRFC ;; Descriptor type 0027 00 104 db 0 ;; Zero-based index of this interface 0028 00 105 db 0 ;; Alternate setting 0029 04 106 db 4 ;; Number of end points 002A FF 107 db 0ffH ;; Interface class 002B 00 108 db 00H ;; Interface sub class 002C 00 109 db 00H ;; Interface sub sub class 002D 00 110 db 0 ;; Interface descriptor string index 111 112 ;; Endpoint Descriptor 002E 07 113 db DSCR_ENDPNT_LEN ;; Descriptor length 002F 05 114 db DSCR_ENDPNT ;; Descriptor type 0030 02 115 db 02H ;; Endpoint number, and direction 0031 02 116 db ET_BULK ;; Endpoint type 0032 00 117 db 00H ;; Maximun packet size (LSB) 0033 02 118 db 02H ;; Max packect size (MSB) 0034 00 119 db 00H ;; Polling interval 120 121 ;; Endpoint Descriptor 0035 07 122 db DSCR_ENDPNT_LEN ;; Descriptor length 0036 05 123 db DSCR_ENDPNT ;; Descriptor type A51 MACRO ASSEMBLER DSCR 12/28/2007 10:51:02 PAGE 3 0037 04 124 db 04H ;; Endpoint number, and direction 0038 02 125 db ET_BULK ;; Endpoint type 0039 00 126 db 00H ;; Maximun packet size (LSB) 003A 02 127 db 02H ;; Max packect size (MSB) 003B 00 128 db 00H ;; Polling interval 129 130 ;; Endpoint Descriptor 003C 07 131 db DSCR_ENDPNT_LEN ;; Descriptor length 003D 05 132 db DSCR_ENDPNT ;; Descriptor type 003E 86 133 db 86H ;; Endpoint number, and direction 003F 02 134 db ET_BULK ;; Endpoint type 0040 00 135 db 00H ;; Maximun packet size (LSB) 0041 02 136 db 02H ;; Max packect size (MSB) 0042 00 137 db 00H ;; Polling interval 138 139 ;; Endpoint Descriptor 0043 07 140 db DSCR_ENDPNT_LEN ;; Descriptor length 0044 05 141 db DSCR_ENDPNT ;; Descriptor type 0045 88 142 db 88H ;; Endpoint number, and direction 0046 02 143 db ET_BULK ;; Endpoint type 0047 00 144 db 00H ;; Maximun packet size (LSB) 0048 02 145 db 02H ;; Max packect size (MSB) 0049 00 146 db 00H ;; Polling interval 147 004A 148 HighSpeedConfigDscrEnd: 149 004A 150 FullSpeedConfigDscr: 004A 09 151 db DSCR_CONFIG_LEN ;; Descriptor length 004B 02 152 db DSCR_CONFIG ;; Descriptor type 004C 2E 153 db (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) mod 256 ;; Total Length (LSB) 004D 00 154 db (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) / 256 ;; Total Length (MSB) 004E 01 155 db 1 ;; Number of interfaces 004F 01 156 db 1 ;; Configuration number 0050 00 157 db 0 ;; Configuration string 0051 80 158 db 10000000b ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu) 0052 32 159 db 50 ;; Power requirement (div 2 ma) 160 161 ;; Interface Descriptor 0053 09 162 db DSCR_INTRFC_LEN ;; Descriptor length 0054 04 163 db DSCR_INTRFC ;; Descriptor type 0055 00 164 db 0 ;; Zero-based index of this interface 0056 00 165 db 0 ;; Alternate setting 0057 04 166 db 4 ;; Number of end points 0058 FF 167 db 0ffH ;; Interface class 0059 00 168 db 00H ;; Interface sub class 005A 00 169 db 00H ;; Interface sub sub class 005B 00 170 db 0 ;; Interface descriptor string index 171 172 ;; Endpoint Descriptor 005C 07 173 db DSCR_ENDPNT_LEN ;; Descriptor length 005D 05 174 db DSCR_ENDPNT ;; Descriptor type 005E 02 175 db 02H ;; Endpoint number, and direction 005F 02 176 db ET_BULK ;; Endpoint type 0060 40 177 db 40H ;; Maximun packet size (LSB) 0061 00 178 db 00H ;; Max packect size (MSB) 0062 00 179 db 00H ;; Polling interval 180 181 ;; Endpoint Descriptor 0063 07 182 db DSCR_ENDPNT_LEN ;; Descriptor length 0064 05 183 db DSCR_ENDPNT ;; Descriptor type 0065 04 184 db 04H ;; Endpoint number, and direction 0066 02 185 db ET_BULK ;; Endpoint type 0067 40 186 db 40H ;; Maximun packet size (LSB) 0068 00 187 db 00H ;; Max packect size (MSB) 0069 00 188 db 00H ;; Polling interval 189 A51 MACRO ASSEMBLER DSCR 12/28/2007 10:51:02 PAGE 4 190 ;; Endpoint Descriptor 006A 07 191 db DSCR_ENDPNT_LEN ;; Descriptor length 006B 05 192 db DSCR_ENDPNT ;; Descriptor type 006C 86 193 db 86H ;; Endpoint number, and direction 006D 02 194 db ET_BULK ;; Endpoint type 006E 40 195 db 40H ;; Maximun packet size (LSB) 006F 00 196 db 00H ;; Max packect size (MSB) 0070 00 197 db 00H ;; Polling interval 198 199 ;; Endpoint Descriptor 0071 07 200 db DSCR_ENDPNT_LEN ;; Descriptor length 0072 05 201 db DSCR_ENDPNT ;; Descriptor type 0073 88 202 db 88H ;; Endpoint number, and direction 0074 02 203 db ET_BULK ;; Endpoint type 0075 40 204 db 40H ;; Maximun packet size (LSB) 0076 00 205 db 00H ;; Max packect size (MSB) 0077 00 206 db 00H ;; Polling interval 207 0078 208 FullSpeedConfigDscrEnd: 209 0078 210 StringDscr: 211 0078 212 StringDscr0: 0078 04 213 db StringDscr0End-StringDscr0 ;; String descriptor length 0079 03 214 db DSCR_STRING 007A 0904 215 db 09H,04H 007C 216 StringDscr0End: 217 007C 218 StringDscr1: 007C 12 219 db StringDscr1End-StringDscr1 ;; String descriptor length 007D 03 220 db DSCR_STRING 007E 4200 221 db 'B',00 0080 6500 222 db 'e',00 0082 7200 223 db 'r',00 0084 6B00 224 db 'k',00 0086 6500 225 db 'e',00 0088 6C00 226 db 'l',00 008A 6500 227 db 'e',00 008C 7900 228 db 'y',00 008E 229 StringDscr1End: 230 008E 231 StringDscr2: 008E 2C 232 db StringDscr2End-StringDscr2 ;; Descriptor length 008F 03 233 db DSCR_STRING 0090 4200 234 db 'B',00 0092 6500 235 db 'e',00 0094 7200 236 db 'r',00 0096 6B00 237 db 'k',00 0098 6500 238 db 'e',00 009A 6C00 239 db 'l',00 009C 6500 240 db 'e',00 009E 7900 241 db 'y',00 00A0 2000 242 db ' ',00 00A2 4400 243 db 'D',00 00A4 4100 244 db 'A',00 00A6 5100 245 db 'Q',00 00A8 2000 246 db ' ',00 00AA 4200 247 db 'B',00 00AC 6F00 248 db 'o',00 00AE 6100 249 db 'a',00 00B0 7200 250 db 'r',00 00B2 6400 251 db 'd',00 00B4 2000 252 db ' ',00 00B6 3000 253 db '0',00 00B8 3100 254 db '1',00 255 A51 MACRO ASSEMBLER DSCR 12/28/2007 10:51:02 PAGE 5 00BA 256 StringDscr2End: 257 00BA 258 UserDscr: 00BA 0000 259 dw 0000H 260 end A51 MACRO ASSEMBLER DSCR 12/28/2007 10:51:02 PAGE 6 SYMBOL TABLE LISTING ------ ----- ------- N A M E T Y P E V A L U E ATTRIBUTES DEVICEDSCR . . . . . . C ADDR 0000H R SEG=DSCR DEVICEQUALDSCR . . . . C ADDR 0012H R SEG=DSCR DSCR . . . . . . . . . C SEG 00BCH REL=PAGE DSCR_CONFIG. . . . . . N NUMB 0002H A DSCR_CONFIG_LEN. . . . N NUMB 0009H A DSCR_DEVICE. . . . . . N NUMB 0001H A DSCR_DEVICE_LEN. . . . N NUMB 0012H A DSCR_DEVQUAL . . . . . N NUMB 0006H A DSCR_DEVQUAL_LEN . . . N NUMB 000AH A DSCR_ENDPNT. . . . . . N NUMB 0005H A DSCR_ENDPNT_LEN. . . . N NUMB 0007H A DSCR_INTRFC. . . . . . N NUMB 0004H A DSCR_INTRFC_LEN. . . . N NUMB 0009H A DSCR_STRING. . . . . . N NUMB 0003H A ET_BULK. . . . . . . . N NUMB 0002H A ET_CONTROL . . . . . . N NUMB 0000H A ET_INT . . . . . . . . N NUMB 0003H A ET_ISO . . . . . . . . N NUMB 0001H A FULLSPEEDCONFIGDSCR. . C ADDR 004AH R SEG=DSCR FULLSPEEDCONFIGDSCREND C ADDR 0078H R SEG=DSCR HIGHSPEEDCONFIGDSCR. . C ADDR 001CH R SEG=DSCR HIGHSPEEDCONFIGDSCREND C ADDR 004AH R SEG=DSCR STRINGDSCR . . . . . . C ADDR 0078H R SEG=DSCR STRINGDSCR0. . . . . . C ADDR 0078H R SEG=DSCR STRINGDSCR0END . . . . C ADDR 007CH R SEG=DSCR STRINGDSCR1. . . . . . C ADDR 007CH R SEG=DSCR STRINGDSCR1END . . . . C ADDR 008EH R SEG=DSCR STRINGDSCR2. . . . . . C ADDR 008EH R SEG=DSCR STRINGDSCR2END . . . . C ADDR 00BAH R SEG=DSCR USERDSCR . . . . . . . C ADDR 00BAH R SEG=DSCR REGISTER BANK(S) USED: 0 ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)