📄 usb_prop.txt
字号:
;;;365 else
;;;366 {
;;;367 return((u8*)(&Max_Lun));
;;;368 }
;;;369 }
00000c 4770 BX lr
|L7.14|
00000e 4802 LDR r0,|L7.24|
000010 4770 BX lr
;;;370
ENDP
000012 0000 DCW 0x0000
|L7.20|
000014 00000000 DCD pInformation
|L7.24|
000018 00000000 DCD ||.data||
AREA ||i.MASS_Data_Setup||, CODE, READONLY, ALIGN=2
MASS_Data_Setup PROC
;;;236 RESULT MASS_Data_Setup(u8 RequestNo)
;;;237 {
000000 b500 PUSH {lr}
;;;238 u8 *(*CopyRoutine)(u16);
;;;239
;;;240 CopyRoutine = NULL;
;;;241 if ((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT))
000002 490d LDR r1,|L8.56|
000004 6809 LDR r1,[r1,#0] ; pInformation
000006 780a LDRB r2,[r1,#0]
000008 f002027f AND r2,r2,#0x7f
00000c 2a21 CMP r2,#0x21
00000e d110 BNE |L8.50|
;;;242 && (RequestNo == GET_MAX_LUN) && (pInformation->USBwValue == 0)
000010 28fe CMP r0,#0xfe
000012 d10e BNE |L8.50|
000014 8848 LDRH r0,[r1,#2]
000016 b960 CBNZ r0,|L8.50|
;;;243 && (pInformation->USBwIndex == 0) && (pInformation->USBwLength == 0x01))
000018 8888 LDRH r0,[r1,#4]
00001a b950 CBNZ r0,|L8.50|
00001c 88c8 LDRH r0,[r1,#6]
00001e 2801 CMP r0,#1
000020 d107 BNE |L8.50|
;;;244 {
;;;245 CopyRoutine = Get_Max_Lun;
000022 4806 LDR r0,|L8.60|
;;;246 }
;;;247 else
;;;248 {
;;;249 return USB_UNSUPPORT;
;;;250 }
;;;251
;;;252 if (CopyRoutine == NULL)
;;;253 {
;;;254 return USB_UNSUPPORT;
;;;255 }
;;;256
;;;257 pInformation->Ctrl_Info.CopyData = CopyRoutine;
;;;258 pInformation->Ctrl_Info.Usb_wOffset = 0;
000024 6188 STR r0,[r1,#0x18]
000026 2000 MOVS r0,#0
000028 8248 STRH r0,[r1,#0x12]
;;;259 (*CopyRoutine)(0);
00002a f7fffffe BL Get_Max_Lun
;;;260
;;;261 return USB_SUCCESS;
00002e 2000 MOVS r0,#0
;;;262
;;;263 }
000030 bd00 POP {pc}
|L8.50|
000032 2002 MOVS r0,#2 ;249
000034 bd00 POP {pc}
;;;264
ENDP
000036 0000 DCW 0x0000
|L8.56|
000038 00000000 DCD pInformation
|L8.60|
00003c 00000000 DCD Get_Max_Lun
AREA ||i.MASS_NoData_Setup||, CODE, READONLY, ALIGN=2
MASS_NoData_Setup PROC
;;;272 RESULT MASS_NoData_Setup(u8 RequestNo)
;;;273 {
000000 b510 PUSH {r4,lr}
;;;274 if ((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT))
000002 490f LDR r1,|L9.64|
000004 6809 LDR r1,[r1,#0] ; pInformation
000006 780a LDRB r2,[r1,#0]
000008 f002027f AND r2,r2,#0x7f
00000c 2a21 CMP r2,#0x21
00000e d114 BNE |L9.58|
;;;275 && (RequestNo == MASS_STORAGE_RESET) && (pInformation->USBwValue == 0)
000010 28ff CMP r0,#0xff
000012 d112 BNE |L9.58|
000014 8848 LDRH r0,[r1,#2]
000016 b980 CBNZ r0,|L9.58|
;;;276 && (pInformation->USBwIndex == 0) && (pInformation->USBwLength == 0x00))
000018 8888 LDRH r0,[r1,#4]
00001a b970 CBNZ r0,|L9.58|
00001c 88c8 LDRH r0,[r1,#6]
00001e b960 CBNZ r0,|L9.58|
;;;277 {
;;;278 /* Initialize Endpoint 1 */
;;;279 ClearDTOG_TX(ENDP1);
000020 2001 MOVS r0,#1
000022 f7fffffe BL ClearDTOG_TX
;;;280
;;;281 /* Initialize Endpoint 2 */
;;;282 ClearDTOG_RX(ENDP2);
000026 2002 MOVS r0,#2
000028 f7fffffe BL ClearDTOG_RX
;;;283
;;;284 /*intialise the CBW signature to enable the clear feature*/
;;;285 CBW.dSignature = BOT_CBW_SIGNATURE;
00002c 4906 LDR r1,|L9.72|
00002e 4805 LDR r0,|L9.68|
;;;286 Bot_State = BOT_IDLE;
000030 6008 STR r0,[r1,#0] ; CBW
000032 4906 LDR r1,|L9.76|
000034 2000 MOVS r0,#0
000036 7008 STRB r0,[r1,#0] ; Bot_State
;;;287
;;;288 return USB_SUCCESS;
;;;289 }
;;;290 return USB_UNSUPPORT;
;;;291 }
000038 bd10 POP {r4,pc}
|L9.58|
00003a 2002 MOVS r0,#2 ;290
00003c bd10 POP {r4,pc}
;;;292
ENDP
00003e 0000 DCW 0x0000
|L9.64|
000040 00000000 DCD pInformation
|L9.68|
000044 43425355 DCD 0x43425355
|L9.72|
000048 00000000 DCD ||CBW||
|L9.76|
00004c 00000000 DCD Bot_State
AREA ||i.MASS_Get_Interface_Setting||, CODE, READONLY, ALIGN=1
MASS_Get_Interface_Setting PROC
;;;302 {
;;;303 if (AlternateSetting > 0)
000000 b909 CBNZ r1,|L10.6|
;;;304 {
;;;305 return USB_UNSUPPORT;/* in this application we don't have AlternateSetting*/
;;;306 }
;;;307 else if (Interface > 0)
000002 2800 CMP r0,#0
000004 d000 BEQ |L10.8|
|L10.6|
;;;308 {
;;;309 return USB_UNSUPPORT;/*in this application we have only 1 interfaces*/
000006 2002 MOVS r0,#2
|L10.8|
;;;310 }
;;;311 return USB_SUCCESS;
;;;312 }
000008 4770 BX lr
;;;313
ENDP
AREA ||i.MASS_GetDeviceDescriptor||, CODE, READONLY, ALIGN=2
MASS_GetDeviceDescriptor PROC
;;;322 {
;;;323 return Standard_GetDescriptorData(Length, &Device_Descriptor );
000000 4901 LDR r1,|L11.8|
000002 f7ffbffe B.W Standard_GetDescriptorData
;;;324 }
;;;325
ENDP
000006 0000 DCW 0x0000
|L11.8|
000008 00000004 DCD ||.data||+0x4
AREA ||i.MASS_GetConfigDescriptor||, CODE, READONLY, ALIGN=2
MASS_GetConfigDescriptor PROC
;;;334 {
;;;335 return Standard_GetDescriptorData(Length, &Config_Descriptor );
000000 4901 LDR r1,|L12.8|
000002 f7ffbffe B.W Standard_GetDescriptorData
;;;336 }
;;;337
ENDP
000006 0000 DCW 0x0000
|L12.8|
000008 0000000c DCD ||.data||+0xc
AREA ||i.MASS_GetStringDescriptor||, CODE, READONLY, ALIGN=2
MASS_GetStringDescriptor PROC
;;;346 {
;;;347 u8 wValue0 = pInformation->USBwValue0;
000000 4903 LDR r1,|L13.16|
;;;348 return Standard_GetDescriptorData( Length, &String_Descriptor[wValue0] );
000002 4a04 LDR r2,|L13.20|
000004 6809 LDR r1,[r1,#0] ;347 ; pInformation
000006 78c9 LDRB r1,[r1,#3] ;347
000008 eb0201c1 ADD r1,r2,r1,LSL #3
00000c f7ffbffe B.W Standard_GetDescriptorData
;;;349 }
;;;350
ENDP
|L13.16|
000010 00000000 DCD pInformation
|L13.20|
000014 00000044 DCD ||.data||+0x44
AREA ||.data||, DATA, ALIGN=2
Max_Lun
000000 00000000 DCD 0x00000000
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.15|, DATA, ALIGN=0
EXPORTAS |area_number.15|, ||.data||
Device_Table
000000 0301 DCB 0x03,0x01
AREA |area_number.16|, DATA, ALIGN=2
EXPORTAS |area_number.16|, ||.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 NOP_Process
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -