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