📄 usb_prop.txt
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 938] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\usb_prop.o --depend=.\Obj\usb_prop.d --device=DARMSTM --apcs=interwork -O3 -I.\Code\FATSystem\INC -I.\Code\Library\INC -I.\Code\SDCard\INC -I.\Code\Speaker\INC -I.\Code\System\INC -I.\Code\USBMassStorage\INC -I.\Code\User\INC -I.\Code\VS1003\INC -ID:\Keil\ARM\INC\ST\STM32F10x --omf_browse=.\Obj\usb_prop.crf Code\USBMassStorage\SRC\usb_prop.c]
THUMB
AREA ||i.Mass_Storage_SetConfiguration||, CODE, READONLY, ALIGN=2
Mass_Storage_SetConfiguration PROC
;;;104 void Mass_Storage_SetConfiguration(void)
;;;105 {
000000 b510 PUSH {r4,lr}
;;;106 if (pInformation->Current_Configuration)
000002 4807 LDR r0,|L1.32|
000004 6800 LDR r0,[r0,#0] ; pInformation
000006 7a80 LDRB r0,[r0,#0xa]
000008 2800 CMP r0,#0
00000a d008 BEQ |L1.30|
;;;107 {
;;;108 ClearDTOG_TX(ENDP1);
00000c 2001 MOVS r0,#1
00000e f7fffffe BL ClearDTOG_TX
;;;109 ClearDTOG_RX(ENDP2);
000012 2002 MOVS r0,#2
000014 f7fffffe BL ClearDTOG_RX
;;;110 Bot_State = BOT_IDLE; /* set the Bot state machine to the IDLE state */
000018 4902 LDR r1,|L1.36|
00001a 2000 MOVS r0,#0
00001c 7008 STRB r0,[r1,#0] ; Bot_State
|L1.30|
;;;111 }
;;;112 }
00001e bd10 POP {r4,pc}
;;;113
ENDP
|L1.32|
000020 00000000 DCD pInformation
|L1.36|
000024 00000000 DCD Bot_State
AREA ||i.Mass_Storage_ClearFeature||, CODE, READONLY, ALIGN=2
Mass_Storage_ClearFeature PROC
;;;124 Endpoints (IN & OUT) shall stall until receiving a Mass Storage Reset */
;;;125 if (CBW.dSignature != BOT_CBW_SIGNATURE)
000000 4804 LDR r0,|L2.20|
000002 4905 LDR r1,|L2.24|
000004 6800 LDR r0,[r0,#0] ; CBW
000006 4288 CMP r0,r1
000008 d002 BEQ |L2.16|
;;;126 Bot_Abort(BOTH_DIR);
00000a 2002 MOVS r0,#2
00000c f7ffbffe B.W Bot_Abort
|L2.16|
;;;127 }
000010 4770 BX lr
;;;128
ENDP
000012 0000 DCW 0x0000
|L2.20|
000014 00000000 DCD ||CBW||
|L2.24|
000018 43425355 DCD 0x43425355
AREA ||i.MASS_init||, CODE, READONLY, ALIGN=2
MASS_init PROC
;;;136 void MASS_init()
;;;137 {
000000 b570 PUSH {r4-r6,lr}
;;;138 pInformation->Current_Configuration = 0;
000002 4c0e LDR r4,|L3.60|
000004 2500 MOVS r5,#0
000006 6820 LDR r0,[r4,#0] ; pInformation
000008 7285 STRB r5,[r0,#0xa]
;;;139
;;;140 /* Connect the device */
;;;141 PowerOn();
00000a f7fffffe BL PowerOn
00000e 480c LDR r0,|L3.64|
;;;142
;;;143 /* USB interrupts initialization */
;;;144 /* clear pending interrupts */
;;;145 _SetISTR(0);
000010 6045 STR r5,[r0,#4]
;;;146 wInterrupt_Mask = IMR_MSK;
000012 4a0c LDR r2,|L3.68|
000014 f44f4104 MOV r1,#0x8400
000018 8011 STRH r1,[r2,#0] ; wInterrupt_Mask
;;;147 /* set interrupts mask */
;;;148 _SetCNTR(wInterrupt_Mask);
00001a 6001 STR r1,[r0,#0]
;;;149 pInformation->Current_Feature = MASS_ConfigDescriptor[7];
00001c 480a LDR r0,|L3.72|
00001e 6821 LDR r1,[r4,#0] ; pInformation
000020 79c0 LDRB r0,[r0,#7] ; MASS_ConfigDescriptor
000022 7248 STRB r0,[r1,#9]
;;;150
;;;151 /* Wait until device is configured */
;;;152 while (pInformation->Current_Configuration == 0)
000024 e002 B |L3.44|
;;;153 {
;;;154 NOP_Process();
000026 bf00 NOP
|L3.40|
000028 f7fffffe BL NOP_Process
|L3.44|
00002c 6820 LDR r0,[r4,#0] ;152 ; pInformation
00002e 7a80 LDRB r0,[r0,#0xa] ;152
000030 2800 CMP r0,#0 ;152
000032 d0f9 BEQ |L3.40|
;;;155 }
;;;156 bDeviceState = CONFIGURED;
000034 4905 LDR r1,|L3.76|
000036 2005 MOVS r0,#5
000038 7008 STRB r0,[r1,#0] ; bDeviceState
;;;157 }
00003a bd70 POP {r4-r6,pc}
;;;158
ENDP
|L3.60|
00003c 00000000 DCD pInformation
|L3.64|
000040 40005c40 DCD 0x40005c40
|L3.68|
000044 00000000 DCD wInterrupt_Mask
|L3.72|
000048 00000000 DCD MASS_ConfigDescriptor
|L3.76|
00004c 00000000 DCD bDeviceState
AREA ||i.MASS_Reset||, CODE, READONLY, ALIGN=2
MASS_Reset PROC
;;;166 void MASS_Reset()
;;;167 {
000000 b570 PUSH {r4-r6,lr}
;;;168 /* Set the device as not configured */
;;;169 Device_Info.Current_Configuration = 0;
000002 482b LDR r0,|L4.176|
000004 2500 MOVS r5,#0
000006 7285 STRB r5,[r0,#0xa] ; Device_Info
;;;170
;;;171 SetBTABLE(BTABLE_ADDRESS);
000008 4628 MOV r0,r5
00000a f7fffffe BL SetBTABLE
;;;172
;;;173 /* Initialize Endpoint 0 */
;;;174 SetEPType(ENDP0, EP_CONTROL);
00000e f44f7100 MOV r1,#0x200
000012 2000 MOVS r0,#0
000014 f7fffffe BL SetEPType
;;;175 SetEPTxStatus(ENDP0, EP_TX_NAK);
000018 2120 MOVS r1,#0x20
00001a 2000 MOVS r0,#0
00001c f7fffffe BL SetEPTxStatus
;;;176 SetEPRxAddr(ENDP0, ENDP0_RXADDR);
000020 2118 MOVS r1,#0x18
000022 2000 MOVS r0,#0
000024 f7fffffe BL SetEPRxAddr
;;;177 SetEPRxCount(ENDP0, Device_Property.MaxPacketSize);
000028 4c22 LDR r4,|L4.180|
00002a 2000 MOVS r0,#0
00002c 7821 LDRB r1,[r4,#0] ; Device_Property
00002e f7fffffe BL SetEPRxCount
;;;178 SetEPTxAddr(ENDP0, ENDP0_TXADDR);
000032 2158 MOVS r1,#0x58
000034 2000 MOVS r0,#0
000036 f7fffffe BL SetEPTxAddr
;;;179 Clear_Status_Out(ENDP0);
00003a 2000 MOVS r0,#0
00003c f7fffffe BL Clear_Status_Out
;;;180 SetEPRxValid(ENDP0);
000040 2000 MOVS r0,#0
000042 f7fffffe BL SetEPRxValid
;;;181
;;;182 /* Initialize Endpoint 1 */
;;;183 SetEPType(ENDP1, EP_BULK);
000046 2100 MOVS r1,#0
000048 2001 MOVS r0,#1
00004a f7fffffe BL SetEPType
;;;184 SetEPTxAddr(ENDP1, ENDP1_TXADDR);
00004e 2198 MOVS r1,#0x98
000050 2001 MOVS r0,#1
000052 f7fffffe BL SetEPTxAddr
;;;185 SetEPTxStatus(ENDP1, EP_TX_NAK);
000056 2120 MOVS r1,#0x20
000058 2001 MOVS r0,#1
00005a f7fffffe BL SetEPTxStatus
;;;186 SetEPRxStatus(ENDP1, EP_RX_DIS);
00005e 2100 MOVS r1,#0
000060 2001 MOVS r0,#1
000062 f7fffffe BL SetEPRxStatus
;;;187
;;;188 /* Initialize Endpoint 2 */
;;;189 SetEPType(ENDP2, EP_BULK);
000066 2100 MOVS r1,#0
000068 2002 MOVS r0,#2
00006a f7fffffe BL SetEPType
;;;190 SetEPRxAddr(ENDP2, ENDP2_RXADDR);
00006e 21d8 MOVS r1,#0xd8
000070 2002 MOVS r0,#2
000072 f7fffffe BL SetEPRxAddr
;;;191 SetEPRxCount(ENDP2, Device_Property.MaxPacketSize);
000076 7821 LDRB r1,[r4,#0] ; Device_Property
000078 2002 MOVS r0,#2
00007a f7fffffe BL SetEPRxCount
;;;192 SetEPRxStatus(ENDP2, EP_RX_VALID);
00007e f44f5140 MOV r1,#0x3000
000082 2002 MOVS r0,#2
000084 f7fffffe BL SetEPRxStatus
;;;193 SetEPTxStatus(ENDP2, EP_TX_DIS);
000088 2100 MOVS r1,#0
00008a 2002 MOVS r0,#2
00008c f7fffffe BL SetEPTxStatus
;;;194
;;;195
;;;196 SetEPRxCount(ENDP0, Device_Property.MaxPacketSize);
000090 7821 LDRB r1,[r4,#0] ; Device_Property
000092 2000 MOVS r0,#0
000094 f7fffffe BL SetEPRxCount
;;;197 SetEPRxValid(ENDP0);
000098 2000 MOVS r0,#0
00009a f7fffffe BL SetEPRxValid
;;;198
;;;199 /* Set the device to response on default address */
;;;200 SetDeviceAddress(0);
00009e 2000 MOVS r0,#0
0000a0 f7fffffe BL SetDeviceAddress
;;;201 CBW.dSignature = BOT_CBW_SIGNATURE;
0000a4 4905 LDR r1,|L4.188|
0000a6 4804 LDR r0,|L4.184|
;;;202 Bot_State = BOT_IDLE;
0000a8 6008 STR r0,[r1,#0] ; CBW
0000aa 4805 LDR r0,|L4.192|
0000ac 7005 STRB r5,[r0,#0] ; Bot_State
;;;203 }
0000ae bd70 POP {r4-r6,pc}
;;;204
ENDP
|L4.176|
0000b0 00000000 DCD Device_Info
|L4.180|
0000b4 00000040 DCD ||.data||+0x40
|L4.184|
0000b8 43425355 DCD 0x43425355
|L4.188|
0000bc 00000000 DCD ||CBW||
|L4.192|
0000c0 00000000 DCD Bot_State
AREA ||i.MASS_Status_In||, CODE, READONLY, ALIGN=1
MASS_Status_In PROC
;;;214 return;
;;;215 }
000000 4770 BX lr
;;;216
ENDP
AREA ||i.MASS_Status_Out||, CODE, READONLY, ALIGN=1
MASS_Status_Out PROC
;;;226 return;
;;;227 }
000000 4770 BX lr
;;;228
ENDP
AREA ||i.Get_Max_Lun||, CODE, READONLY, ALIGN=2
Get_Max_Lun PROC
;;;359 {
;;;360 if (Length == 0)
000000 b928 CBNZ r0,|L7.14|
;;;361 {
;;;362 pInformation->Ctrl_Info.Usb_wLength = LUN_DATA_LENGTH;
000002 4904 LDR r1,|L7.20|
000004 2001 MOVS r0,#1
000006 6809 LDR r1,[r1,#0] ; pInformation
000008 8208 STRH r0,[r1,#0x10]
;;;363 return 0;
00000a 2000 MOVS r0,#0
;;;364 }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -