📄 usb_prop.txt
字号:
;;;150 SetEPType(ENDP1, EP_BULK);
000050 2100 MOVS r1,#0
000052 2001 MOVS r0,#1
000054 f7fffffe BL SetEPType
;;;151 SetEPTxAddr(ENDP1, ENDP1_TXADDR);
000058 2198 MOVS r1,#0x98
00005a 2001 MOVS r0,#1
00005c f7fffffe BL SetEPTxAddr
;;;152 SetEPTxStatus(ENDP1, EP_TX_NAK);
000060 2120 MOVS r1,#0x20
000062 2001 MOVS r0,#1
000064 f7fffffe BL SetEPTxStatus
;;;153 SetEPRxStatus(ENDP1, EP_RX_DIS);
000068 2100 MOVS r1,#0
00006a 2001 MOVS r0,#1
00006c f7fffffe BL SetEPRxStatus
;;;154
;;;155 /* Initialize Endpoint 2 */
;;;156 SetEPType(ENDP2, EP_BULK);
000070 2100 MOVS r1,#0
000072 2002 MOVS r0,#2
000074 f7fffffe BL SetEPType
;;;157 SetEPRxAddr(ENDP2, ENDP2_RXADDR);
000078 21d8 MOVS r1,#0xd8
00007a 2002 MOVS r0,#2
00007c f7fffffe BL SetEPRxAddr
;;;158 SetEPRxCount(ENDP2, Device_Property.MaxPacketSize);
000080 7821 LDRB r1,[r4,#0] ; Device_Property
000082 2002 MOVS r0,#2
000084 f7fffffe BL SetEPRxCount
;;;159 SetEPRxStatus(ENDP2, EP_RX_VALID);
000088 f44f5140 MOV r1,#0x3000
00008c 2002 MOVS r0,#2
00008e f7fffffe BL SetEPRxStatus
;;;160 SetEPTxStatus(ENDP2, EP_TX_DIS);
000092 2100 MOVS r1,#0
000094 2002 MOVS r0,#2
000096 f7fffffe BL SetEPTxStatus
;;;161
;;;162
;;;163 SetEPRxCount(ENDP0, Device_Property.MaxPacketSize);
00009a 7821 LDRB r1,[r4,#0] ; Device_Property
00009c 2000 MOVS r0,#0
00009e f7fffffe BL SetEPRxCount
;;;164 SetEPRxValid(ENDP0);
0000a2 2000 MOVS r0,#0
0000a4 f7fffffe BL SetEPRxValid
;;;165
;;;166 /* Set the device to response on default address */
;;;167 SetDeviceAddress(0);
0000a8 2000 MOVS r0,#0
0000aa f7fffffe BL SetDeviceAddress
;;;168
;;;169 bDeviceState = ATTACHED;
0000ae 490a LDR r1,|L8.216|
0000b0 2001 MOVS r0,#1
0000b2 6008 STR r0,[r1,#0] ; bDeviceState
;;;170
;;;171 CBW.dSignature = BOT_CBW_SIGNATURE;
0000b4 490a LDR r1,|L8.224|
0000b6 4809 LDR r0,|L8.220|
;;;172 Bot_State = BOT_IDLE;
0000b8 6008 STR r0,[r1,#0] ; CBW
0000ba 480a LDR r0,|L8.228|
0000bc 7005 STRB r5,[r0,#0]
;;;173 USB_NotConfigured_LED();
0000be e8bd4070 POP {r4-r6,lr}
0000c2 f7ffbffe B.W USB_NotConfigured_LED
;;;174 }
;;;175
ENDP
0000c6 0000 DCW 0x0000
|L8.200|
DCD Device_Info
|L8.204|
DCD MASS_ConfigDescriptor
|L8.208|
DCD pInformation
|L8.212|
DCD ||.data||+0x40
|L8.216|
DCD bDeviceState
|L8.220|
DCD 0x43425355
|L8.224|
DCD ||CBW||
|L8.228|
DCD Bot_State
AREA ||i.MASS_Status_In||, CODE, READONLY, ALIGN=1
MASS_Status_In PROC
;;;228 *******************************************************************************/
;;;229 void MASS_Status_In(void)
000000 4770 BX lr
;;;230 {
;;;231 return;
;;;232 }
;;;233
ENDP
AREA ||i.MASS_Status_Out||, CODE, READONLY, ALIGN=1
MASS_Status_Out PROC
;;;240 *******************************************************************************/
;;;241 void MASS_Status_Out(void)
000000 4770 BX lr
;;;242 {
;;;243 return;
;;;244 }
;;;245
ENDP
AREA ||i.MASS_init||, CODE, READONLY, ALIGN=2
MASS_init PROC
;;;101 *******************************************************************************/
;;;102 void MASS_init()
000000 b510 PUSH {r4,lr}
;;;103 {
;;;104 /* Update the serial number string descriptor with the data from the unique
;;;105 ID*/
;;;106 Get_SerialNum();
000002 f7fffffe BL Get_SerialNum
;;;107
;;;108 pInformation->Current_Configuration = 0;
000006 4808 LDR r0,|L11.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 f7fffffe BL PowerOn
000012 4806 LDR r0,|L11.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,|L11.48|
000018 f44f4104 MOV r1,#0x8400
00001c 8011 STRH r1,[r2,#0]
;;;117 /* set interrupts mask */
;;;118 _SetCNTR(wInterrupt_Mask);
00001e 6001 STR r1,[r0,#0]
;;;119
;;;120 bDeviceState = UNCONNECTED;
000020 4804 LDR r0,|L11.52|
000022 6004 STR r4,[r0,#0] ; bDeviceState
;;;121 }
000024 bd10 POP {r4,pc}
;;;122
ENDP
000026 0000 DCW 0x0000
|L11.40|
DCD pInformation
|L11.44|
DCD 0x40005c40
|L11.48|
DCD wInterrupt_Mask
|L11.52|
DCD bDeviceState
AREA ||i.Mass_Storage_ClearFeature||, CODE, READONLY, ALIGN=2
Mass_Storage_ClearFeature PROC
;;;202 *******************************************************************************/
;;;203 void Mass_Storage_ClearFeature(void)
000000 4804 LDR r0,|L12.20|
;;;204 {
;;;205 /* when the host send a CBW with invalid signature or invalid length the two
;;;206 Endpoints (IN & OUT) shall stall until receiving a Mass Storage Reset */
;;;207 if (CBW.dSignature != BOT_CBW_SIGNATURE)
000002 4905 LDR r1,|L12.24|
000004 6800 LDR r0,[r0,#0] ; CBW
000006 4288 CMP r0,r1
000008 d002 BEQ |L12.16|
;;;208 Bot_Abort(BOTH_DIR);
00000a 2002 MOVS r0,#2
00000c f7ffbffe B.W Bot_Abort
|L12.16|
;;;209 }
000010 4770 BX lr
;;;210
ENDP
000012 0000 DCW 0x0000
|L12.20|
DCD ||CBW||
|L12.24|
DCD 0x43425355
AREA ||i.Mass_Storage_SetConfiguration||, CODE, READONLY, ALIGN=2
Mass_Storage_SetConfiguration PROC
;;;182 *******************************************************************************/
;;;183 void Mass_Storage_SetConfiguration(void)
000000 b510 PUSH {r4,lr}
;;;184 {
;;;185 if (pInformation->Current_Configuration != 0)
000002 4809 LDR r0,|L13.40|
000004 6800 LDR r0,[r0,#0] ; pInformation
000006 7a80 LDRB r0,[r0,#0xa]
000008 2800 CMP r0,#0
00000a d00b BEQ |L13.36|
;;;186 {
;;;187 /* Device configured */
;;;188 bDeviceState = CONFIGURED;
00000c 4907 LDR r1,|L13.44|
00000e 2005 MOVS r0,#5
000010 6008 STR r0,[r1,#0] ; bDeviceState
;;;189
;;;190 ClearDTOG_TX(ENDP1);
000012 2001 MOVS r0,#1
000014 f7fffffe BL ClearDTOG_TX
;;;191 ClearDTOG_RX(ENDP2);
000018 2002 MOVS r0,#2
00001a f7fffffe BL ClearDTOG_RX
;;;192 Bot_State = BOT_IDLE; /* set the Bot state machine to the IDLE state */
00001e 4904 LDR r1,|L13.48|
000020 2000 MOVS r0,#0
000022 7008 STRB r0,[r1,#0]
|L13.36|
;;;193 }
;;;194 }
000024 bd10 POP {r4,pc}
;;;195
ENDP
000026 0000 DCW 0x0000
|L13.40|
DCD pInformation
|L13.44|
DCD bDeviceState
|L13.48|
DCD Bot_State
AREA ||i.Mass_Storage_SetDeviceAddress||, CODE, READONLY, ALIGN=2
Mass_Storage_SetDeviceAddress PROC
;;;217 *******************************************************************************/
;;;218 void Mass_Storage_SetDeviceAddress (void)
000000 4901 LDR r1,|L14.8|
;;;219 {
;;;220 bDeviceState = ADDRESSED;
000002 2004 MOVS r0,#4
000004 6008 STR r0,[r1,#0] ; bDeviceState
;;;221 }
000006 4770 BX lr
;;;222 /*******************************************************************************
ENDP
|L14.8|
DCD bDeviceState
AREA ||.data||, DATA, ALIGN=2
Max_Lun
DCD 0x00000001
Device_Descriptor
DCD MASS_DeviceDescriptor
000008 0012 DCW 0x0012
00000a 0000 DCB 0x00,0x00
Config_Descriptor
DCD MASS_ConfigDescriptor
000010 0020 DCW 0x0020
000012 0000 DCB 0x00,0x00
Device_Property
DCD MASS_init
DCD MASS_Reset
DCD MASS_Status_In
DCD MASS_Status_Out
DCD MASS_Data_Setup
DCD MASS_NoData_Setup
DCD MASS_Get_Interface_Setting
DCD MASS_GetDeviceDescriptor
DCD MASS_GetConfigDescriptor
DCD MASS_GetStringDescriptor
DCD 0x00000000
000040 40000000 DCB 0x40,0x00,0x00,0x00
String_Descriptor
DCD MASS_StringLangID
000048 0004 DCW 0x0004
00004a 0000 DCB 0x00,0x00
DCD MASS_StringVendor
000050 0026 DCW 0x0026
000052 0000 DCB 0x00,0x00
DCD MASS_StringProduct
000058 0026 DCW 0x0026
00005a 0000 DCB 0x00,0x00
DCD MASS_StringSerial
000060 001a DCW 0x001a
000062 0000 DCB 0x00,0x00
DCD MASS_StringInterface
000068 0010 DCW 0x0010
00006a 0000 DCB 0x00,0x00
AREA ||area_number.18||, DATA, ALIGN=0
EXPORTAS ||area_number.18||, ||.data||
Device_Table
000000 0301 DCB 0x03,0x01
AREA ||area_number.19||, DATA, ALIGN=2
EXPORTAS ||area_number.19||, ||.data||
User_Standard_Requests
DCD NOP_Process
DCD Mass_Storage_SetConfiguration
DCD NOP_Process
DCD NOP_Process
DCD NOP_Process
DCD Mass_Storage_ClearFeature
DCD NOP_Process
DCD NOP_Process
DCD Mass_Storage_SetDeviceAddress
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -