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

📄 mdppfs.cod

📁 Ep93XX TionProV2 BSP
💻 COD
📖 第 1 页 / 共 2 页
字号:
; 145  :                 //
; 146  :                 // Display error message
; 147  :                 //
; 148  :                 EdbgOutputDebugString("OEMParallelPortGetByte: status timeout 1.\r\n");

  000ec	e59f0018	 ldr         r0, [pc, #0x18]
  000f0		 |$L15342|
  000f0	eb000000	 bl          EdbgOutputDebugString

; 149  : 
; 150  :                 //
; 151  :                 // set parallel port to disconnected and return failure   
; 152  :                 //
; 153  :                 NoPPFS=TRUE;                    

  000f4	e3a03001	 mov         r3, #1
  000f8	e5853000	 str         r3, [r5]

; 154  : 
; 155  :                 *IDE_CTRL  = PAR_NWRITE| PAR_NREAD;

  000fc	e5846000	 str         r6, [r4]
  00100		 |$L15337|

; 156  :                 return -1;                      

  00100	e3e00000	 mvn         r0, #0

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

  00104	e8bd4070	 ldmia       sp!, {r4 - r6, lr}
  00108	e12fff1e	 bx          lr
  0010c		 |$L15348|
  0010c	00000000	 DCD         |??_C@_0CM@FEFJD@OEMParallelPortGetByte?3?5status?5t@|
  00110	00000000	 DCD         |??_C@_0CM@EHKFDPED@OEMParallelPortGetByte?3?5status?5t@|
  00114	b00a0014	 DCD         0xb00a0014
  00118	00000000	 DCD         |NoPPFS|
  0011c		 |$M15344|

			 ENDP  ; |OEMParallelPortGetByte|

	EXPORT	|OEMParallelPortSendByte|
	EXPORT	|??_C@_0CM@FEPGELED@OEMParallelPortSendByte?3?5status?5@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CN@FHIBGCLO@OEMParallelPortSendByte?3?5status?5@| [ DATA ] ; `string'

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

  00000			 AREA	 |.pdata$$OEMParallelPortSendByte|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMParallelPortSendByte| } ; comdat associative
|$T15383| DCD	|$L15382|
	DCD	0x40004601

  00000			 AREA	 |.rdata| { |??_C@_0CM@FEPGELED@OEMParallelPortSendByte?3?5status?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CM@FEPGELED@OEMParallelPortSendByte?3?5status?5@| DCB "OEMParalle"
	DCB	"lPortSendByte: status timeout 1.", 0xa, 0x0 ; `string'

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

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

  00000		 |OEMParallelPortSendByte| PROC

; 258  : {

  00000		 |$L15382|
  00000	e92d4010	 stmdb       sp!, {r4, lr}
  00004		 |$M15380|

; 259  :     unsigned int iWatchdog;
; 260  : 
; 261  :     //
; 262  :     // if ppfs disconnected do nothing
; 263  :     //
; 264  :     if (NoPPFS)

  00004	e59f4108	 ldr         r4, [pc, #0x108]
  00008	e5943000	 ldr         r3, [r4]
  0000c	e3530000	 cmp         r3, #0
  00010	1a00003a	 bne         |$L15222|

; 265  :         return;
; 266  :         
; 267  :         
; 268  :     //
; 269  :     // Get ready to output data.
; 270  :     //        
; 271  :     *IDE_DATAOUT = (ULONG)chData;

  00014	e59f30f4	 ldr         r3, [pc, #0xF4]

; 272  : 
; 273  :     //    
; 274  :     // Initialize the IDE interface/ Parallel Port for writing.
; 275  :     //
; 276  :     *IDE_CTRL = PAR_NWRITE | PAR_NREAD ;

  00018	e3a0220b	 mov         r2, #0xB, 4
  0001c	e382280a	 orr         r2, r2, #0xA, 16
  00020	e3a0e060	 mov         lr, #0x60
  00024	e5830000	 str         r0, [r3]
  00028	e582e000	 str         lr, [r2]
  0002c		 |$L15229|

; 277  : 
; 278  : 
; 279  :     //
; 280  :     // Wait for the AUTOFD to go high.
; 281  :     //
; 282  :     while (1) 
; 283  :     {
; 284  :         for(iWatchdog = 0 ; ; iWatchdog++)
; 285  :         {
; 286  :             if(( *IDE_CTRL & PAR_AUTOFD))

  0002c	e3a01000	 mov         r1, #0
  00030	ea000002	 b           |$L15376|
  00034		 |$L15231|

; 287  :             {
; 288  :                 break;
; 289  :             }
; 290  :             
; 291  :             //
; 292  :             // Check to see if the watchdog has timed out
; 293  :             //
; 294  :             if (iWatchdog==PARALLEL_WAIT)                    

  00034	e3510401	 cmp         r1, #1, 8
  00038	0a00002c	 beq         |$L15365|
  0003c	e2811001	 add         r1, r1, #1
  00040		 |$L15376|
  00040	e5923000	 ldr         r3, [r2]
  00044	e3130b01	 tst         r3, #1, 22
  00048	0afffff9	 beq         |$L15231|

; 305  :                 return;                      
; 306  :             }
; 307  :         }            
; 308  : 
; 309  :         //
; 310  :         // Read auto FD two times to make sure that it is set again.
; 311  :         //
; 312  :         if( !(*IDE_CTRL & PAR_AUTOFD))

  0004c	e5923000	 ldr         r3, [r2]
  00050	e3130b01	 tst         r3, #1, 22
  00054	0afffff4	 beq         |$L15229|

; 313  :         {
; 314  :             continue;
; 315  :         }
; 316  :         if( !(*IDE_CTRL & PAR_AUTOFD))

  00058	e5923000	 ldr         r3, [r2]
  0005c	e3130b01	 tst         r3, #1, 22
  00060	0afffff1	 beq         |$L15229|

; 317  :         {
; 318  :             continue;
; 319  :         }
; 320  :         if( !(*IDE_CTRL & PAR_AUTOFD))

  00064	e5923000	 ldr         r3, [r2]
  00068	e3130b01	 tst         r3, #1, 22
  0006c	0affffee	 beq         |$L15229|

; 321  :         {
; 322  :             continue;
; 323  :         }
; 324  : 
; 325  :         if( (*IDE_CTRL & PAR_AUTOFD))

  00070	e5923000	 ldr         r3, [r2]
  00074	e3130b01	 tst         r3, #1, 22
  00078	0affffeb	 beq         |$L15229|

; 326  :         {
; 327  :             break;
; 328  :         }
; 329  : 
; 330  :     }
; 331  : 
; 332  :     //
; 333  :     // Set PAR_ACK
; 334  :     //
; 335  :     *IDE_CTRL = PAR_NREAD | PAR_ACK ;               

  0007c	e3a03021	 mov         r3, #0x21
  00080	e5823000	 str         r3, [r2]
  00084		 |$L15248|

; 336  :     
; 337  :     //
; 338  :     // Wait for the AUTOFD to go low.
; 339  :     //
; 340  :     while (1) 
; 341  :     {
; 342  :         for(iWatchdog = 0 ; ; iWatchdog++)
; 343  :         {
; 344  :             if( !(*IDE_CTRL & PAR_AUTOFD))

  00084	e3a01000	 mov         r1, #0
  00088	ea000002	 b           |$L15378|
  0008c		 |$L15250|

; 345  :             {
; 346  :                 break;
; 347  :             }
; 348  :             
; 349  :             //
; 350  :             // Check to see if the watchdog has timed out
; 351  :             //
; 352  :             if (iWatchdog == PARALLEL_TIMEOUT)                    

  0008c	e3510401	 cmp         r1, #1, 8
  00090	0a000014	 beq         |$L15368|
  00094	e2811001	 add         r1, r1, #1
  00098		 |$L15378|
  00098	e5923000	 ldr         r3, [r2]
  0009c	e3130b01	 tst         r3, #1, 22
  000a0	1afffff9	 bne         |$L15250|

; 364  :             }
; 365  :         }            
; 366  : 
; 367  :         //
; 368  :         // Read auto FD two times to make sure that it is set again.
; 369  :         //
; 370  :         if(( *IDE_CTRL & PAR_AUTOFD))

  000a4	e5923000	 ldr         r3, [r2]
  000a8	e3130b01	 tst         r3, #1, 22
  000ac	1afffff4	 bne         |$L15248|

; 371  :         {
; 372  :             continue;
; 373  :         }
; 374  :         if(( *IDE_CTRL & PAR_AUTOFD))

  000b0	e5923000	 ldr         r3, [r2]
  000b4	e3130b01	 tst         r3, #1, 22
  000b8	1afffff1	 bne         |$L15248|

; 375  :         {
; 376  :             continue;
; 377  :         }
; 378  :         if(( *IDE_CTRL & PAR_AUTOFD))

  000bc	e5923000	 ldr         r3, [r2]
  000c0	e3130b01	 tst         r3, #1, 22
  000c4	1affffee	 bne         |$L15248|

; 379  :         {
; 380  :             continue;
; 381  :         }
; 382  : 
; 383  :         if( !(*IDE_CTRL & PAR_AUTOFD))

  000c8	e5923000	 ldr         r3, [r2]
  000cc	e3130b01	 tst         r3, #1, 22
  000d0	1affffeb	 bne         |$L15248|

; 384  :         {
; 385  :             break;
; 386  :         }
; 387  : 
; 388  :     }
; 389  :     //
; 390  :     // Clear Ack
; 391  :     //
; 392  :     *IDE_CTRL = PAR_NREAD ;               

  000d4	e3a03020	 mov         r3, #0x20
  000d8	e5823000	 str         r3, [r2]

; 393  :     
; 394  :     //
; 395  :     // Put a little delay in here.
; 396  :     //
; 397  :     //VosDelayInuS(20);
; 398  : 
; 399  :     //
; 400  :     // Assert Busy and nAcknowledge.  Back to the default Parallel port state
; 401  :     //
; 402  :     *IDE_CTRL  = PAR_NWRITE | PAR_NREAD ;

  000dc	e582e000	 str         lr, [r2]

; 403  : }

  000e0	e8bd4010	 ldmia       sp!, {r4, lr}
  000e4	e12fff1e	 bx          lr
  000e8		 |$L15368|

; 353  :             {                                    
; 354  :                 //
; 355  :                 // Display error message
; 356  :                 //
; 357  :                 EdbgOutputDebugString("OEMParallelPortSendByte: status timeout 2.\r\n");

  000e8	e59f001c	 ldr         r0, [pc, #0x1C]

; 358  : 
; 359  :                 //
; 360  :                 // set parallel port to disconnected and return failure   
; 361  :                 //
; 362  :                 NoPPFS=TRUE;                    
; 363  :                 return;                      

  000ec	ea000000	 b           |$L15379|
  000f0		 |$L15365|

; 295  :             {                                    
; 296  :                 //
; 297  :                 // Display error message
; 298  :                 //
; 299  :                 EdbgOutputDebugString("OEMParallelPortSendByte: status timeout 1.\n");

  000f0	e59f0010	 ldr         r0, [pc, #0x10]
  000f4		 |$L15379|
  000f4	eb000000	 bl          EdbgOutputDebugString

; 300  : 
; 301  :                 //
; 302  :                 // set parallel port to disconnected and return failure   
; 303  :                 //
; 304  :                 NoPPFS=TRUE;                    

  000f8	e3a03001	 mov         r3, #1
  000fc	e5843000	 str         r3, [r4]
  00100		 |$L15222|

; 403  : }

  00100	e8bd4010	 ldmia       sp!, {r4, lr}
  00104	e12fff1e	 bx          lr
  00108		 |$L15385|
  00108	00000000	 DCD         |??_C@_0CM@FEPGELED@OEMParallelPortSendByte?3?5status?5@|
  0010c	00000000	 DCD         |??_C@_0CN@FHIBGCLO@OEMParallelPortSendByte?3?5status?5@|
  00110	b00a0010	 DCD         0xb00a0010
  00114	00000000	 DCD         |NoPPFS|
  00118		 |$M15381|

			 ENDP  ; |OEMParallelPortSendByte|

	EXPORT	|OEMIsParallelReady|
	IMPORT	|GetSystemTimeInMsec|

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

  00000			 AREA	 |.pdata$$OEMIsParallelReady|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMIsParallelReady| } ; comdat associative
|$T15396| DCD	|$L15395|
	DCD	0x40001901
; Function compile flags: /Ogsy

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

  00000		 |OEMIsParallelReady| PROC

; 412  : {

  00000		 |$L15395|
  00000	e92d4070	 stmdb       sp!, {r4 - r6, lr}
  00004		 |$M15393|

; 413  :     DWORD dwStart;
; 414  : 
; 415  :     //
; 416  :     // Find the initial time in seconds.
; 417  :     //
; 418  :     dwStart= GetSystemTimeInMsec();

  00004	eb000000	 bl          GetSystemTimeInMsec

; 419  :     
; 420  :     //
; 421  :     // Set direction to write and latch in the line data.
; 422  :     //
; 423  :     *IDE_CTRL  = PAR_NREAD| PAR_NWRITE |PAR_ACK ;

  00008	e3a0520b	 mov         r5, #0xB, 4
  0000c	e385580a	 orr         r5, r5, #0xA, 16
  00010	e3a03061	 mov         r3, #0x61
  00014	e5853000	 str         r3, [r5]

; 424  :         
; 425  :     //
; 426  :     // Wait for AUTOFD
; 427  :     //
; 428  :     while (*IDE_CTRL & PAR_AUTOFD) 

  00018	e5953000	 ldr         r3, [r5]
  0001c	e1a06000	 mov         r6, r0
  00020	e3130b01	 tst         r3, #1, 22
  00024	0a000008	 beq         |$L15275|
  00028	e3a04ebb	 mov         r4, #0xBB, 28
  0002c	e3844008	 orr         r4, r4, #8
  00030		 |$L15274|

; 429  :     {
; 430  :         if (GetSystemTimeInMsec() - dwStart > 3000)

  00030	eb000000	 bl          GetSystemTimeInMsec
  00034	e0403006	 sub         r3, r0, r6
  00038	e1530004	 cmp         r3, r4
  0003c	8a000005	 bhi         |$L15389|
  00040	e5953000	 ldr         r3, [r5]
  00044	e3130b01	 tst         r3, #1, 22
  00048	1afffff8	 bne         |$L15274|
  0004c		 |$L15275|

; 432  :     }
; 433  :     return TRUE;

  0004c	e3a00001	 mov         r0, #1

; 434  : }

  00050	e8bd4070	 ldmia       sp!, {r4 - r6, lr}
  00054	e12fff1e	 bx          lr
  00058		 |$L15389|

; 431  :             return FALSE;

  00058	e3a00000	 mov         r0, #0

; 434  : }

  0005c	e8bd4070	 ldmia       sp!, {r4 - r6, lr}
  00060	e12fff1e	 bx          lr
  00064		 |$M15394|

			 ENDP  ; |OEMIsParallelReady|

	END

⌨️ 快捷键说明

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