📄 touch.cod
字号:
00000 |DdsiTouchPanelAttach| PROC
; 265 : {
00000 |$L32739|
00000 |$M32737|
; 266 : return(0);
00000 e3a00000 mov r0, #0
; 267 : }
00004 e12fff1e bx lr
00008 |$M32738|
ENDP ; |DdsiTouchPanelAttach|
EXPORT |DdsiTouchPanelDetach|
00000 AREA |.text| { |DdsiTouchPanelDetach| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$DdsiTouchPanelDetach|, PDATA, SELECTION=5, ASSOC=|.text| { |DdsiTouchPanelDetach| } ; comdat associative
|$T32749| DCD |$L32748|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |DdsiTouchPanelDetach| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |DdsiTouchPanelDetach| PROC
; 271 : {
00000 |$L32748|
00000 |$M32746|
; 272 : return(0);
00000 e3a00000 mov r0, #0
; 273 : }
00004 e12fff1e bx lr
00008 |$M32747|
ENDP ; |DdsiTouchPanelDetach|
IMPORT |XllpOstConfigureTimer|
00000 AREA |.text| { |?EnableTouchTimerInterrupt@@YAXI@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?EnableTouchTimerInterrupt@@YAXI@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?EnableTouchTimerInterrupt@@YAXI@Z| } ; comdat associative
|$T32758| DCD |$L32757|
DCD 0x40001102
; Function compile flags: /Ogsy
00000 AREA |.text| { |?EnableTouchTimerInterrupt@@YAXI@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?EnableTouchTimerInterrupt@@YAXI@Z| PROC ; EnableTouchTimerInterrupt
; 277 : {
00000 |$L32757|
00000 e52de004 str lr, [sp, #-4]!
00004 e24dd008 sub sp, sp, #8
00008 |$M32755|
00008 e1a0e000 mov lr, r0
; 278 : UINT32 TimerMatch;
; 279 : XLLP_OST_HANDLE_T XllpOSTHandle;
; 280 :
; 281 : // Obtain pointers to OST and INTC registers.
; 282 : //
; 283 : XllpOSTHandle.pOSTRegs = (XLLP_OST_T *) g_pOSTRegs;
0000c e59f302c ldr r3, [pc, #0x2C]
; 284 : XllpOSTHandle.pINTCRegs = (XLLP_INTC_T *) g_pICRegs;
; 285 :
; 286 : // XLLI initializes oier and rtsr to zeroes, so no further
; 287 : // initialization needs to be done. Match timers and
; 288 : // alarms are disabled.
; 289 : //
; 290 : // Current usage of Match registers:
; 291 : // M0 - Scheduler
; 292 : // M1 - Touch Panel
; 293 : // M2 - Profiler
; 294 :
; 295 : // Configure and arm the timer interrupt to interrupt every specified system tick interval.
; 296 : //
; 297 : TimerMatch = (XllpOSTHandle.pOSTRegs->oscr0 + TimeInterval);
; 298 : XllpOstConfigureTimer (&XllpOSTHandle, MatchReg1, TimerMatch);
00010 e3a01001 mov r1, #1
00014 e28d0000 add r0, sp, #0
00018 e5932000 ldr r2, [r3]
0001c e5933004 ldr r3, [r3, #4]
00020 e58d2000 str r2, [sp]
00024 e58d3004 str r3, [sp, #4]
00028 e5923010 ldr r3, [r2, #0x10]
0002c e083200e add r2, r3, lr
00030 eb000000 bl XllpOstConfigureTimer
; 299 :
; 300 : }
00034 e28dd008 add sp, sp, #8
00038 e49de004 ldr lr, [sp], #4
0003c e12fff1e bx lr
00040 |$L32760|
00040 00000000 DCD |g_pOSTRegs|
00044 |$M32756|
ENDP ; |?EnableTouchTimerInterrupt@@YAXI@Z|, EnableTouchTimerInterrupt
IMPORT |XllpOstDelayMicroSeconds|
00000 AREA |.text| { |?EnableTouchInterrupt@@YAXXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?EnableTouchInterrupt@@YAXXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?EnableTouchInterrupt@@YAXXZ| } ; comdat associative
|$T32766| DCD |$L32765|
DCD 0x40001301
; Function compile flags: /Ogsy
00000 AREA |.text| { |?EnableTouchInterrupt@@YAXXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?EnableTouchInterrupt@@YAXXZ| PROC ; EnableTouchInterrupt
; 304 : {
00000 |$L32765|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M32763|
; 305 :
; 306 : // Put the UCB1400 into touch interrupt mode.
; 307 : //
; 308 : SetUCB1400TouchInterruptMode();
00004 eb000000 bl |?SetUCB1400TouchInterruptMode@@YAHXZ|
; 309 : XllpOstDelayMicroSeconds((P_XLLP_OST_T) g_pOSTRegs, 1000);
00008 e59f4038 ldr r4, [pc, #0x38]
0000c e3a01ffa mov r1, #0xFA, 30
00010 e5940004 ldr r0, [r4, #4]
00014 eb000000 bl XllpOstDelayMicroSeconds
; 310 : UCB1X00_TOUCH_INT_SET;
00018 e594e000 ldr lr, [r4]
0001c e3a03b01 mov r3, #1, 22
; 311 : UCB1X00_TOUCH_RISING_EDGE_SET;
; 312 : // Enable TSPX interrupt (active low).
; 313 : //
; 314 : WriteAC97(UCB_FE_IE, TSPX_INT, DEV_TOUCH);
00020 e3a02001 mov r2, #1
00024 e58e3048 str r3, [lr, #0x48]
00028 e59e3030 ldr r3, [lr, #0x30]
0002c e3a01a01 mov r1, #1, 20
00030 e3a00060 mov r0, #0x60
00034 e3833b01 orr r3, r3, #1, 22
00038 e58e3030 str r3, [lr, #0x30]
0003c eb000000 bl WriteAC97
; 315 : }
00040 e8bd4010 ldmia sp!, {r4, lr}
00044 e12fff1e bx lr
00048 |$L32768|
00048 00000000 DCD |g_pGPIORegs|
0004c |$M32764|
ENDP ; |?EnableTouchInterrupt@@YAXXZ|, EnableTouchInterrupt
EXPORT |?PrepareNextInterrupt@@YAHXZ| ; PrepareNextInterrupt
00000 AREA |.text| { |?PrepareNextInterrupt@@YAHXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?PrepareNextInterrupt@@YAHXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?PrepareNextInterrupt@@YAHXZ| } ; comdat associative
|$T32785| DCD |$L32784|
DCD 0x40002302
; Function compile flags: /Ogsy
00000 AREA |.text| { |?PrepareNextInterrupt@@YAHXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?PrepareNextInterrupt@@YAHXZ| PROC ; PrepareNextInterrupt
; 319 : {
00000 |$L32784|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 e24dd008 sub sp, sp, #8
00008 |$M32782|
; 320 :
; 321 : if (g_NextExpectedInterrupt == PEN_DOWN)
00008 e59f4078 ldr r4, [pc, #0x78]
0000c e5943010 ldr r3, [r4, #0x10]
00010 e3530000 cmp r3, #0
00014 1a00000e bne |$L32430|
; 322 : {
; 323 : // Enable the touch controller interrupt and configure it for a falling edge detection.
; 324 : EnableTouchInterrupt();
00018 eb000000 bl |?SetUCB1400TouchInterruptMode@@YAHXZ|
0001c e5940004 ldr r0, [r4, #4]
00020 e3a01ffa mov r1, #0xFA, 30
00024 eb000000 bl XllpOstDelayMicroSeconds
00028 e594e000 ldr lr, [r4]
0002c e3a03b01 mov r3, #1, 22
00030 e3a02001 mov r2, #1
00034 e58e3048 str r3, [lr, #0x48]
00038 e59e3030 ldr r3, [lr, #0x30]
0003c e3a01a01 mov r1, #1, 20
00040 e3a00060 mov r0, #0x60
00044 e3833b01 orr r3, r3, #1, 22
00048 e58e3030 str r3, [lr, #0x30]
0004c eb000000 bl WriteAC97
; 325 : }
; 326 : else
00050 ea000008 b |$L32776|
00054 |$L32430|
; 327 : {
; 328 : // Re/arm the sample timer.
; 329 : EnableTouchTimerInterrupt(TOUCH_TIMER_INCREMENT);
00054 e5942004 ldr r2, [r4, #4]
00058 e5943008 ldr r3, [r4, #8]
0005c e3a01001 mov r1, #1
00060 e58d2000 str r2, [sp]
00064 e58d3004 str r3, [sp, #4]
00068 e5923010 ldr r3, [r2, #0x10]
0006c e28d0000 add r0, sp, #0
00070 e2832a09 add r2, r3, #9, 20
00074 eb000000 bl XllpOstConfigureTimer
00078 |$L32776|
; 330 : }
; 331 :
; 332 : return(TRUE);
00078 e3a00001 mov r0, #1
; 333 : }
0007c e28dd008 add sp, sp, #8
00080 e8bd4010 ldmia sp!, {r4, lr}
00084 e12fff1e bx lr
00088 |$L32787|
00088 00000000 DCD |g_pGPIORegs|
0008c |$M32783|
ENDP ; |?PrepareNextInterrupt@@YAHXZ|, PrepareNextInterrupt
EXPORT |?PenIsDown@@YAHXZ| ; PenIsDown
IMPORT |ReadAC97|
00000 AREA |.text| { |?PenIsDown@@YAHXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?PenIsDown@@YAHXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?PenIsDown@@YAHXZ| } ; comdat associative
|$T32797| DCD |$L32796|
DCD 0x40001a02
; Function compile flags: /Ogsy
00000 AREA |.text| { |?PenIsDown@@YAHXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?PenIsDown@@YAHXZ| PROC ; PenIsDown
; 337 : {
00000 |$L32796|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 e24dd004 sub sp, sp, #4
00008 |$M32794|
; 338 : UINT16 TCH_CR = 0;
00008 e3a03000 mov r3, #0
0000c e1cd30b0 strh r3, [sp]
; 339 :
; 340 : if (SetUCB1400TouchInterruptMode())
00010 eb000000 bl |?SetUCB1400TouchInterruptMode@@YAHXZ|
00014 e3500000 cmp r0, #0
00018 0a00000a beq |$L32436|
; 341 : {
; 342 : XllpOstDelayMicroSeconds((P_XLLP_OST_T) g_pOSTRegs, 250);
0001c e59f4040 ldr r4, [pc, #0x40]
00020 e3a010fa mov r1, #0xFA
00024 e5940000 ldr r0, [r4]
00028 eb000000 bl XllpOstDelayMicroSeconds
; 343 : ReadAC97(UCB_TCH_CR, &TCH_CR, DEV_TOUCH);
0002c e3a02001 mov r2, #1
00030 e28d1000 add r1, sp, #0
00034 e3a00064 mov r0, #0x64
00038 eb000000 bl ReadAC97
; 344 : XllpOstDelayMicroSeconds((P_XLLP_OST_T) g_pOSTRegs, 250);
0003c e5940000 ldr r0, [r4]
00040 e3a010fa mov r1, #0xFA
00044 eb000000 bl XllpOstDelayMicroSeconds
00048 |$L32436|
; 345 : }
; 346 :
; 347 : return((TCH_CR & TSPX_LOW) ? FALSE : TRUE);
00048 e1dd30b0 ldrh r3, [sp]
0004c e3130a01 tst r3, #1, 20
00050 13a00000 movne r0, #0
00054 03a00001 moveq r0, #1
; 348 : }
00058 e28dd004 add sp, sp, #4
0005c e8bd4010 ldmia sp!, {r4, lr}
00060 e12fff1e bx lr
00064 |$L32799|
00064 00000000 DCD |g_pOSTRegs|
00068 |$M32795|
ENDP ; |?PenIsDown@@YAHXZ|, PenIsDown
EXPORT |?evaluateSample@@YAHGGGHPAH@Z| ; evaluateSample
00000 AREA |.text| { |?evaluateSample@@YAHGGGHPAH@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?evaluateSample@@YAHGGGHPAH@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?evaluateSample@@YAHGGGHPAH@Z| } ; comdat associative
|$T32827| DCD |$L32826|
DCD 0x40002a01
; Function compile flags: /Ogsy
00000 AREA |.text| { |?evaluateSample@@YAHGGGHPAH@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?evaluateSample@@YAHGGGHPAH@Z| PROC ; evaluateSample
; 425 : {
00000 |$L32826|
00000 e92d41f0 stmdb sp!, {r4 - r8, lr}
00004 |$M32824|
00004 e1a07003 mov r7, r3
00008 e1a06002 mov r6, r2
; 426 : LONG diff0,diff1,diff2;
; 427 : INT retval=TouchSampleIgnore;
; 428 :
; 429 : if ((val0 < MAX_ADC_VAL) && (val1 < MAX_ADC_VAL) && (val2 < MAX_ADC_VAL))
0000c e3a0efff mov lr, #0xFF, 30
00010 e38ee003 orr lr, lr, #3
00014 e150000e cmp r0, lr
00018 e3a08010 mov r8, #0x10
0001c 2a00001e bcs |$L32469|
00020 e151000e cmp r1, lr
00024 2a00001c bcs |$L32469|
00028 e156000e cmp r6, lr
0002c 2a00001a bcs |$L32469|
; 430 : {
; 431 : // Calculate the absolute value of the differences of the sample
; 432 : diff0 = val0 - val1;
00030 e0405001 sub r5, r0, r1
; 433 : diff1 = val1 - val2;
; 434 : diff2 = val2 - val0;
; 435 : diff0 = diff0 > 0 ? diff0 : -diff0;
00034 e3550000 cmp r5, #0
00038 e0414006 sub r4, r1, r6
0003c d2655000 rsble r5, r5, #0
; 436 : diff1 = diff1 > 0 ? diff1 : -diff1;
00040 e3540000 cmp r4, #0
00044 e046e000 sub lr, r6, r0
00048 d2644000 rsble r4, r4, #0
; 437 : diff2 = diff2 > 0 ? diff2 : -diff2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -