⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usb_prop.txt

📁 STM32外部SRAM用作datamemery的程序 开发环境MDK
💻 TXT
📖 第 1 页 / 共 2 页
字号:
000000  b928              CBNZ     r0,|L8.14|
;;;386      {
;;;387        pInformation->Ctrl_Info.Usb_wLength = LUN_DATA_LENGTH;
000002  4904              LDR      r1,|L8.20|
000004  2001              MOVS     r0,#1
000006  6809              LDR      r1,[r1,#0]  ; pInformation
000008  8208              STRH     r0,[r1,#0x10]
;;;388        return 0;
00000a  2000              MOVS     r0,#0
;;;389      }
;;;390      else
;;;391      {
;;;392        return((u8*)(&Max_Lun));
;;;393      }
;;;394    }
00000c  4770              BX       lr
                  |L8.14|
00000e  4802              LDR      r0,|L8.24|
000010  4770              BX       lr
;;;395    
                          ENDP

000012  0000              DCW      0x0000
                  |L8.20|
000014  00000000          DCD      pInformation
                  |L8.24|
000018  00000000          DCD      ||.data||

                          AREA ||i.MASS_Data_Setup||, CODE, READONLY, ALIGN=2

                  MASS_Data_Setup PROC
;;;253    RESULT MASS_Data_Setup(u8 RequestNo)
;;;254    {
000000  b500              PUSH     {lr}
;;;255      u8    *(*CopyRoutine)(u16);
;;;256    
;;;257      CopyRoutine = NULL;
;;;258      if ((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT))
000002  490d              LDR      r1,|L9.56|
000004  6809              LDR      r1,[r1,#0]  ; pInformation
000006  780a              LDRB     r2,[r1,#0]
000008  f002f002          AND      r2,r2,#0x7f
00000c  2a21              CMP      r2,#0x21
00000e  d110              BNE      |L9.50|
;;;259          && (RequestNo == GET_MAX_LUN) && (pInformation->USBwValue == 0)
000010  28fe              CMP      r0,#0xfe
000012  d10e              BNE      |L9.50|
000014  8848              LDRH     r0,[r1,#2]
000016  b960              CBNZ     r0,|L9.50|
;;;260          && (pInformation->USBwIndex == 0) && (pInformation->USBwLength == 0x01))
000018  8888              LDRH     r0,[r1,#4]
00001a  b950              CBNZ     r0,|L9.50|
00001c  88c8              LDRH     r0,[r1,#6]
00001e  2801              CMP      r0,#1
000020  d107              BNE      |L9.50|
;;;261      {
;;;262        CopyRoutine = Get_Max_Lun;
000022  4806              LDR      r0,|L9.60|
;;;263      }
;;;264      else
;;;265      {
;;;266        return USB_UNSUPPORT;
;;;267      }
;;;268    
;;;269      if (CopyRoutine == NULL)
;;;270      {
;;;271        return USB_UNSUPPORT;
;;;272      }
;;;273    
;;;274      pInformation->Ctrl_Info.CopyData = CopyRoutine;
;;;275      pInformation->Ctrl_Info.Usb_wOffset = 0;
000024  6188              STR      r0,[r1,#0x18]
000026  2000              MOVS     r0,#0
000028  8248              STRH     r0,[r1,#0x12]
;;;276      (*CopyRoutine)(0);
00002a  f7fff7ff          BL       Get_Max_Lun
;;;277    
;;;278      return USB_SUCCESS;
00002e  2000              MOVS     r0,#0
;;;279    
;;;280    }
000030  bd00              POP      {pc}
                  |L9.50|
000032  2002              MOVS     r0,#2                 ;266
000034  bd00              POP      {pc}
;;;281    
                          ENDP

000036  0000              DCW      0x0000
                  |L9.56|
000038  00000000          DCD      pInformation
                  |L9.60|
00003c  00000000          DCD      Get_Max_Lun

                          AREA ||i.MASS_NoData_Setup||, CODE, READONLY, ALIGN=2

                  MASS_NoData_Setup PROC
;;;289    RESULT MASS_NoData_Setup(u8 RequestNo)
;;;290    {
000000  b510              PUSH     {r4,lr}
;;;291      if ((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT))
000002  490f              LDR      r1,|L10.64|
000004  6809              LDR      r1,[r1,#0]  ; pInformation
000006  780a              LDRB     r2,[r1,#0]
000008  f002f002          AND      r2,r2,#0x7f
00000c  2a21              CMP      r2,#0x21
00000e  d114              BNE      |L10.58|
;;;292          && (RequestNo == MASS_STORAGE_RESET) && (pInformation->USBwValue == 0)
000010  28ff              CMP      r0,#0xff
000012  d112              BNE      |L10.58|
000014  8848              LDRH     r0,[r1,#2]
000016  b980              CBNZ     r0,|L10.58|
;;;293          && (pInformation->USBwIndex == 0) && (pInformation->USBwLength == 0x00))
000018  8888              LDRH     r0,[r1,#4]
00001a  b970              CBNZ     r0,|L10.58|
00001c  88c8              LDRH     r0,[r1,#6]
00001e  b960              CBNZ     r0,|L10.58|
;;;294      {
;;;295        /* Initialize Endpoint 1 */
;;;296        ClearDTOG_TX(ENDP1);
000020  2001              MOVS     r0,#1
000022  f7fff7ff          BL       ClearDTOG_TX
;;;297    
;;;298        /* Initialize Endpoint 2 */
;;;299        ClearDTOG_RX(ENDP2);
000026  2002              MOVS     r0,#2
000028  f7fff7ff          BL       ClearDTOG_RX
;;;300    
;;;301        /*intialise the CBW signature to enable the clear feature*/
;;;302        CBW.dSignature = BOT_CBW_SIGNATURE;
00002c  4906              LDR      r1,|L10.72|
00002e  4805              LDR      r0,|L10.68|
;;;303        Bot_State = BOT_IDLE;
000030  6008              STR      r0,[r1,#0]  ; CBW
000032  4906              LDR      r1,|L10.76|
000034  2000              MOVS     r0,#0
000036  7008              STRB     r0,[r1,#0]  ; Bot_State
;;;304    
;;;305        return USB_SUCCESS;
;;;306      }
;;;307      return USB_UNSUPPORT;
;;;308    }
000038  bd10              POP      {r4,pc}
                  |L10.58|
00003a  2002              MOVS     r0,#2                 ;307
00003c  bd10              POP      {r4,pc}
;;;309    
                          ENDP

00003e  0000              DCW      0x0000
                  |L10.64|
000040  00000000          DCD      pInformation
                  |L10.68|
000044  43425355          DCD      0x43425355
                  |L10.72|
000048  00000000          DCD      ||CBW||
                  |L10.76|
00004c  00000000          DCD      Bot_State

                          AREA ||i.MASS_Get_Interface_Setting||, CODE, READONLY, ALIGN=1

                  MASS_Get_Interface_Setting PROC
;;;319    {
;;;320      if (AlternateSetting > 0)
000000  b909              CBNZ     r1,|L11.6|
;;;321      {
;;;322        return USB_UNSUPPORT;/* in this application we don't have AlternateSetting*/
;;;323      }
;;;324      else if (Interface > 0)
000002  2800              CMP      r0,#0
000004  d000              BEQ      |L11.8|
                  |L11.6|
;;;325      {
;;;326        return USB_UNSUPPORT;/*in this application we have only 1 interfaces*/
000006  2002              MOVS     r0,#2
                  |L11.8|
;;;327      }
;;;328      return USB_SUCCESS;
;;;329    }
000008  4770              BX       lr
;;;330    
                          ENDP


                          AREA ||i.MASS_GetDeviceDescriptor||, CODE, READONLY, ALIGN=2

                  MASS_GetDeviceDescriptor PROC
;;;339    {
;;;340      return Standard_GetDescriptorData(Length, &Device_Descriptor );
000000  4901              LDR      r1,|L12.8|
000002  f7fff7ff          B.W      Standard_GetDescriptorData
;;;341    }
;;;342    
                          ENDP

000006  0000              DCW      0x0000
                  |L12.8|
000008  00000004          DCD      ||.data||+0x4

                          AREA ||i.MASS_GetConfigDescriptor||, CODE, READONLY, ALIGN=2

                  MASS_GetConfigDescriptor PROC
;;;351    {
;;;352      return Standard_GetDescriptorData(Length, &Config_Descriptor );
000000  4901              LDR      r1,|L13.8|
000002  f7fff7ff          B.W      Standard_GetDescriptorData
;;;353    }
;;;354    
                          ENDP

000006  0000              DCW      0x0000
                  |L13.8|
000008  0000000c          DCD      ||.data||+0xc

                          AREA ||i.MASS_GetStringDescriptor||, CODE, READONLY, ALIGN=2

                  MASS_GetStringDescriptor PROC
;;;363    {
;;;364      u8 wValue0 = pInformation->USBwValue0;
000000  4905              LDR      r1,|L14.24|
000002  6809              LDR      r1,[r1,#0]  ; pInformation
000004  78c9              LDRB     r1,[r1,#3]
;;;365    
;;;366      if (wValue0 > 5)
000006  2905              CMP      r1,#5
000008  d901              BLS      |L14.14|
;;;367      {
;;;368        return NULL;
00000a  2000              MOVS     r0,#0
;;;369      }
;;;370      else
;;;371      {
;;;372        return Standard_GetDescriptorData(Length, &String_Descriptor[wValue0]);
;;;373      }
;;;374    }
00000c  4770              BX       lr
                  |L14.14|
00000e  4a03              LDR      r2,|L14.28|
000010  eb02eb02          ADD      r1,r2,r1,LSL #3       ;372
000014  f7fff7ff          B.W      Standard_GetDescriptorData
;;;375    
                          ENDP

                  |L14.24|
000018  00000000          DCD      pInformation
                  |L14.28|
00001c  00000044          DCD      ||.data||+0x44

                          AREA ||.data||, DATA, ALIGN=2

                  Max_Lun
000000  00000001          DCD      0x00000001
                  Device_Descriptor
000004  00000000          DCD      MASS_DeviceDescriptor
000008  0012              DCW      0x0012
00000a  0000              DCB      0x00,0x00
                  Config_Descriptor
00000c  00000000          DCD      MASS_ConfigDescriptor
000010  0020              DCW      0x0020
000012  0000              DCB      0x00,0x00
                  Device_Property
000014  00000000          DCD      MASS_init
000018  00000000          DCD      MASS_Reset
00001c  00000000          DCD      MASS_Status_In
000020  00000000          DCD      MASS_Status_Out
000024  00000000          DCD      MASS_Data_Setup
000028  00000000          DCD      MASS_NoData_Setup
00002c  00000000          DCD      MASS_Get_Interface_Setting
000030  00000000          DCD      MASS_GetDeviceDescriptor
000034  00000000          DCD      MASS_GetConfigDescriptor
000038  00000000          DCD      MASS_GetStringDescriptor
00003c  00000000          DCD      0x00000000
000040  40000000          DCB      0x40,0x00,0x00,0x00
                  String_Descriptor
000044  00000000          DCD      MASS_StringLangID
000048  0004              DCW      0x0004
00004a  0000              DCB      0x00,0x00
00004c  00000000          DCD      MASS_StringVendor
000050  0026              DCW      0x0026
000052  0000              DCB      0x00,0x00
000054  00000000          DCD      MASS_StringProduct
000058  0026              DCW      0x0026
00005a  0000              DCB      0x00,0x00
00005c  00000000          DCD      MASS_StringSerial
000060  001a              DCW      0x001a
000062  0000              DCB      0x00,0x00
000064  00000000          DCD      MASS_StringInterface
000068  0010              DCW      0x0010
00006a  0000              DCB      0x00,0x00

                          AREA |area_number.16|, DATA, ALIGN=0

                          EXPORTAS |area_number.16|, ||.data||
                  Device_Table
000000  0301              DCB      0x03,0x01

                          AREA |area_number.17|, DATA, ALIGN=2

                          EXPORTAS |area_number.17|, ||.data||
                  User_Standard_Requests
000000  00000000          DCD      NOP_Process
000004  00000000          DCD      Mass_Storage_SetConfiguration
000008  00000000          DCD      NOP_Process
00000c  00000000          DCD      NOP_Process
000010  00000000          DCD      NOP_Process
000014  00000000          DCD      Mass_Storage_ClearFeature
000018  00000000          DCD      NOP_Process
00001c  00000000          DCD      NOP_Process
000020  00000000          DCD      Mass_Storage_SetDeviceAddress

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -