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

📄 mdppfs.cod

📁 Ep93XX TionProV2 BSP
💻 COD
📖 第 1 页 / 共 2 页
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4237 

	TTL	C:\WINCE500\PLATFORM\Ep93xx\Src\Kernel\Hal\Common\.\mdppfs.c
	CODE32

  00000			 AREA	 |.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "

	EXPORT	|NoPPFS| [ DATA ]
	EXPORT	|UART1Started| [ DATA ]
	EXPORT	|UART3Started| [ DATA ]

  00000			 AREA	 |.bss|, NOINIT
|NoPPFS| %	0x4
|UART1Started| % 0x4
|UART3Started| % 0x4

  00000			 AREA	 |.rdata|, DATA, READONLY
|EdbgVendorIds| DCW 0x0
	DCW	0x0
	DCD	0x4033
	DCB	0x1
	DCB	0x0
	DCB	"AD", 0x0
	%	3
	DCW	0x1050
	DCW	0x940
	DCD	0x4005
	DCB	0x1
	DCB	0x0
	DCB	"LS", 0x0
	%	3
	DCW	0x1050
	DCW	0x940
	DCD	0x2078
	DCB	0x1
	DCB	0x0
	DCB	"LS", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8029
	DCD	0xc0f0
	DCB	0x1
	DCB	0x0
	DCB	"KS", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8129
	DCD	0x0
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8139
	DCD	0x900b
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8139
	DCD	0xd0c9
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8139
	DCD	0xe04c
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x1186
	DCW	0x1300
	DCD	0x50ba
	DCB	0x4
	DCB	0x0
	DCB	"DL", 0x0
	%	3
	DCW	0x100b
	DCW	0x20
	DCD	0xa0cc
	DCB	0x5
	DCB	0x0
	DCB	"NG", 0x0
	%	3
	DCW	0x10b7
	DCW	0x9050
	DCD	0x6008
	DCB	0x6
	DCB	0x0
	DCB	"3C", 0x0
	%	3
	DCW	0x10b7
	DCW	0x9200
	DCD	0x476
	DCB	0x6
	DCB	0x0
	DCB	"3C", 0x0
	%	3
	DCW	0x8086
	DCW	0x1039
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x103a
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x1051
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x1229
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x2449
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	EXPORT	|OEMInitParallelPort|
; File c:\wince500\platform\ep93xx\src\kernel\hal\common\mdppfs.c

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

  00000			 AREA	 |.pdata$$OEMInitParallelPort|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMInitParallelPort| } ; comdat associative
|$T15306| DCD	|$L15305|
	DCD	0x40000b00
; Function compile flags: /Ogsy

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

  00000		 |OEMInitParallelPort| PROC

; 99   : {

  00000		 |$L15305|
  00000		 |$M15303|

; 100  :     *IDE_CTRL   =  PAR_NREAD | PAR_NWRITE | IDE_CTRL_CS1;
; 101  :     *IDE_CFG    = IDE_CFG_IDEEN | IDE_CFG_PIOEN | IDE_CFG_PIO4 | (3<<IDE_CFG_WST_SHIFT);

  00000	e59f1020	 ldr         r1, [pc, #0x20]
  00004	e3a0220b	 mov         r2, #0xB, 4
  00008	e3a03d0d	 mov         r3, #0xD, 26
  0000c	e382280a	 orr         r2, r2, #0xA, 16
  00010	e3a00062	 mov         r0, #0x62
  00014	e3833003	 orr         r3, r3, #3
  00018	e5820000	 str         r0, [r2]
  0001c	e5813000	 str         r3, [r1]

; 102  :     return 0;

  00020	e3a00000	 mov         r0, #0

; 103  : }

  00024	e12fff1e	 bx          lr
  00028		 |$L15308|
  00028	b00a0004	 DCD         0xb00a0004
  0002c		 |$M15304|

			 ENDP  ; |OEMInitParallelPort|

	EXPORT	|OEMParallelPortGetByte|
	EXPORT	|??_C@_0CM@FEFJD@OEMParallelPortGetByte?3?5status?5t@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CM@EHKFDPED@OEMParallelPortGetByte?3?5status?5t@| [ DATA ] ; `string'
	IMPORT	|EdbgOutputDebugString|

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

  00000			 AREA	 |.pdata$$OEMParallelPortGetByte|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMParallelPortGetByte| } ; comdat associative
|$T15346| DCD	|$L15345|
	DCD	0x40004701

  00000			 AREA	 |.rdata| { |??_C@_0CM@FEFJD@OEMParallelPortGetByte?3?5status?5t@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CM@FEFJD@OEMParallelPortGetByte?3?5status?5t@| DCB "OEMParallelPo"
	DCB	"rtGetByte: status timeout 1.", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CM@EHKFDPED@OEMParallelPortGetByte?3?5status?5t@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CM@EHKFDPED@OEMParallelPortGetByte?3?5status?5t@| DCB "OEMParalle"
	DCB	"lPortGetByte: status timeout 2.", 0xd, 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy

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

  00000		 |OEMParallelPortGetByte| PROC

; 113  : {

  00000		 |$L15345|
  00000	e92d4070	 stmdb       sp!, {r4 - r6, lr}
  00004		 |$M15343|

; 114  :     //DWORD           dwStatus;                     // parallel port status
; 115  :     unsigned int    iWatchdog;                      // timeout counter
; 116  :     int             iByteReturned;
; 117  : 
; 118  :     //
; 119  :     // if ppfs disconnected do nothing
; 120  :     //
; 121  :     if (NoPPFS)

  00004	e59f510c	 ldr         r5, [pc, #0x10C]
  00008	e5953000	 ldr         r3, [r5]
  0000c	e3530000	 cmp         r3, #0

; 122  :         return -1;

  00010	1a00003a	 bne         |$L15337|

; 123  :     
; 124  :     //
; 125  :     // Clear busy.
; 126  :     //
; 127  :     *IDE_CTRL =  PAR_NREAD| PAR_NWRITE ;

  00014	e3a0420b	 mov         r4, #0xB, 4
  00018	e384480a	 orr         r4, r4, #0xA, 16
  0001c	e3a06060	 mov         r6, #0x60
  00020	e5846000	 str         r6, [r4]
  00024		 |$L15179|

; 128  :     
; 129  :      //
; 130  :     // Wait for the strobe to go low.
; 131  :     //
; 132  :     while(1)
; 133  :     {    
; 134  :         for(iWatchdog = 0 ; ; iWatchdog++)
; 135  :         {
; 136  :             if(!( *IDE_CTRL & PAR_STROBE))

  00024	e3a02000	 mov         r2, #0
  00028	ea000002	 b           |$L15339|
  0002c		 |$L15181|

; 137  :             {
; 138  :                 break; 
; 139  :             }
; 140  : 
; 141  :             //
; 142  :             // Check to see if the watchdog has timed out
; 143  :             if (iWatchdog==PARALLEL_WAIT)                    

  0002c	e3520401	 cmp         r2, #1, 8
  00030	0a00002d	 beq         |$L15325|
  00034	e2822001	 add         r2, r2, #1
  00038		 |$L15339|
  00038	e5943000	 ldr         r3, [r4]
  0003c	e3130c02	 tst         r3, #2, 24
  00040	1afffff9	 bne         |$L15181|

; 157  :             }
; 158  :         }
; 159  :         
; 160  :         //
; 161  :         // Read strobe a four more times to make sure that it is low.
; 162  :         //
; 163  :         if(( *IDE_CTRL & PAR_STROBE))

  00044	e5943000	 ldr         r3, [r4]
  00048	e3130c02	 tst         r3, #2, 24
  0004c	1afffff4	 bne         |$L15179|

; 164  :         {
; 165  :             continue; 
; 166  :         }
; 167  :         if(( *IDE_CTRL & PAR_STROBE))

  00050	e5943000	 ldr         r3, [r4]
  00054	e3130c02	 tst         r3, #2, 24
  00058	1afffff1	 bne         |$L15179|

; 168  :         {
; 169  :             continue; 
; 170  :         }
; 171  :         if(( *IDE_CTRL & PAR_STROBE))

  0005c	e5943000	 ldr         r3, [r4]
  00060	e3130c02	 tst         r3, #2, 24
  00064	1affffee	 bne         |$L15179|

; 172  :         {
; 173  :             continue; 
; 174  :         }
; 175  :         if(!( *IDE_CTRL & PAR_STROBE))

  00068	e5943000	 ldr         r3, [r4]
  0006c	e3130c02	 tst         r3, #2, 24
  00070	1affffeb	 bne         |$L15179|

; 176  :         {
; 177  :             break; 
; 178  :         }
; 179  : 
; 180  :     }
; 181  : 
; 182  :     //
; 183  :     // Set the IDE port for Reading and set busy
; 184  :     //
; 185  :     *IDE_CTRL =  PAR_NWRITE | PAR_BUSY ;

  00074	e3a03044	 mov         r3, #0x44
  00078	e5843000	 str         r3, [r4]
  0007c		 |$L15199|

; 186  : 
; 187  :     
; 188  :     //
; 189  :     // Wait for the strobe to go high.
; 190  :     //
; 191  :     while(1)
; 192  :     {    
; 193  :         for(iWatchdog = 0 ; ; iWatchdog++)
; 194  :         {
; 195  :             if( *IDE_CTRL & PAR_STROBE)

  0007c	e3a02000	 mov         r2, #0
  00080	ea000002	 b           |$L15341|
  00084		 |$L15201|

; 196  :             {
; 197  :                 break;                        
; 198  :             }
; 199  : 
; 200  :             //
; 201  :             // Check to see if the watchdog has timed out
; 202  :             if (iWatchdog==PARALLEL_TIMEOUT)                    

  00084	e3520401	 cmp         r2, #1, 8
  00088	0a000015	 beq         |$L15328|
  0008c	e2822001	 add         r2, r2, #1
  00090		 |$L15341|
  00090	e5943000	 ldr         r3, [r4]
  00094	e3130c02	 tst         r3, #2, 24
  00098	0afffff9	 beq         |$L15201|

; 216  :             }
; 217  :         }            
; 218  :         //
; 219  :         // Read strobe a couple more time to make sure that strobe is high.
; 220  :         // next state.
; 221  :         //
; 222  :         if(!( *IDE_CTRL & PAR_STROBE))

  0009c	e5943000	 ldr         r3, [r4]
  000a0	e3130c02	 tst         r3, #2, 24
  000a4	0afffff4	 beq         |$L15199|

; 223  :         {
; 224  :             continue;                        
; 225  :         }
; 226  :         if(!( *IDE_CTRL & PAR_STROBE))

  000a8	e5943000	 ldr         r3, [r4]
  000ac	e3130c02	 tst         r3, #2, 24
  000b0	0afffff1	 beq         |$L15199|

; 227  :         {
; 228  :             continue;                        
; 229  :         }
; 230  :         if(!( *IDE_CTRL & PAR_STROBE))

  000b4	e5943000	 ldr         r3, [r4]
  000b8	e3130c02	 tst         r3, #2, 24
  000bc	0affffee	 beq         |$L15199|

; 231  :         {
; 232  :             continue;                        
; 233  :         }
; 234  :         if(( *IDE_CTRL & PAR_STROBE))

  000c0	e5943000	 ldr         r3, [r4]
  000c4	e3130c02	 tst         r3, #2, 24
  000c8	0affffeb	 beq         |$L15199|

; 235  :         {
; 236  :             break;                        
; 237  :         }
; 238  :     }
; 239  : 
; 240  :     //
; 241  :     //  Clear Busy and DIOR. The data is now latched into the Data in register.
; 242  :     //
; 243  :     *IDE_CTRL  = PAR_NWRITE | PAR_NREAD ;
; 244  :     iByteReturned = (*IDE_DATAIN & 0xFF);

  000cc	e59f3040	 ldr         r3, [pc, #0x40]
  000d0	e5846000	 str         r6, [r4]
  000d4	e5933000	 ldr         r3, [r3]
  000d8	e20300ff	 and         r0, r3, #0xFF

; 245  : 
; 246  :     
; 247  :     return (iByteReturned);
; 248  : }

  000dc	e8bd4070	 ldmia       sp!, {r4 - r6, lr}
  000e0	e12fff1e	 bx          lr
  000e4		 |$L15328|

; 203  :             {                                    
; 204  :                 //
; 205  :                 // Display error message
; 206  :                 //
; 207  :                 EdbgOutputDebugString("OEMParallelPortGetByte: status timeout 2.\r\n");

  000e4	e59f0024	 ldr         r0, [pc, #0x24]

; 208  : 
; 209  :                 //
; 210  :                 // set parallel port to disconnected and return failure   
; 211  :                 //
; 212  :                 NoPPFS=TRUE; 
; 213  :                 
; 214  :                 *IDE_CTRL  = PAR_NWRITE| PAR_NREAD;
; 215  :                 return -1;                      

  000e8	ea000000	 b           |$L15342|
  000ec		 |$L15325|

; 144  :             {                                    

⌨️ 快捷键说明

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