reqcode.LST
资源名称:USB_2.0.rar [点击查看]
上传用户:ids068
上传日期:2013-04-04
资源大小:639k
文件大小:43k
源码类别:
USB编程
开发平台:
C/C++
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 1
- C51 COMPILER V7.06, COMPILATION OF MODULE REQCODE
- OBJECT MODULE PLACED IN reqcode.OBJ
- COMPILER INVOKED BY: C:KEILC51BINC51.EXE reqcode.c OPTIMIZE(2,SPEED) BROWSE DEBUG OBJECTEXTEND
- stmt level source
- 1 //***********************************************************************
- 2 // *
- 3 // P H I L I P S P R O P R I E T A R Y *
- 4 // *
- 5 // COPYRIGHT (c) 1999 BY PHILIPS SINGAPORE (APIC). *
- 6 // -- ALL RIGHTS RESERVED -- *
- 7 // *
- 8 // File Name : RequestCode.c *
- 9 // Author : Albert Goh *
- 10 // Created : 3 March 2000 *
- 11 // *
- 12 //***********************************************************************
- 13 //***********************************************************************
- 14 // *
- 15 // Debug.c file contain the location of the routine for debugging of *
- 16 // the D14. It consist of PIO,USB,UDMA,MDMA,GDMA debugging location *
- 17 // It will branch to the respective routine via the UART or the CODE *
- 18 // definition *
- 19 // *
- 20 //***********************************************************************
- 21 //***********************************************************************
- 22 // *
- 23 // Module History *
- 24 // ************** *
- 25 // *
- 26 // Date Version Author Changes *
- 27 // ==== ======= ====== ======= *
- 28 // 030300 0.1 Albert Created *
- 29 // *
- 30 // *
- 31 //***********************************************************************
- 32
- 33 //***********************************************************************
- 34 //* *
- 35 //* Include Files Definition *
- 36 //* *
- 37 //***********************************************************************
- 38
- 39 #include "standard.h"
- 40 #include "Usb.h"
- 41 #include "kernel.h"
- 42
- 43 //***********************************************************************
- 44 //* *
- 45 //* Variable Definition *
- 46 //* *
- 47 //***********************************************************************
- 48
- 49
- 50 //***********************************************************************
- 51 //* *
- 52 //* Routine Definition *
- 53 //* *
- 54 //***********************************************************************
- 55
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 2
- 56
- 57 //***********************************************************************
- 58 //* *
- 59 //* Routine : Standard Device Descriptor *
- 60 //* Input : None *
- 61 //* Output : None *
- 62 //* Function : None *
- 63 //* *
- 64 //***********************************************************************
- 65
- 66
- 67
- 68 DEVICE_DESCRIPTOR code Standard_Device_Descriptor[] =
- 69 {
- 70
- 71 sizeof(DEVICE_DESCRIPTOR), /* length */
- 72 0x01, /* 1. bDescriptorType */
- 73 SWAP(0x0110), /* 2.-3. Version 1.1 USB spec Word */
- 74 0x00, /* 4. Class */
- 75 0x00, /* 5. bDeviceSubClass */
- 76 0x00, /* 6. bDeviceProtocol */
- 77 0x40, /* 7. bMaxPacketSize0 */
- 78 SWAP(0x04CC), /* 8.-9. idVendor */
- 79 SWAP(0x1B49), /* a.-b. idProduct for no Filter Driver */
- 80 SWAP(0x0000), /* c.-d. bcdDevice */
- 81 0x01, /* e. iManufacturer */
- 82 0x02, /* f. iProduct */
- 83 0x00, /* 10. iSerialNumber */
- 84 0x01 /* 11. bNumConfigurations */
- 85
- 86 };
- 87
- 88
- 89 DEVICE_DESCRIPTOR code HS_Device_Descriptor[] =
- 90 {
- 91
- 92 sizeof(DEVICE_DESCRIPTOR), /* length */
- 93 0x01, /* 1. bDescriptorType */
- 94 SWAP(0x0200), /* 2.-3. Version 2.0 USB spec Word */
- 95 0x00, /* 4. Class */
- 96 0x00, /* 5. bDeviceSubClass */
- 97 0x00, /* 6. bDeviceProtocol */
- 98 0x40, /* 7. bMaxPacketSize0 */
- 99 SWAP(0x04CC), /* 8.-9. idVendor */
- 100 SWAP(0x1B49), /* a.-b. idProduct */
- 101 SWAP(0x0000), /* c.-d. bcdDevice */
- 102 0x01, /* e. iManufacturer */
- 103 0x02, /* f. iProduct */
- 104 0x00, /* 10. iSerialNumber */
- 105 0x01 /* 11. bNumConfigurations */
- 106
- 107 };
- 108
- 109 //***********************************************************************
- 110 //* *
- 111 //* Routine : HS Device Qualifier *
- 112 //* Input : None *
- 113 //* Output : None *
- 114 //* Function : None *
- 115 //* *
- 116 //***********************************************************************
- 117
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 3
- 118
- 119 HS_DEVICE_QUALIFIER code HS_Device_Qualifier[] =
- 120 {
- 121
- 122 sizeof(HS_DEVICE_QUALIFIER), //length of HS Device Descriptor
- 123 0x06, //HS Device Qualifier Type
- 124 SWAP(0x0200), // USB 2.0 version
- 125 0x00, //Device class
- 126 0x00, //Device SubClass
- 127 0x00, //Device Protocol Code
- 128 0x40, //Maximum Packet SIze for other speed
- 129 0x01, //Number of Other speed configurations
- 130 0x00 //Reserved
- 131
- 132 };
- 133
- 134
- 135 //***********************************************************************
- 136 //* *
- 137 //* Routine : Standard Configuration Descriptor *
- 138 //* Input : None *
- 139 //* Output : None *
- 140 //* Function : None *
- 141 //* *
- 142 //***********************************************************************
- 143
- 144 CONFIGURATION_DESCRIPTOR code Standard_Config_Descriptor[] =
- 145 {
- 146
- 147 sizeof(CONFIGURATION_DESCRIPTOR), //Length of the configuration Descriptor
- 148 0x02, //Configuration Descriptor
- 149 SWAP(CONFIG_LENGTH), //Total length of the configurations,interface and class/endpoint
- 150 0x01, //No. of interface supported
- 151 0x01, //Configuration Value
- 152 0x00, //Index of string descriptor
- 153 0xC0, //Configurations Characteristic
- 154 0x32 //Maximun Power
- 155
- 156 };
- 157
- 158
- 159 //***********************************************************************
- 160 //* *
- 161 //* Routine : Other speed Configuration Descriptor *
- 162 //* Input : None *
- 163 //* Output : None *
- 164 //* Function : None *
- 165 //* *
- 166 //***********************************************************************
- 167
- 168 OTHER_SPEED_CONFIG_DESCRIPTOR code Other_Speed_Config_Descriptor[] =
- 169 {
- 170
- 171 sizeof(OTHER_SPEED_CONFIG_DESCRIPTOR), //length of other speed configuration descriptor
- 172 0x07, //Other speed configuration Type
- 173 SWAP(CONFIG_LENGTH), //Total length
- 174 0x01, //No of interface supported
- 175 0x01, //Configuration Value
- 176 0x00, //Index of string descriptor
- 177 0xC0, //Configurations Characteristic
- 178 0x32 //Maximun Power
- 179
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 4
- 180 };
- 181
- 182
- 183
- 184 //***********************************************************************
- 185 //* *
- 186 //* Routine : Standard Interface Descriptor *
- 187 //* Input : None *
- 188 //* Output : None *
- 189 //* Function : None *
- 190 //* *
- 191 //***********************************************************************
- 192
- 193 INTERFACE_DESCRIPTOR code Bulk_Interface_Descriptor[] =
- 194 {
- 195
- 196 sizeof(INTERFACE_DESCRIPTOR), //Length of standard interface descriptor
- 197 0x04, //Standard Interface Type
- 198 0x00, //No of Interface
- 199 0x00, //Alternate Setting Selector
- 200 0x04, //No of Endpoints
- 201 0x00, //Interface Class
- 202 0x00, //ATAPI Interface Sub Class
- 203 0x00, //Bulk Only Interface Protocol
- 204 0x00 //Index of interface string desriptor
- 205 };
- 206
- 207 INTERFACE_DESCRIPTOR code HS_Bulk_Interface_Descriptor[] =
- 208 {
- 209 sizeof(INTERFACE_DESCRIPTOR), //Length of standard interface descriptor
- 210 0x04, //Standard Interface Type
- 211 0x00, //No of Interface
- 212 0x00, //Alternate Setting Selector
- 213 0x04, //No of Endpoints
- 214 0x00, //Interface Class
- 215 0x00, //ATAPI Interface Sub Class
- 216 0x00, //Bulk Only Interface Protocol
- 217 0x00 //Index of interface string desriptor
- 218 };
- 219
- 220
- 221 //***********************************************************************
- 222 //* *
- 223 //* Routine : Standard Endpoint Descriptor *
- 224 //* Input : None *
- 225 //* Output : None *
- 226 //* Function : None *
- 227 //* *
- 228 //***********************************************************************
- 229
- 230 ENDPOINT_DESCRIPTOR code Bulk_Out_Descriptor[] =
- 231 {
- 232
- 233 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 234 0x05, //Standard Endpoint Type
- 235 0x02, //Set Bulk endpoint to 1 for ATAPI mode
- 236 0x02, //Endpoint Characteristic
- 237 SWAP(0x0040), //Endpoint Max Packet Size
- 238 0x00 //Interval for Polling Endpoint for data transfer
- 239
- 240 };
- 241
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 5
- 242 ENDPOINT_DESCRIPTOR code Bulk_In_Descriptor[] =
- 243 {
- 244 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 245 0x05, //Standard Endpoint Type
- 246 0x82, //Set Bulk endpoint to 1 for ATAPI mode
- 247 0x02, //Endpoint Characteristic
- 248 SWAP(0x0040), //Endpoint Max Packet Size
- 249 0x00 //Interval for Polling Endpoint for data transfer
- 250
- 251 };
- 252
- 253
- 254 ENDPOINT_DESCRIPTOR code HS_Bulk_Out_Descriptor[] =
- 255 {
- 256
- 257 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 258 0x05, //Standard Endpoint Type
- 259 0x02, //Set Bulk endpoint to 1 for ATAPI mode
- 260 0x02, //Endpoint Characteristic
- 261 SWAP(0x0200), //Endpoint Max Packet Size
- 262 0x00 //Interval for Polling Endpoint for data transfer
- 263
- 264 };
- 265
- 266 ENDPOINT_DESCRIPTOR code HS_Bulk_In_Descriptor[] =
- 267 {
- 268 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 269 0x05, //Standard Endpoint Type
- 270 0x82, //Set Bulk endpoint to 1 for ATAPI mode
- 271 0x02, //Endpoint Characteristic
- 272 SWAP(0x0200), //Endpoint Max Packet Size
- 273 0x00 //Interval for Polling Endpoint for data transfer
- 274
- 275 };
- 276
- 277
- 278 ENDPOINT_DESCRIPTOR code Int_Out_Descriptor[] =
- 279 {
- 280
- 281 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 282 0x05, //Standard Endpoint Type
- 283 0x01, //Set Int endpoint to 2 for ATAPI mode
- 284 0x03, //Endpoint Characteristic
- 285 SWAP(0x0040), //Endpoint Max Packet Size
- 286 0x01 //Interval for Polling Endpoint for data transfer
- 287
- 288 };
- 289
- 290 ENDPOINT_DESCRIPTOR code Int_In_Descriptor[] =
- 291 {
- 292 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 293 0x05, //Standard Endpoint Type
- 294 0x81, //Set Int endpoint to 2 for ATAPI mode
- 295 0x03, //Endpoint Characteristic
- 296 SWAP(0x0040), //Endpoint Max Packet Size
- 297 0x01 //Interval for Polling Endpoint for data transfer
- 298
- 299 };
- 300
- 301 ENDPOINT_DESCRIPTOR code HS_Int_Out_Descriptor[] =
- 302 {
- 303
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 6
- 304 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 305 0x05, //Standard Endpoint Type
- 306 0x01, //Set Int endpoint to 2 for ATAPI mode
- 307 0x03, //Endpoint Characteristic
- 308 SWAP(0x0040), //Endpoint Max Packet Size
- 309 0x01 //Interval for Polling Endpoint for data transfer
- 310
- 311 };
- 312
- 313 ENDPOINT_DESCRIPTOR code HS_Int_In_Descriptor[] =
- 314 {
- 315 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 316 0x05, //Standard Endpoint Type
- 317 0x81, //Set Int endpoint to 2 for ATAPI mode
- 318 0x03, //Endpoint Characteristic
- 319 SWAP(0x0040), //Endpoint Max Packet Size
- 320 0x01 //Interval for Polling Endpoint for data transfer
- 321
- 322 };
- 323
- 324 //***********************************************************************
- 325 //* *
- 326 //* Routine : Standard Interface Descriptor *
- 327 //* Input : None *
- 328 //* Output : None *
- 329 //* Function : None *
- 330 //* *
- 331 //***********************************************************************
- 332
- 333 INTERFACE_DESCRIPTOR code Iso_Interface_Descriptor[] =
- 334 {
- 335
- 336 sizeof(INTERFACE_DESCRIPTOR), //Length of standard interface descriptor
- 337 0x04, //Standard Interface Type
- 338 0x00, //No of Interface
- 339 0x01, //Alternate Setting Selector
- 340 0x02, //No of Endpoints
- 341 0x00, //Interface Class
- 342 0x00, //Interface Sub Class
- 343 0x00, //Interface Protocol
- 344 0x00 //Index of interface string desriptor
- 345
- 346 };
- 347
- 348
- 349 ENDPOINT_DESCRIPTOR code Iso_Out_Descriptor[] =
- 350 {
- 351
- 352 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 353 0x05, //Standard Endpoint Type
- 354 0x03, //Enndpoint Address
- 355 0x01, //Endpoint Characteristic
- 356 SWAP(0x0040), //Endpoint Max Packet Size
- 357 0x01 //Interval for Polling Endpoint for data transfer
- 358
- 359 };
- 360
- 361 ENDPOINT_DESCRIPTOR code Iso_In_Descriptor[] =
- 362 {
- 363
- 364 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 365 0x05, //Standard Endpoint Type
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 7
- 366 0x83, //Enndpoint Address
- 367 0x01, //Endpoint Characteristic
- 368 SWAP(0x0040), //Endpoint Max Packet Size
- 369 0x01 //Interval for Polling Endpoint for data transfer
- 370
- 371 };
- 372
- 373 ENDPOINT_DESCRIPTOR code Iso_Out_Zero_Descriptor[] =
- 374 {
- 375
- 376 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 377 0x05, //Standard Endpoint Type
- 378 0x03, //Enndpoint Address
- 379 0x01, //Endpoint Characteristic
- 380 SWAP(0x0000), //Endpoint Max Packet Size
- 381 0x01 //Interval for Polling Endpoint for data transfer
- 382
- 383 };
- 384
- 385 ENDPOINT_DESCRIPTOR code Iso_In_Zero_Descriptor[] =
- 386 {
- 387
- 388 sizeof(ENDPOINT_DESCRIPTOR), //Length of Standard Endpoint Descriptor
- 389 0x05, //Standard Endpoint Type
- 390 0x83, //Enndpoint Address
- 391 0x01, //Endpoint Characteristic
- 392 SWAP(0x0000), //Endpoint Max Packet Size
- 393 0x01 //Interval for Polling Endpoint for data transfer
- 394
- 395 };
- 396
- 397 //***********************************************************************
- 398 //* *
- 399 //* Routine : Standard String Descriptor *
- 400 //* Input : None *
- 401 //* Output : None *
- 402 //* Function : None *
- 403 //* *
- 404 //***********************************************************************
- 405
- 406 STRING_DESCRIPTOR code Standard_Product_String[] =
- 407
- 408 { 0x30, /* length */
- 409 0x03, /* descriptor type = string */
- 410 'P' , 0x00,
- 411 'h' , 0x00,
- 412 'i' , 0x00,
- 413 'l' , 0x00,
- 414 'i' , 0x00,
- 415 'p' , 0x00,
- 416 's' , 0x00,
- 417 ' ' , 0x00,
- 418 'I' , 0x00,
- 419 'S' , 0x00,
- 420 'P' , 0x00,
- 421 '1' , 0x00,
- 422 '5' , 0x00,
- 423 '8' , 0x00,
- 424 '1' , 0x00,
- 425 ' ' , 0x00,
- 426 'V' , 0x00,
- 427 'e' , 0x00,
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 8
- 428 'r' , 0x00,
- 429 ' ' , 0x00,
- 430 '1' , 0x00,
- 431 '.' , 0x00,
- 432 '0' , 0x00
- 433 };
- 434
- 435 //***********************************************************************
- 436 //* *
- 437 //* Routine : Standard String Descriptor *
- 438 //* Input : None *
- 439 //* Output : None *
- 440 //* Function : None *
- 441 //* *
- 442 //***********************************************************************
- 443
- 444 STRING_DESCRIPTOR code Standard_Manufacturer_String[] =
- 445
- 446 { 0x1C, /* length */
- 447 0x03, /* descriptor type = string */
- 448 'P' , 0x00,
- 449 'h' , 0x00,
- 450 'i' , 0x00,
- 451 'l' , 0x00,
- 452 'i' , 0x00,
- 453 'p' , 0x00,
- 454 ' ' , 0x00,
- 455 '-' , 0x00,
- 456 ' ' , 0x00,
- 457 'A' , 0x00,
- 458 'P' , 0x00,
- 459 'I' , 0x00,
- 460 'C' , 0x00
- 461 };
- 462
- 463
- 464
- 465 //***********************************************************************
- 466 //* *
- 467 //* Routine : Standard String Identifications *
- 468 //* Input : None *
- 469 //* Output : None *
- 470 //* Function : None *
- 471 //* *
- 472 //***********************************************************************
- 473
- 474 STRING_ID code Standard_String_ID[] =
- 475 {
- 476
- 477 0x04,
- 478 0x03,
- 479 0x09,
- 480 0x04
- 481
- 482 };
- 483
- 484
- 485
- 486 //***********************************************************************
- 487 //* *
- 488 //* Routine : Standard Mass Storage Identifications *
- 489 //* Input : None *
- C51 COMPILER V7.06 REQCODE 07/02/2003 09:29:11 PAGE 9
- 490 //* Output : None *
- 491 //* Function : None *
- 492 //* *
- 493 //***********************************************************************
- 494 UC code Test_Packet[] =
- 495 {
- 496 // 0x00, 0x00,
- 497 // 0x00, 0x80, // syn pattern
- 498 0xc3,
- 499 0x00, 0x00,
- 500 0x00, 0x00,
- 501 0x00, 0x00,
- 502 0x00, 0x00,
- 503 0x00, 0xaa,
- 504 0xaa, 0xaa,
- 505 0xaa, 0xaa,
- 506 0xaa, 0xaa,
- 507 0xaa, 0xee, //aa*4
- 508 0xee, 0xee,
- 509 0xee, 0xee,
- 510 0xee, 0xee,
- 511 0xee, 0xfe, //ee*4
- 512 0xff, 0xff,
- 513 0xff, 0xff,
- 514 0xff, 0xff,
- 515 0xff, 0xff,
- 516 0xff, 0xff, //FF*6
- 517 0xff, 0x7f,
- 518 0xbf, 0xdf,
- 519 0xef, 0xf7,
- 520 0xfb, 0xfd,
- 521 0xfc, 0x7e,
- 522 0xbf, 0xdf,
- 523 0xef, 0xf7,
- 524 0xfb, 0xfd,
- 525 0x7e,
- 526 0xb6, 0xce // crc
- 527 // 0xff, 0xf7
- 528 };
- MODULE INFORMATION: STATIC OVERLAYABLE
- CODE SIZE = ---- ----
- CONSTANT SIZE = 331 ----
- XDATA SIZE = ---- ----
- PDATA SIZE = ---- ----
- DATA SIZE = ---- ----
- IDATA SIZE = ---- ----
- BIT SIZE = ---- ----
- END OF MODULE INFORMATION.
- C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)