📄 xllp_keypad.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4345
TTL F:\wm520\PLATFORM\intel_dbpxa27x\Public\CSP\ARM\INTEL\PXA27X\XLLP\SOURCE\.\xllp_keypad.c
CODE32
00000 AREA |.drectve|, DRECTVE
DCB "-defaultlib:coredll.lib "
DCB "-defaultlib:corelibc.lib "
00000 AREA |.data|, DATA
COMMON |KP_Status|, 0x4
00000 AREA |.bss|, NOINIT
|?xllpKpKIP_Initialized@?1??XllpKpKeypressIsInProgress@@9@9| % 0x4 ; `XllpKpKeypressIsInProgress'::`2'::xllpKpKIP_Initialized
00000 AREA |.data|, DATA
|?PrevCount@?1??ReadDirectKeys@@9@9| DCD 0x7f ; `ReadDirectKeys'::`2'::PrevCount
|XllpKpdGpioDirNonScrollWheelInList| DCD 0x7
DCD 0x5f
DCD 0x61
DCD 0x62
DCD 0x63
DCD 0x64
DCD 0x65
DCD 0x66
|XllpKpdGpioDirOutList| DCD 0x7
DCD 0x60
DCD 0x67
DCD 0x68
DCD 0x69
DCD 0x6a
DCD 0x6b
DCD 0x6c
|XllpKpdGpioDirInList| DCD 0x9
DCD 0x5d
DCD 0x5e
DCD 0x5f
DCD 0x61
DCD 0x62
DCD 0x63
DCD 0x64
DCD 0x65
DCD 0x66
% 4
|XllpKpdGpioAltFnValList| DCD 0x10
DCD 0x1
DCD 0x1
DCD 0x3
DCD 0x3
DCD 0x3
DCD 0x3
DCD 0x3
DCD 0x1
DCD 0x1
DCD 0x1
DCD 0x2
DCD 0x2
DCD 0x2
DCD 0x2
DCD 0x2
DCD 0x2
% 4
|XllpKpdGpioAltFnPinList| DCD 0x10
DCD 0x5d
DCD 0x5e
DCD 0x5f
DCD 0x60
DCD 0x61
DCD 0x62
DCD 0x63
DCD 0x64
DCD 0x65
DCD 0x66
DCD 0x67
DCD 0x68
DCD 0x69
DCD 0x6a
DCD 0x6b
DCD 0x6c
EXPORT |ReadScanCodeAutomatically|
; File f:\wm520\platform\intel_dbpxa27x\public\csp\arm\intel\pxa27x\xllp\source\xllp_keypad.c
00000 AREA |.text| { |ReadScanCodeAutomatically| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$ReadScanCodeAutomatically|, PDATA, SELECTION=5, ASSOC=|.text| { |ReadScanCodeAutomatically| } ; comdat associative
|$T878| DCD |$L877|
DCD 0x40006e02
; Function compile flags: /Ogsy
00000 AREA |.text| { |ReadScanCodeAutomatically| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |ReadScanCodeAutomatically| PROC
; 22 : {
00000 |$L877|
00000 e92d41f0 stmdb sp!, {r4 - r8, lr}
00004 e24dd004 sub sp, sp, #4
00008 |$M875|
00008 e1a08001 mov r8, r1
0000c e1a07000 mov r7, r0
; 23 : XLLP_BOOL_T retval=XLLP_FALSE;
; 24 : XLLP_UINT32_T C,R,RthBit,c0,c1,c2,c3,c4,c5,c6,c7;
; 25 : XLLP_UINT32_T numOfKeysPressed=0;
; 26 :
; 27 : if(KP_Status & MATRIX_INTR_BIT)
00010 e59f319c ldr r3, [pc, #0x19C]
00014 e3a00000 mov r0, #0
00018 e5933000 ldr r3, [r3]
0001c e3130501 tst r3, #1, 10
00020 0a000060 beq |$L664|
; 28 : {
; 29 : numOfKeysPressed = ((v_pKeyPadRegs->kpAutomaticScanReg & MULTI_KEYS_PRESS) >> 26);
00024 e5973020 ldr r3, [r7, #0x20]
00028 e1a03083 mov r3, r3, lsl #1
0002c e1a03da3 mov r3, r3, lsr #27
; 30 : // RETAILMSG(1,(TEXT("XLLP:ReadScanCodeAutomatically numOfKeysPressed %x>\r\n"),numOfKeysPressed));
; 31 : // checks to see if it was a "Major" key that was pressed
; 32 : if(numOfKeysPressed == 1)
00030 e3530001 cmp r3, #1
; 33 : {
; 34 : C = (v_pKeyPadRegs->kpAutomaticScanReg & COL_SELECTED_MASK);
00034 05973020 ldreq r3, [r7, #0x20]
; 35 : R = (v_pKeyPadRegs->kpAutomaticScanReg & ROW_SELECTED_MASK);
00038 05972020 ldreq r2, [r7, #0x20]
0003c 0203000f andeq r0, r3, #0xF
00040 020230f0 andeq r3, r2, #0xF0
; 36 : *key = (unsigned char) (C | R);
00044 01833000 orreq r3, r3, r0
00048 0a000054 beq |$L865|
; 37 : }
; 38 : else
; 39 : // if it was a "Minor" key, then more than one key was activated and that is how
; 40 : // you can determine which register to read from.
; 41 : if(numOfKeysPressed > 1)
0004c 9a000052 bls |$L668|
; 42 : {
; 43 : c0 = v_pKeyPadRegs->kpAutoScanMultiKeyPress0 & 0xFF;
00050 e5976028 ldr r6, [r7, #0x28]
; 44 : c1 = ((v_pKeyPadRegs->kpAutoScanMultiKeyPress0 >> 16) & 0xFF);
00054 e5972028 ldr r2, [r7, #0x28]
; 45 : c2 = v_pKeyPadRegs->kpAutoScanMultiKeyPress1 & 0xFF;
00058 e5975030 ldr r5, [r7, #0x30]
; 46 : c3 = ((v_pKeyPadRegs->kpAutoScanMultiKeyPress1 >> 16) & 0xFF);
0005c e5971030 ldr r1, [r7, #0x30]
; 47 : c4 = v_pKeyPadRegs->kpAutoScanMultiKeyPress2 & 0xFF;
00060 e597e038 ldr lr, [r7, #0x38]
; 48 : c5 = ((v_pKeyPadRegs->kpAutoScanMultiKeyPress2 >> 16) & 0xFF);
00064 e5974038 ldr r4, [r7, #0x38]
; 49 : c6 = v_pKeyPadRegs->kpAutoScanMultiKeyPress3 & 0xFF;
00068 e5970040 ldr r0, [r7, #0x40]
; 50 : c7 = ((v_pKeyPadRegs->kpAutoScanMultiKeyPress3 >> 16) & 0xFF);
0006c e5973040 ldr r3, [r7, #0x40]
00070 e1a01401 mov r1, r1, lsl #8
00074 e1a02402 mov r2, r2, lsl #8
00078 e21670ff ands r7, r6, #0xFF
0007c e1a06c22 mov r6, r2, lsr #24
00080 e1a01c21 mov r1, r1, lsr #24
00084 e20550ff and r5, r5, #0xFF
00088 e20e30ff and r3, lr, #0xFF
; 51 :
; 52 : // these keys are the "minor keys", the ones that needs top right and bottom left of the
; 53 : // cooresponding 4 keys surrounding them to trigger the correct key. Doing a binary search
; 54 : // there are 5 keys, the middle key reads 0x8, the first key reads 0x2 and the last reads 0x20.
; 55 : // this needs to be done for each row. This will be encorporated into a routine for the next
; 56 : // upgrade of keypad.
; 57 : if(c0!=0)
0008c 0a000007 beq |$L669|
; 58 : {
; 59 : C = 0x7;
00090 e3a02007 mov r2, #7
; 60 : if(c0 == 0x8)
00094 e3570008 cmp r7, #8
; 61 : {
; 62 : RthBit = 0x2;
; 63 : }
; 64 : else
00098 0a00001d beq |$L873|
; 65 : if(c0 > 0x8)
0009c 9a000001 bls |$L672|
; 66 : {
; 67 : if (c0 < 0x20)
000a0 e3570020 cmp r7, #0x20
; 68 : RthBit = 0x3;
; 69 : else
000a4 ea00002f b |$L874|
000a8 |$L672|
; 70 : RthBit = 0x4;
; 71 : }else
; 72 : {
; 73 : if (c0 > 0x2)
000a8 e3570002 cmp r7, #2
; 74 : RthBit = 0x1;
; 75 : else
000ac ea000022 b |$L872|
000b0 |$L669|
; 76 : RthBit = 0x0;
; 77 : }
; 78 : }else
; 79 : if(c1!=0)
000b0 e3560000 cmp r6, #0
000b4 0a000007 beq |$L679|
; 80 : {
; 81 : C = 0x8;
000b8 e3a02008 mov r2, #8
; 82 : if(c1 == 0x8)
000bc e3560008 cmp r6, #8
; 83 : {
; 84 : RthBit = 0x2;
; 85 : }
; 86 : else
000c0 0a000013 beq |$L873|
; 87 : if(c1 > 0x8)
000c4 9a000001 bls |$L682|
; 88 : {
; 89 : if (c1 < 0x20)
000c8 e3560020 cmp r6, #0x20
; 90 : RthBit = 0x3;
; 91 : else
000cc ea000025 b |$L874|
000d0 |$L682|
; 92 : RthBit = 0x4;
; 93 : }else
; 94 : {
; 95 : if (c1 > 0x2)
000d0 e3560002 cmp r6, #2
; 96 : RthBit = 0x1;
; 97 : else
000d4 ea000018 b |$L872|
000d8 |$L679|
; 98 : RthBit = 0x0;
; 99 : }
; 100 : }else
; 101 : if(c2!=0)
000d8 e3550000 cmp r5, #0
000dc 0a000007 beq |$L689|
; 102 : {
; 103 : C = 0x9;
000e0 e3a02009 mov r2, #9
; 104 : if(c2 == 0x8)
000e4 e3550008 cmp r5, #8
; 105 : {
; 106 : RthBit = 0x2;
; 107 : }
; 108 : else
000e8 0a000009 beq |$L873|
; 109 : if(c2 > 0x8)
000ec 9a000001 bls |$L692|
; 110 : {
; 111 : if (c2 < 0x20)
000f0 e3550020 cmp r5, #0x20
; 112 : RthBit = 0x3;
; 113 : else
000f4 ea00001b b |$L874|
000f8 |$L692|
; 114 : RthBit = 0x4;
; 115 : }else
; 116 : {
; 117 : if (c2 > 0x2)
000f8 e3550002 cmp r5, #2
; 118 : RthBit = 0x1;
; 119 : else
000fc ea00000e b |$L872|
00100 |$L689|
; 120 : RthBit = 0x0;
; 121 : }
; 122 : }else
; 123 : if(c3!=0)
00100 e3510000 cmp r1, #0
00104 0a000010 beq |$L699|
; 124 : {
; 125 : C = 0xa;
00108 e3a0200a mov r2, #0xA
; 126 : if(c3 == 0x8)
0010c e3510008 cmp r1, #8
00110 1a000002 bne |$L869|
00114 |$L873|
; 127 : {
; 128 : RthBit = 0x2;
00114 e3a03002 mov r3, #2
; 165 : }
; 166 : }
; 167 : *key = (unsigned char) ((C<<4) | RthBit);
00118 e1833202 orr r3, r3, r2, lsl #4
; 168 : }
; 169 : else
0011c ea00001f b |$L865|
00120 |$L869|
; 129 : }
; 130 : else
; 131 : if(c3 > 0x8)
00120 9a000004 bls |$L702|
; 132 : {
; 133 : if (c3 < 0x20)
00124 e3510020 cmp r1, #0x20
; 134 : RthBit = 0x3;
; 135 : else
00128 3a00000f bcc |$L871|
0012c |$L703|
; 136 : RthBit = 0x4;
0012c e3a03004 mov r3, #4
; 165 : }
; 166 : }
; 167 : *key = (unsigned char) ((C<<4) | RthBit);
00130 e1833202 orr r3, r3, r2, lsl #4
; 168 : }
; 169 : else
00134 ea000019 b |$L865|
00138 |$L702|
; 137 : }else
; 138 : {
; 139 : if (c3 > 0x2)
00138 e3510002 cmp r1, #2
0013c |$L872|
0013c 9a00000f bls |$L716|
; 140 : RthBit = 0x1;
00140 e3a03001 mov r3, #1
; 165 : }
; 166 : }
; 167 : *key = (unsigned char) ((C<<4) | RthBit);
00144 e1833202 orr r3, r3, r2, lsl #4
; 168 : }
; 169 : else
00148 ea000014 b |$L865|
0014c |$L699|
; 141 : else
; 142 : RthBit = 0x0;
; 143 : }
; 144 : }else
; 145 : if(c4!=0)
0014c e3530000 cmp r3, #0
00150 0a00000d beq |$L849|
; 146 : {
; 147 : C = 0xb;
00154 e3a0200b mov r2, #0xB
; 148 : if(c4 == 0x8)
00158 e3530008 cmp r3, #8
; 149 : {
; 150 : RthBit = 0x2;
; 151 : }
; 152 : else
0015c 0affffec beq |$L873|
; 153 : if(c4 > 0x8)
00160 9a000004 bls |$L712|
; 154 : {
; 155 : if (c4 < 0x20)
00164 e3530020 cmp r3, #0x20
00168 |$L874|
00168 2affffef bcs |$L703|
0016c |$L871|
; 156 : RthBit = 0x3;
0016c e3a03003 mov r3, #3
; 165 : }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -