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

📄 dl_device_usbwin.cod

📁 平台PXA270, Mobile6.0 这是270的mobile6.0的bootloader
💻 COD
📖 第 1 页 / 共 5 页
字号:
; 590  : 	{
; 591  : 		UDC_STATE( pUSBDrvInfo ) = WAIT_FOR_OUT_STATUS;
; 592  : 		
; 593  : 		nXferCount = pUSBDrvInfo->nXmitLength;
; 594  : 
; 595  : 		// If transmitting less than maxpacket, set IPR.
; 596  : 		bSetIPR = TRUE;
; 597  : 	} 
; 598  : 	else 
; 599  : 	{
; 600  : 		// More data to send 
; 601  : 		UDC_STATE( pUSBDrvInfo ) = DATA_STATE_XMIT;
; 602  : 		nXferCount = EP0Len;
; 603  : 	}
; 604  : 
; 605  : 	// Get the current index from the state structure and shove the data
; 606  : 	// into the FIFO's.  Adjust the remaining length
; 607  : 	nIndex = pUSBDrvInfo->nXmitIndex;

  000a8	e59450b0	 ldr         r5, [r4, #0xB0]

; 608  : 	pData  = pUSBDrvInfo->pXmitData;

  000ac	e59400ac	 ldr         r0, [r4, #0xAC]
  000b0	e3530010	 cmp         r3, #0x10
  000b4	b3a02004	 movlt       r2, #4
  000b8	a3a02002	 movge       r2, #2
  000bc	b1a01003	 movlt       r1, r3
  000c0	a3a01010	 movge       r1, #0x10
  000c4	e58420a4	 str         r2, [r4, #0xA4]

; 609  : 	pUSBDrvInfo->nXmitIndex = nIndex+nXferCount;
; 610  : 	pUSBDrvInfo->nXmitLength -= nXferCount;

  000c8	e0432001	 sub         r2, r3, r1
  000cc	e0853001	 add         r3, r5, r1
  000d0	b3a07001	 movlt       r7, #1
  000d4	e58430b0	 str         r3, [r4, #0xB0]
  000d8	e58420a8	 str         r2, [r4, #0xA8]

; 611  : 	
; 612  : 	//
; 613  : 	// Write to the FIFO directly to send the bytes.
; 614  : 	//
; 615  : 	lastPacketLen = nXferCount;
; 616  : 	word_count = lastPacketLen/4;

  000dc	e1b08121	 movs        r8, r1, lsr #2

; 617  : 	byte_count = lastPacketLen%4;

  000e0	e2016003	 and         r6, r1, #3

; 618  : 
; 619  : 	//SA_USB_Dump_Data( (PBYTE)pData+nIndex, lastPacketLen );
; 620  :     
; 621  : 	if(word_count)

  000e4	0a00000d	 beq         |$L43707|

; 622  : 	{
; 623  : 	  pData  = pUSBDrvInfo->pXmitData + nIndex;

  000e8	e0809005	 add         r9, r0, r5
  000ec	e0855108	 add         r5, r5, r8, lsl #2
  000f0		 |$L43709|

; 624  : 
; 625  : 	  while (word_count--)
; 626  : 	  {
; 627  : 	   //tx_word = (((pData[nIndex+3])<<24) | ((pData[nIndex+2])<<16) | ((pData[nIndex+1])<<8) | (pData[nIndex]));
; 628  : 	   tx_word = (((pData[3])<<24) | ((pData[2])<<16) | ((pData[1])<<8) | (pData[0]));
; 629  : 	   UDC_DR_0( pUSBDrvInfo ) = tx_word;

  000f0	e5d92003	 ldrb        r2, [r9, #3]
  000f4	e5d93002	 ldrb        r3, [r9, #2]
  000f8	e5d91001	 ldrb        r1, [r9, #1]
  000fc	e4d90004	 ldrb        r0, [r9], #4
  00100	e1833402	 orr         r3, r3, r2, lsl #8
  00104	e5942098	 ldr         r2, [r4, #0x98]
  00108	e1813403	 orr         r3, r1, r3, lsl #8
  0010c	e1803403	 orr         r3, r0, r3, lsl #8
  00110	e5823300	 str         r3, [r2, #0x300]
  00114	e2588001	 subs        r8, r8, #1
  00118	1afffff4	 bne         |$L43709|

; 630  : 	   pData +=4;
; 631  : 	   nIndex +=4;
; 632  : 	  }
; 633  : 	  pData = pUSBDrvInfo->pXmitData;	

  0011c	e59400ac	 ldr         r0, [r4, #0xAC]
  00120		 |$L43707|

; 634  : 	}
; 635  : 
; 636  : 	if(byte_count)

  00120	e3560000	 cmp         r6, #0
  00124	0a000012	 beq         |$L43717|

; 637  :     {
; 638  : 	  if(byte_count==1)

  00128	e3560001	 cmp         r6, #1

; 639  : 	  {
; 640  : 		 ch1 = pData[nIndex++];//*pTxByte++;
; 641  : 		 *(pEP0FIFO) = ch1; 

  0012c	07d03005	 ldreqb      r3, [r0, +r5]
  00130	05ce3300	 streqb      r3, [lr, #0x300]
  00134	0a00000e	 beq         |$L43717|

; 642  : 	  }
; 643  : 	  else if (byte_count==2)

  00138	e3560002	 cmp         r6, #2
  0013c	00803005	 addeq       r3, r0, r5

; 644  : 	  {
; 645  : 		 ch1 = pData[nIndex++]; //*pTxByte++;
; 646  : 		 ch2 = pData[nIndex++]; //*pTxByte++;
; 647  : 		 *(pEP0FIFO) = ch1; 

  00140	05d32000	 ldreqb      r2, [r3]
  00144	05d33001	 ldreqb      r3, [r3, #1]
  00148	05ce2300	 streqb      r2, [lr, #0x300]
  0014c	05ce3300	 streqb      r3, [lr, #0x300]
  00150	0a000007	 beq         |$L43717|

; 648  : 		 *(pEP0FIFO) = ch2;
; 649  : 	  }
; 650  : 	  else if (byte_count==3)

  00154	e3560003	 cmp         r6, #3

; 651  : 	  {
; 652  : 		 ch1 = pData[nIndex++]; //*pTxByte++;

  00158	07d01005	 ldreqb      r1, [r0, +r5]
  0015c	02853001	 addeq       r3, r5, #1

; 653  : 		 ch2 = pData[nIndex++]; //*pTxByte++;

  00160	07f03003	 ldreqb      r3, [r0, +r3]!

; 654  : 		 ch3 = pData[nIndex++]; //*pTxByte++;

  00164	05d02001	 ldreqb      r2, [r0, #1]

; 655  : 		 *(pEP0FIFO) = ch1; 

  00168	05ce1300	 streqb      r1, [lr, #0x300]

; 656  : 		 *(pEP0FIFO) = ch2; 

  0016c	05ce3300	 streqb      r3, [lr, #0x300]

; 657  : 		 *(pEP0FIFO) = ch3; 

  00170	05ce2300	 streqb      r2, [lr, #0x300]
  00174		 |$L43717|

; 658  : 	  }
; 659  : 	}
; 660  : 
; 661  : 	// If we are transmitting less than maxpacket, IPR is set.
; 662  : 	if( bSetIPR ) 

  00174	e3570000	 cmp         r7, #0

; 663  : 	{
; 664  : 		UDC_CSR0_MWRITE( UDC_CSR0(pUSBDrvInfo), XLLP_UDC_UDCCSR0_IPR );

  00178	15942098	 ldrne       r2, [r4, #0x98]
  0017c	15923100	 ldrne       r3, [r2, #0x100]
  00180	13c33091	 bicne       r3, r3, #0x91
  00184	13833002	 orrne       r3, r3, #2
  00188	15823100	 strne       r3, [r2, #0x100]

; 665  : 	}
; 666  : }

  0018c	e8bd43f0	 ldmia       sp!, {r4 - r9, lr}
  00190	e12fff1e	 bx          lr
  00194		 |$L44907|
  00194	00000000	 DCD         |??_C@_0BH@HMBKGDNO@XmitEP0Data?3?5a?5stall?$AN?6?$AA@|
  00198	00000000	 DCD         |??_C@_0CG@FFDMAMJO@XmitEP0Data?3?5Premature?5status?5st@|
  0019c		 |$M44903|

			 ENDP  ; |XmitEP0Data|

	EXPORT	|ParseSetup|
	EXPORT	|??_C@_0CF@HDJLFBEK@ParseSetup?3?5Vendor?1Class?5Command@| [ DATA ] ; `string'
	EXPORT	|??_C@_0DB@LHIGJJFL@ParseSetup?3?5SET_CONTROL_LINE_STA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0DJ@HHKJPBJE@ParseSetup?3?5Unknown?5vendor?1class@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CN@DKOKOFAH@ParseSetup?3?5Standard?5chapter?59?5c@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CE@CFKKPMNM@ParseSetup?3?5GET_DESCRIPTOR?3DEVIC@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CL@NDJCKBCK@ParseSetup?3?5GET_DESCRIPTOR?3CONFI@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CE@PLMMMKPI@ParseSetup?3?5GET_DESCRIPTOR?3STRIN@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CF@COOGALFM@ParseSetup?3?5GET_DESCRIPTOR?3Unkno@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BJ@FICDDDEM@ParseSetup?3?5SET_CONFIG?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BK@MNBDLDNK@ParseSetup?3?5SET_ADDRESS?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BJ@GDLBPJDO@ParseSetup?3?5GET_STATUS?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BN@DOPAOCFM@ParseSetup?3?5SET_DESCRIPTOR?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BM@MLAAANNC@ParseSetup?3?5GET_INTERFACE?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CA@NFKLCAF@ParseSetup?3?5GET_CONFIGURATION?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BM@PJBGHPML@ParseSetup?3?5SET_INTERFACE?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BM@CKAEGHPG@ParseSetup?3?5CLEAR_FEATURE?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BK@FIEAKENG@ParseSetup?3?5SET_FEATURE?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CA@JHFNKAAH@ParseSetup?3?5Unhandled?5Command?$AN?6?$AA@| [ DATA ] ; `string'

  00000			 AREA	 |.text| { |ParseSetup| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$ParseSetup|, PDATA, SELECTION=5, ASSOC=|.text| { |ParseSetup| } ; comdat associative
|$T44930| DCD	|$L44929|
	DCD	0x4000aa01

  00000			 AREA	 |.rdata| { |??_C@_0CA@JHFNKAAH@ParseSetup?3?5Unhandled?5Command?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CA@JHFNKAAH@ParseSetup?3?5Unhandled?5Command?$AN?6?$AA@| DCB "Par"
	DCB	"seSetup: Unhandled Command", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BK@FIEAKENG@ParseSetup?3?5SET_FEATURE?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BK@FIEAKENG@ParseSetup?3?5SET_FEATURE?$AN?6?$AA@| DCB "ParseSetup"
	DCB	": SET_FEATURE", 0xd, 0xa, 0x0		; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BM@CKAEGHPG@ParseSetup?3?5CLEAR_FEATURE?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BM@CKAEGHPG@ParseSetup?3?5CLEAR_FEATURE?$AN?6?$AA@| DCB "ParseSet"
	DCB	"up: CLEAR_FEATURE", 0xd, 0xa, 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BM@PJBGHPML@ParseSetup?3?5SET_INTERFACE?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BM@PJBGHPML@ParseSetup?3?5SET_INTERFACE?$AN?6?$AA@| DCB "ParseSet"
	DCB	"up: SET_INTERFACE", 0xd, 0xa, 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CA@NFKLCAF@ParseSetup?3?5GET_CONFIGURATION?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CA@NFKLCAF@ParseSetup?3?5GET_CONFIGURATION?$AN?6?$AA@| DCB "Parse"
	DCB	"Setup: GET_CONFIGURATION", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BM@MLAAANNC@ParseSetup?3?5GET_INTERFACE?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BM@MLAAANNC@ParseSetup?3?5GET_INTERFACE?$AN?6?$AA@| DCB "ParseSet"
	DCB	"up: GET_INTERFACE", 0xd, 0xa, 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BN@DOPAOCFM@ParseSetup?3?5SET_DESCRIPTOR?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BN@DOPAOCFM@ParseSetup?3?5SET_DESCRIPTOR?$AN?6?$AA@| DCB "ParseSe"
	DCB	"tup: SET_DESCRIPTOR", 0xd, 0xa, 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BJ@GDLBPJDO@ParseSetup?3?5GET_STATUS?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BJ@GDLBPJDO@ParseSetup?3?5GET_STATUS?$AN?6?$AA@| DCB "ParseSetup:"
	DCB	" GET_STATUS", 0xd, 0xa, 0x0		; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BK@MNBDLDNK@ParseSetup?3?5SET_ADDRESS?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BK@MNBDLDNK@ParseSetup?3?5SET_ADDRESS?$AN?6?$AA@| DCB "ParseSetup"
	DCB	": SET_ADDRESS", 0xd, 0xa, 0x0		; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BJ@FICDDDEM@ParseSetup?3?5SET_CONFIG?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BJ@FICDDDEM@ParseSetup?3?5SET_CONFIG?$AN?6?$AA@| DCB "ParseSetup:"
	DCB	" SET_CONFIG", 0xd, 0xa, 0x0		; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CE@CFKKPMNM@ParseSetup?3?5GET_DESCRIPTOR?3DEVIC@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CE@CFKKPMNM@ParseSetup?3?5GET_DESCRIPTOR?3DEVIC@| DCB "ParseSetup"
	DCB	": GET_DESCRIPTOR:DEVICE", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CL@NDJCKBCK@ParseSetup?3?5GET_DESCRIPTOR?3CONFI@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CL@NDJCKBCK@ParseSetup?3?5GET_DESCRIPTOR?3CONFI@| DCB "ParseSetup"
	DCB	": GET_DESCRIPTOR:CONFIGURATION", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CE@PLMMMKPI@ParseSetup?3?5GET_DESCRIPTOR?3STRIN@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CE@PLMMMKPI@ParseSetup?3?5GET_DESCRIPTOR?3STRIN@| DCB "ParseSetup"
	DCB	": GET_DESCRIPTOR:STRING", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CF@COOGALFM@ParseSetup?3?5GET_DESCRIPTOR?3Unkno@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CF@COOGALFM@ParseSetup?3?5GET_DESCRIPTOR?3Unkno@| DCB "ParseSetup"
	DCB	": GET_DESCRIPTOR:Unknown", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CN@DKOKOFAH@ParseSetup?3?5Standard?5chapter?59?5c@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CN@DKOKOFAH@ParseSetup?3?5Standard?5chapter?59?5c@| DCB "ParseSet"
	DCB	"up: Standard chapter 9 commands !!", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0DJ@HHKJPBJE@ParseSetup?3?5Unknown?5vendor?1class@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DJ@HHKJPBJE@ParseSetup?3?5Unknown?5vendor?1class@| DCB "ParseSetu"
	DCB	"p: Unknown vendor/class request bRequest=0x%x", 0xd, 0xa
	DCB	0x0					; `string'

  00000			 AREA	 |.rdata| { |??_C@_0DB@LHIGJJFL@ParseSetup?3?5SET_CONTROL_LINE_STA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DB@LHIGJJFL@ParseSetup?3?5SET_CONTROL_LINE_STA@| DCB "ParseSetup:"
	DCB	" SET_CONTROL_LINE_STATE wValue=0x%X", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CF@HDJLFBEK@ParseSetup?3?5Vendor?1Class?5Command@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CF@HDJLFBEK@ParseSetup?3?5Vendor?1Class?5Command@| DCB "ParseSetu"
	DCB	"p: Vendor/Class Command !!", 0xa, 0x0	; `string'
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |ParseSetup| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |ParseSetup| PROC

; 677  : {

  00000		 |$L44929|
  00000	e92d4070	 stmdb       sp!, {r4 - r6, lr}
  00004		 |$M44927|
  00004	e1a05001	 mov         r5, r1
  00008	e1a04000	 mov         r4, r0

; 678  : 	BOOL bErr = FALSE;
; 679  : 	PUCHAR p;
; 680  : 	WORD wLen, wTotLen;
; 681  : 	static int count = 0;
; 682  :     //DWORD udc_cr, udc_csrA, udc_csrB;
; 683  : 	
; 684  : 	/*
; 685  : 	 * Decode and execute the command. We support two sets of commands, vendor
; 686  : 	 * specific (modem control) and chapter 9 standard commands.
; 687  : 	 */
; 688  : 	if (pUSBDrvInfo->dReq.bmRequest & 0x60) 

  0000c	e5d430b8	 ldrb        r3, [r4, #0xB8]
  00010	e3a06000	 mov         r6, #0
  00014	e3130060	 tst         r3, #0x60
  00018	0a000020	 beq         |$L43733|

; 689  :     { 
; 690  :         // vendor or class command
; 691  :         EdbgOutputDebugString( "ParseSetup: Vendor/Class Command !!\n" );

  0001c	e59f0280	 ldr         r0, [pc, #0x280]
  00020	eb000000	 bl          EdbgOutputDebugString

; 692  : 		
; 693  :         if ( SET_CONTROL_LINE_STATE == pUSBDrvInfo->dReq.bRequest ) 

  00024	e5d410b9	 ldrb        r1, [r4, #0xB9]
  00028	e3510022	 cmp         r1, #0x22
  0002c	1a000017	 bne         |$L43735|

; 694  :         {
; 695  : 	   /* 
; 696  : 		* Modem Control command
; 697  : 		* 
; 698  : 		* Host is notifying us of control line state.
; 699  : 		* wValue contains bitmask
; 700  : 		* 0 - DTR
; 701  : 		* 1 - RTS
; 702  : 		*/
; 703  :             EdbgOutputDebugString( "ParseSetup: SET_CONTROL_LINE_STATE wValue=0x%X\r\n", pUSBDrvInfo->dReq.wValue );

  00030	e1d41bba	 ldrh        r1, [r4, #0xBA]
  00034	e59f0264	 ldr         r0, [pc, #0x264]
  00038	eb000000	 bl          EdbgOutputDebugString

; 704  : 			
; 705  :             if (pUSBDrvInfo->dReq.wValue & 0x01)

  0003c	e1d43bba	 ldrh        r3, [r4, #0xBA]

; 706  : 				*pModemStatus |= (MS_DSR_ON|MS_RLSD_ON);  // DTR active, set DSR/RLSD
; 707  :             else
; 708  : 				*pModemStatus &= ~(MS_DSR_ON|MS_RLSD_ON); // DTR clear, clr DSR/RLSD
; 709  : 			
; 710  :             if (pUSBDrvInfo->dReq.wValue & 0x02) 
; 

⌨️ 快捷键说明

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