📄 usb_prop.txt
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 934] 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..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\SRAM -I"D:\Program Files\MDK KEIL\ARM\INC\ST\STM32F10x" -D__MICROLIB --omf_browse=.\Obj\usb_prop.crf ..\..\source\usb_prop.c]
THUMB
AREA ||i.MASS_init||, CODE, READONLY, ALIGN=2
MASS_init PROC
;;;102 void MASS_init()
;;;103 {
000000 b510 PUSH {r4,lr}
;;;104 /* Update the serial number string descriptor with the data from the unique
;;;105 ID*/
;;;106 Get_SerialNum();
000002 f7fff7ff BL Get_SerialNum
;;;107
;;;108 pInformation->Current_Configuration = 0;
000006 4808 LDR r0,|L1.40|
000008 2400 MOVS r4,#0
00000a 6800 LDR r0,[r0,#0] ; pInformation
00000c 7284 STRB r4,[r0,#0xa]
;;;109
;;;110 /* Connect the device */
;;;111 PowerOn();
00000e f7fff7ff BL PowerOn
000012 4806 LDR r0,|L1.44|
;;;112
;;;113 /* USB interrupts initialization */
;;;114 /* clear pending interrupts */
;;;115 _SetISTR(0);
000014 6044 STR r4,[r0,#4]
;;;116 wInterrupt_Mask = IMR_MSK;
000016 4a06 LDR r2,|L1.48|
000018 f44ff44f MOV r1,#0x8400
00001c 8011 STRH r1,[r2,#0] ; wInterrupt_Mask
;;;117 /* set interrupts mask */
;;;118 _SetCNTR(wInterrupt_Mask);
00001e 6001 STR r1,[r0,#0]
;;;119
;;;120 bDeviceState = UNCONNECTED;
000020 4804 LDR r0,|L1.52|
000022 6004 STR r4,[r0,#0] ; bDeviceState
;;;121 }
000024 bd10 POP {r4,pc}
;;;122
ENDP
000026 0000 DCW 0x0000
|L1.40|
000028 00000000 DCD pInformation
|L1.44|
00002c 40005c40 DCD 0x40005c40
|L1.48|
000030 00000000 DCD wInterrupt_Mask
|L1.52|
000034 00000000 DCD bDeviceState
AREA ||i.MASS_Reset||, CODE, READONLY, ALIGN=2
MASS_Reset PROC
;;;130 void MASS_Reset()
;;;131 {
000000 b570 PUSH {r4-r6,lr}
;;;132 /* Set the device as not configured */
;;;133 Device_Info.Current_Configuration = 0;
000002 4831 LDR r0,|L2.200|
000004 2500 MOVS r5,#0
000006 7285 STRB r5,[r0,#0xa] ; Device_Info
;;;134
;;;135 /* Current Feature initialization */
;;;136 pInformation->Current_Feature = MASS_ConfigDescriptor[7];
000008 4931 LDR r1,|L2.208|
00000a 4830 LDR r0,|L2.204|
00000c 6809 LDR r1,[r1,#0] ; pInformation
00000e 79c0 LDRB r0,[r0,#7] ; MASS_ConfigDescriptor
000010 7248 STRB r0,[r1,#9]
;;;137
;;;138 SetBTABLE(BTABLE_ADDRESS);
000012 4628 MOV r0,r5
000014 f7fff7ff BL SetBTABLE
;;;139
;;;140 /* Initialize Endpoint 0 */
;;;141 SetEPType(ENDP0, EP_CONTROL);
000018 f44ff44f MOV r1,#0x200
00001c 2000 MOVS r0,#0
00001e f7fff7ff BL SetEPType
;;;142 SetEPTxStatus(ENDP0, EP_TX_NAK);
000022 2120 MOVS r1,#0x20
000024 2000 MOVS r0,#0
000026 f7fff7ff BL SetEPTxStatus
;;;143 SetEPRxAddr(ENDP0, ENDP0_RXADDR);
00002a 2118 MOVS r1,#0x18
00002c 2000 MOVS r0,#0
00002e f7fff7ff BL SetEPRxAddr
;;;144 SetEPRxCount(ENDP0, Device_Property.MaxPacketSize);
000032 4c28 LDR r4,|L2.212|
000034 2000 MOVS r0,#0
000036 7821 LDRB r1,[r4,#0] ; Device_Property
000038 f7fff7ff BL SetEPRxCount
;;;145 SetEPTxAddr(ENDP0, ENDP0_TXADDR);
00003c 2158 MOVS r1,#0x58
00003e 2000 MOVS r0,#0
000040 f7fff7ff BL SetEPTxAddr
;;;146 Clear_Status_Out(ENDP0);
000044 2000 MOVS r0,#0
000046 f7fff7ff BL Clear_Status_Out
;;;147 SetEPRxValid(ENDP0);
00004a 2000 MOVS r0,#0
00004c f7fff7ff BL SetEPRxValid
;;;148
;;;149 /* Initialize Endpoint 1 */
;;;150 SetEPType(ENDP1, EP_BULK);
000050 2100 MOVS r1,#0
000052 2001 MOVS r0,#1
000054 f7fff7ff BL SetEPType
;;;151 SetEPTxAddr(ENDP1, ENDP1_TXADDR);
000058 2198 MOVS r1,#0x98
00005a 2001 MOVS r0,#1
00005c f7fff7ff BL SetEPTxAddr
;;;152 SetEPTxStatus(ENDP1, EP_TX_NAK);
000060 2120 MOVS r1,#0x20
000062 2001 MOVS r0,#1
000064 f7fff7ff BL SetEPTxStatus
;;;153 SetEPRxStatus(ENDP1, EP_RX_DIS);
000068 2100 MOVS r1,#0
00006a 2001 MOVS r0,#1
00006c f7fff7ff BL SetEPRxStatus
;;;154
;;;155 /* Initialize Endpoint 2 */
;;;156 SetEPType(ENDP2, EP_BULK);
000070 2100 MOVS r1,#0
000072 2002 MOVS r0,#2
000074 f7fff7ff BL SetEPType
;;;157 SetEPRxAddr(ENDP2, ENDP2_RXADDR);
000078 21d8 MOVS r1,#0xd8
00007a 2002 MOVS r0,#2
00007c f7fff7ff BL SetEPRxAddr
;;;158 SetEPRxCount(ENDP2, Device_Property.MaxPacketSize);
000080 7821 LDRB r1,[r4,#0] ; Device_Property
000082 2002 MOVS r0,#2
000084 f7fff7ff BL SetEPRxCount
;;;159 SetEPRxStatus(ENDP2, EP_RX_VALID);
000088 f44ff44f MOV r1,#0x3000
00008c 2002 MOVS r0,#2
00008e f7fff7ff BL SetEPRxStatus
;;;160 SetEPTxStatus(ENDP2, EP_TX_DIS);
000092 2100 MOVS r1,#0
000094 2002 MOVS r0,#2
000096 f7fff7ff BL SetEPTxStatus
;;;161
;;;162
;;;163 SetEPRxCount(ENDP0, Device_Property.MaxPacketSize);
00009a 7821 LDRB r1,[r4,#0] ; Device_Property
00009c 2000 MOVS r0,#0
00009e f7fff7ff BL SetEPRxCount
;;;164 SetEPRxValid(ENDP0);
0000a2 2000 MOVS r0,#0
0000a4 f7fff7ff BL SetEPRxValid
;;;165
;;;166 /* Set the device to response on default address */
;;;167 SetDeviceAddress(0);
0000a8 2000 MOVS r0,#0
0000aa f7fff7ff BL SetDeviceAddress
;;;168
;;;169 bDeviceState = ATTACHED;
0000ae 490a LDR r1,|L2.216|
0000b0 2001 MOVS r0,#1
0000b2 6008 STR r0,[r1,#0] ; bDeviceState
;;;170
;;;171 CBW.dSignature = BOT_CBW_SIGNATURE;
0000b4 490a LDR r1,|L2.224|
0000b6 4809 LDR r0,|L2.220|
;;;172 Bot_State = BOT_IDLE;
0000b8 6008 STR r0,[r1,#0] ; CBW
0000ba 480a LDR r0,|L2.228|
0000bc 7005 STRB r5,[r0,#0] ; Bot_State
;;;173 USB_NotConfigured_LED();
0000be e8bde8bd POP {r4-r6,lr}
0000c2 f7fff7ff B.W USB_NotConfigured_LED
;;;174 }
;;;175
ENDP
0000c6 0000 DCW 0x0000
|L2.200|
0000c8 00000000 DCD Device_Info
|L2.204|
0000cc 00000000 DCD MASS_ConfigDescriptor
|L2.208|
0000d0 00000000 DCD pInformation
|L2.212|
0000d4 00000040 DCD ||.data||+0x40
|L2.216|
0000d8 00000000 DCD bDeviceState
|L2.220|
0000dc 43425355 DCD 0x43425355
|L2.224|
0000e0 00000000 DCD ||CBW||
|L2.228|
0000e4 00000000 DCD Bot_State
AREA ||i.Mass_Storage_SetConfiguration||, CODE, READONLY, ALIGN=2
Mass_Storage_SetConfiguration PROC
;;;183 void Mass_Storage_SetConfiguration(void)
;;;184 {
000000 b510 PUSH {r4,lr}
;;;185 if (pInformation->Current_Configuration != 0)
000002 4809 LDR r0,|L3.40|
000004 6800 LDR r0,[r0,#0] ; pInformation
000006 7a80 LDRB r0,[r0,#0xa]
000008 2800 CMP r0,#0
00000a d00b BEQ |L3.36|
;;;186 {
;;;187 /* Device configured */
;;;188 bDeviceState = CONFIGURED;
00000c 4907 LDR r1,|L3.44|
00000e 2005 MOVS r0,#5
000010 6008 STR r0,[r1,#0] ; bDeviceState
;;;189
;;;190 ClearDTOG_TX(ENDP1);
000012 2001 MOVS r0,#1
000014 f7fff7ff BL ClearDTOG_TX
;;;191 ClearDTOG_RX(ENDP2);
000018 2002 MOVS r0,#2
00001a f7fff7ff BL ClearDTOG_RX
;;;192 Bot_State = BOT_IDLE; /* set the Bot state machine to the IDLE state */
00001e 4904 LDR r1,|L3.48|
000020 2000 MOVS r0,#0
000022 7008 STRB r0,[r1,#0] ; Bot_State
|L3.36|
;;;193 }
;;;194 }
000024 bd10 POP {r4,pc}
;;;195
ENDP
000026 0000 DCW 0x0000
|L3.40|
000028 00000000 DCD pInformation
|L3.44|
00002c 00000000 DCD bDeviceState
|L3.48|
000030 00000000 DCD Bot_State
AREA ||i.Mass_Storage_ClearFeature||, CODE, READONLY, ALIGN=2
Mass_Storage_ClearFeature PROC
;;;206 Endpoints (IN & OUT) shall stall until receiving a Mass Storage Reset */
;;;207 if (CBW.dSignature != BOT_CBW_SIGNATURE)
000000 4804 LDR r0,|L4.20|
000002 4905 LDR r1,|L4.24|
000004 6800 LDR r0,[r0,#0] ; CBW
000006 4288 CMP r0,r1
000008 d002 BEQ |L4.16|
;;;208 Bot_Abort(BOTH_DIR);
00000a 2002 MOVS r0,#2
00000c f7fff7ff B.W Bot_Abort
|L4.16|
;;;209 }
000010 4770 BX lr
;;;210
ENDP
000012 0000 DCW 0x0000
|L4.20|
000014 00000000 DCD ||CBW||
|L4.24|
000018 43425355 DCD 0x43425355
AREA ||i.Mass_Storage_SetDeviceAddress||, CODE, READONLY, ALIGN=2
Mass_Storage_SetDeviceAddress PROC
;;;219 {
;;;220 bDeviceState = ADDRESSED;
000000 4901 LDR r1,|L5.8|
000002 2004 MOVS r0,#4
000004 6008 STR r0,[r1,#0] ; bDeviceState
;;;221 }
000006 4770 BX lr
;;;222 /*******************************************************************************
ENDP
|L5.8|
000008 00000000 DCD bDeviceState
AREA ||i.MASS_Status_In||, CODE, READONLY, ALIGN=1
MASS_Status_In PROC
;;;231 return;
;;;232 }
000000 4770 BX lr
;;;233
ENDP
AREA ||i.MASS_Status_Out||, CODE, READONLY, ALIGN=1
MASS_Status_Out PROC
;;;243 return;
;;;244 }
000000 4770 BX lr
;;;245
ENDP
AREA ||i.Get_Max_Lun||, CODE, READONLY, ALIGN=2
Get_Max_Lun PROC
;;;384 {
;;;385 if (Length == 0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -