📄 eeinfo.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4237
TTL C:\WINCE500\PLATFORM\Ep93xx\Src\Kernel\Hal\Common\.\eeinfo.c
CODE32
00000 AREA |.drectve|, DRECTVE
DCB "-defaultlib:coredll.lib "
DCB "-defaultlib:corelibc.lib "
00000 AREA |.data|, DATA
COMMON |gBoardInformation|, 0x20
COMMON |gBoardInformationValid|, 0x4
COMMON |pTemp|, 0x2000
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
; File c:\wince500\platform\ep93xx\src\kernel\hal\common\eeinfo.c
00000 AREA |.text| { |InitializeSPI| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$InitializeSPI|, PDATA, SELECTION=5, ASSOC=|.text| { |InitializeSPI| } ; comdat associative
|$T15410| DCD |$L15409|
DCD 0x40002601
; Function compile flags: /Ogsy
00000 AREA |.text| { |InitializeSPI| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |InitializeSPI| PROC
; 148 : {
00000 |$L15409|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M15407|
; 149 : ULONG ulTemp;
; 150 :
; 151 : //
; 152 : // Set GPIO Pins 12 and 14 as outputs.
; 153 : //
; 154 : ulTemp = *GPIO_PBDDR;
00004 e59f2088 ldr r2, [pc, #0x88]
; 155 : *GPIO_PBDDR = ulTemp | 0x50;
; 156 :
; 157 : //
; 158 : // Set GPIO pins 12 and 14 to high to disable the keyboard.
; 159 : //
; 160 : ulTemp = *GPIO_PBDR;
00008 e59f1080 ldr r1, [pc, #0x80]
; 161 : *GPIO_PBDR = ulTemp | 0x50;
; 162 :
; 163 : //
; 164 : // Set GPIO pins 7 as an output.
; 165 : //
; 166 : ulTemp = *GPIO_PADDR;
0000c e59fe078 ldr lr, [pc, #0x78]
00010 e5923000 ldr r3, [r2]
; 167 : *GPIO_PADDR = ulTemp | 0x80;
; 168 :
; 169 : //
; 170 : // Clear GPIO pins 7 to enable the frame line.
; 171 : //
; 172 : ulTemp = *GPIO_PADR;
00014 e3a0420b mov r4, #0xB, 4
00018 e3844721 orr r4, r4, #0x21, 14
0001c e3833050 orr r3, r3, #0x50
00020 e5823000 str r3, [r2]
00024 e5913000 ldr r3, [r1]
; 173 : *GPIO_PADR = ulTemp & ~0x80;
; 174 :
; 175 :
; 176 : //
; 177 : // Program the CR0 register.
; 178 : //
; 179 : *SPI_CR0 = SPICR0_FRF_MOTOROLA | SPICR0_SPO |
; 180 : SPICR0_SPH | (8-1) | (SPICR0_SCR_MASK & 0x600);
; 181 :
; 182 : //
; 183 : // Program the predivisor register. This will give us an
; 184 : // 14.7Mhz / ((6 +1) * 2) = Approx 1Mhz.
; 185 : //
; 186 : // The Max is 20Mhz for the AT25F1024.
; 187 : //
; 188 : *SPI_CPSR = 2;
00028 e59f2058 ldr r2, [pc, #0x58]
0002c e3a0020b mov r0, #0xB, 4
00030 e3833050 orr r3, r3, #0x50
00034 e5813000 str r3, [r1]
00038 e59e3000 ldr r3, [lr]
0003c e3a01d1b mov r1, #0x1B, 26
00040 e380088a orr r0, r0, #0x8A, 16
00044 e3833080 orr r3, r3, #0x80
00048 e58e3000 str r3, [lr]
0004c e5943000 ldr r3, [r4]
00050 e3811007 orr r1, r1, #7
00054 e3a0e002 mov lr, #2
00058 e3c33080 bic r3, r3, #0x80
0005c e5843000 str r3, [r4]
; 189 :
; 190 : //
; 191 : // Program the CR1 register.
; 192 : //
; 193 : *SPI_CR1 = 0;
00060 e59f301c ldr r3, [pc, #0x1C]
00064 e5801000 str r1, [r0]
00068 e582e000 str lr, [r2]
0006c e3a02000 mov r2, #0
00070 e5832000 str r2, [r3]
; 194 :
; 195 : //
; 196 : // Hit the enable bit
; 197 : //
; 198 : *SPI_CR1 = SPICR1_SSE;
00074 e3a02010 mov r2, #0x10
00078 e5832000 str r2, [r3]
; 199 : }
0007c e8bd4010 ldmia sp!, {r4, lr}
00080 e12fff1e bx lr
00084 |$L15412|
00084 b08a0004 DCD 0xb08a0004
00088 b08a0010 DCD 0xb08a0010
0008c b0840010 DCD 0xb0840010
00090 b0840004 DCD 0xb0840004
00094 b0840014 DCD 0xb0840014
00098 |$M15408|
ENDP ; |InitializeSPI|
IMPORT |DelayInuSec|
IMPORT |GetSystemTimeInUSec|
00000 AREA |.text| { |ClearReceiveFifo| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$ClearReceiveFifo|, PDATA, SELECTION=5, ASSOC=|.text| { |ClearReceiveFifo| } ; comdat associative
|$T15443| DCD |$L15442|
DCD 0x40003701
; Function compile flags: /Ogsy
00000 AREA |.text| { |ClearReceiveFifo| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |ClearReceiveFifo| PROC
; 380 : {
00000 |$L15442|
00000 e92d40f0 stmdb sp!, {r4 - r7, lr}
00004 |$M15440|
; 381 : ULONG ulTemp;
; 382 : ULONGLONG ullStart, ullCurrent, ullMax;
; 383 :
; 384 : //
; 385 : // Clear the transmit fifo.
; 386 : //
; 387 : ullStart = GetSystemTimeInUSec();
00004 eb000000 bl GetSystemTimeInUSec
; 388 : ullMax = ullStart + SPI_MINTIME;
; 389 : while( !(*SPI_SR & SPISR_TFE))
00008 e29050c8 adds r5, r0, #0xC8
0000c e59f40c4 ldr r4, [pc, #0xC4]
00010 e2a16000 adc r6, r1, #0
00014 ea000005 b |$L15421|
00018 |$L15338|
; 390 : {
; 391 : //
; 392 : // Check to see if we timed out.
; 393 : //
; 394 : ullCurrent = GetSystemTimeInUSec();
00018 eb000000 bl GetSystemTimeInUSec
; 395 : if(ullMax < ullCurrent)
0001c e1560001 cmp r6, r1
00020 3a000028 bcc |$L15420|
00024 8a000001 bhi |$L15421|
00028 e1550000 cmp r5, r0
0002c 3a000025 bcc |$L15420|
00030 |$L15421|
; 388 : ullMax = ullStart + SPI_MINTIME;
; 389 : while( !(*SPI_SR & SPISR_TFE))
00030 e5943000 ldr r3, [r4]
00034 e3130001 tst r3, #1
00038 0afffff6 beq |$L15338|
; 396 : {
; 397 : return(0);
; 398 : }
; 399 : }
; 400 :
; 401 : //
; 402 : // Make sure that data is not actively going out.
; 403 : //
; 404 : ullStart = GetSystemTimeInUSec();
0003c eb000000 bl GetSystemTimeInUSec
; 405 : ullMax = ullStart + SPI_MINTIME;
; 406 : while( *SPI_SR & SPISR_BUSY)
00040 e29050c8 adds r5, r0, #0xC8
00044 e2a16000 adc r6, r1, #0
00048 ea000005 b |$L15422|
0004c |$L15343|
; 407 : {
; 408 : //
; 409 : // Check to see if we timed out.
; 410 : //
; 411 : ullCurrent = GetSystemTimeInUSec();
0004c eb000000 bl GetSystemTimeInUSec
; 412 : if(ullMax < ullCurrent)
00050 e1560001 cmp r6, r1
00054 3a00001b bcc |$L15420|
00058 8a000001 bhi |$L15422|
0005c e1550000 cmp r5, r0
00060 3a000018 bcc |$L15420|
00064 |$L15422|
; 405 : ullMax = ullStart + SPI_MINTIME;
; 406 : while( *SPI_SR & SPISR_BUSY)
00064 e5943000 ldr r3, [r4]
00068 e3130010 tst r3, #0x10
0006c 1afffff6 bne |$L15343|
; 413 : {
; 414 : return(0);
; 415 : }
; 416 : }
; 417 :
; 418 : //
; 419 : // Delay 200 uS. Just to make sure that the data is cleared
; 420 : // out the fifo.
; 421 : //
; 422 : DelayInuSec(200);
00070 e3a000c8 mov r0, #0xC8
00074 eb000000 bl DelayInuSec
; 423 :
; 424 : //
; 425 : // Read in all of the data that is in the fifo.
; 426 : //
; 427 : ullStart = GetSystemTimeInUSec();
00078 eb000000 bl GetSystemTimeInUSec
; 428 : ullMax = ullStart + SPI_MINTIME;
; 429 : while( *SPI_SR & SPISR_RNE)
0007c e5943000 ldr r3, [r4]
00080 e29060c8 adds r6, r0, #0xC8
00084 e2a17000 adc r7, r1, #0
00088 e3130004 tst r3, #4
0008c 0a00000a beq |$L15349|
00090 e59f503c ldr r5, [pc, #0x3C]
00094 |$L15348|
; 430 : {
; 431 : ulTemp = *SPI_DR;
00094 e5953000 ldr r3, [r5]
; 432 : //
; 433 : // Check to see if we timed out.
; 434 : //
; 435 : ullCurrent = GetSystemTimeInUSec();
00098 eb000000 bl GetSystemTimeInUSec
; 436 : if(ullMax < ullCurrent)
0009c e1570001 cmp r7, r1
000a0 3a000008 bcc |$L15420|
000a4 8a000001 bhi |$L15423|
000a8 e1560000 cmp r6, r0
000ac 3a000005 bcc |$L15420|
000b0 |$L15423|
; 428 : ullMax = ullStart + SPI_MINTIME;
; 429 : while( *SPI_SR & SPISR_RNE)
000b0 e5943000 ldr r3, [r4]
000b4 e3130004 tst r3, #4
000b8 1afffff5 bne |$L15348|
000bc |$L15349|
; 439 : }
; 440 : }
; 441 : return(1);
000bc e3a00001 mov r0, #1
; 442 : }
000c0 e8bd40f0 ldmia sp!, {r4 - r7, lr}
000c4 e12fff1e bx lr
000c8 |$L15420|
; 437 : {
; 438 : return(0);
000c8 e3a00000 mov r0, #0
; 442 : }
000cc e8bd40f0 ldmia sp!, {r4 - r7, lr}
000d0 e12fff1e bx lr
000d4 |$L15445|
000d4 b08a0008 DCD 0xb08a0008
000d8 b08a000c DCD 0xb08a000c
000dc |$M15441|
ENDP ; |ClearReceiveFifo|
00000 AREA |.text| { |WaitTillTransmitFifoEmpty| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$WaitTillTransmitFifoEmpty|, PDATA, SELECTION=5, ASSOC=|.text| { |WaitTillTransmitFifoEmpty| } ; comdat associative
|$T15465| DCD |$L15464|
DCD 0x40002501
; Function compile flags: /Ogsy
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -