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

📄 touch.cod

📁 对触摸屏的接口函数(DDI DDSI)以及调用关系作了详细介绍 可作为出次接触Touch Driver的开发人员研究Touch的一个很好的起点
💻 COD
📖 第 1 页 / 共 5 页
字号:
  00008	e1a08001	 mov         r8, r1
  0000c	e1a09000	 mov         r9, r0

; 276  :     int  retValue = 0 ;
; 277  : 
; 278  : 
; 279  :     if( matrixPtr->Divider != 0 )

  00010	e5973018	 ldr         r3, [r7, #0x18]
  00014	e3a06000	 mov         r6, #0
  00018	e3530000	 cmp         r3, #0
  0001c	0a000016	 beq         |$L34986|

; 280  :     {
; 281  : 
; 282  :             /* Operation order is important since we are doing integer */
; 283  :             /*  math. Make sure you add all terms together before      */
; 284  :             /*  dividing, so that the remainder is not rounded off     */
; 285  :             /*  prematurely.                                           */
; 286  : 
; 287  :         screenPtr->x = ( (matrixPtr->An * displayPtr->x) + 
; 288  :                           (matrixPtr->Bn * displayPtr->y) + 
; 289  :                            matrixPtr->Cn 
; 290  :                         ) / matrixPtr->Divider ;

  00020	e598e004	 ldr         lr, [r8, #4]
  00024	e5973004	 ldr         r3, [r7, #4]
  00028	e5985000	 ldr         r5, [r8]
  0002c	e5974000	 ldr         r4, [r7]
  00030	e003039e	 mul         r3, lr, r3
  00034	e597e008	 ldr         lr, [r7, #8]
  00038	e5970018	 ldr         r0, [r7, #0x18]
  0003c	e0233495	 mla         r3, r5, r4, r3
  00040	e083100e	 add         r1, r3, lr
  00044	eb000000	 bl          __rt_sdiv
  00048	e5890000	 str         r0, [r9]

; 291  : 
; 292  :         screenPtr->y = ( (matrixPtr->Dn * displayPtr->x) + 
; 293  :                           (matrixPtr->En * displayPtr->y) + 
; 294  :                            matrixPtr->Fn 
; 295  :                         ) / matrixPtr->Divider ;

  0004c	e598e004	 ldr         lr, [r8, #4]
  00050	e5973010	 ldr         r3, [r7, #0x10]
  00054	e5984000	 ldr         r4, [r8]
  00058	e597100c	 ldr         r1, [r7, #0xC]
  0005c	e003039e	 mul         r3, lr, r3
  00060	e5972014	 ldr         r2, [r7, #0x14]
  00064	e5970018	 ldr         r0, [r7, #0x18]
  00068	e0233194	 mla         r3, r4, r1, r3
  0006c	e0831002	 add         r1, r3, r2
  00070	eb000000	 bl          __rt_sdiv
  00074	e5890004	 str         r0, [r9, #4]

; 296  :     }
; 297  :     else

  00078	ea000000	 b           |$L34987|
  0007c		 |$L34986|

; 298  :     {
; 299  :         retValue = -1 ;

  0007c	e3e06000	 mvn         r6, #0
  00080		 |$L34987|

; 300  :     }
; 301  : 
; 302  :     return( retValue ) ;

  00080	e1a00006	 mov         r0, r6

; 303  : 
; 304  : } /* end of getDisplayPoint() */

  00084	e8bd43f0	 ldmia       sp!, {r4 - r9, lr}
  00088	e12fff1e	 bx          lr
  0008c		 |$M35455|

			 ENDP  ; |?getDisplayPoint@@YAHPAUtagPOINT@@0PAUtagMatrix@@@Z|, getDisplayPoint

	EXPORT	|?InitTouchCodecValue@@YAXH@Z|		; InitTouchCodecValue
	IMPORT	|AC97SetField|
	IMPORT	|RawAC97SetField|
	IMPORT	|WM97AC97Power|

  00000			 AREA	 |.text| { |?InitTouchCodecValue@@YAXH@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$?InitTouchCodecValue@@YAXH@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?InitTouchCodecValue@@YAXH@Z| } ; comdat associative
|$T35468| DCD	|$L35467|
	DCD	0x40004b01
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |?InitTouchCodecValue@@YAXH@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |?InitTouchCodecValue@@YAXH@Z| PROC	; InitTouchCodecValue

; 307  : {

  00000		 |$L35467|
  00000	e92d4030	 stmdb       sp!, {r4, r5, lr}
  00004		 |$M35465|
  00004	e3500000	 cmp         r0, #0

; 308  : 
; 309  : #ifndef TOUCH_DMA
; 310  : 	TouchIrq=TRUE;
; 311  : #endif
; 312  : 
; 313  : 	g_pGPIORegs->GPDR3 &= ~XLLP_GPIO_BIT_PENDOWN;

  00008	e59f5118	 ldr         r5, [pc, #0x118]
  0000c	e59f3110	 ldr         r3, [pc, #0x110]
  00010	e3a01001	 mov         r1, #1
  00014	e5952004	 ldr         r2, [r5, #4]
  00018	e5831000	 str         r1, [r3]

; 314  : 
; 315  :     g_pfnAC97_SetField=m_InPowerHandler?RawAC97SetField:AC97SetField;
; 316  : 
; 317  : 	WM97AC97Power(FALSE, 0, DEV_TOUCH, m_InPowerHandler); //shutdown=false

  0001c	e3a01000	 mov         r1, #0
  00020	e592310c	 ldr         r3, [r2, #0x10C]
  00024	e3c33802	 bic         r3, r3, #2, 16
  00028	e582310c	 str         r3, [r2, #0x10C]
  0002c	159f30ec	 ldrne       r3, [pc, #0xEC]
  00030	059f30e4	 ldreq       r3, [pc, #0xE4]
  00034	e3a02001	 mov         r2, #1
  00038	e5853000	 str         r3, [r5]
  0003c	e1a03000	 mov         r3, r0
  00040	e3a00000	 mov         r0, #0
  00044	eb000000	 bl          WM97AC97Power

; 318  : 
; 319  : 	//Power On VREF
; 320  : 	g_pfnAC97_SetField(WM97_POWER_CONTROL,0,WM97_PWR_VREF,DEV_TOUCH); //0x26

  00048	e5954000	 ldr         r4, [r5]
  0004c	e3a03001	 mov         r3, #1
  00050	e3a02b02	 mov         r2, #2, 22
  00054	e3a01000	 mov         r1, #0
  00058	e3a00026	 mov         r0, #0x26
  0005c	e1a0e00f	 mov         lr, pc
  00060	e12fff14	 bx          r4

; 321  : 	//Power On VREF and Touch Panel
; 322  : 	g_pfnAC97_SetField(WM9713_EXT_POWERDOWN_1,0,BIT_15|BIT_10,DEV_TOUCH); //0x3C

  00064	e5954000	 ldr         r4, [r5]
  00068	e3a03001	 mov         r3, #1
  0006c	e3a02b21	 mov         r2, #0x21, 22
  00070	e3a01000	 mov         r1, #0
  00074	e3a0003c	 mov         r0, #0x3C
  00078	e1a0e00f	 mov         lr, pc
  0007c	e12fff14	 bx          r4

; 323  : 
; 324  : #ifdef TOUCH_DMA
; 325  : 	//Set in Running mode, Disable 5-Wire, Enable PenDown-Only,
; 326  : 	g_pfnAC97_SetField(WM9713_DIGITISER_REG3,BIT_15|BIT_14|BIT_11,BIT_15|BIT_14|BIT_12|BIT_11,DEV_TOUCH); //0x78
; 327  : #else //Non_DMA version
; 328  : 	//Set in Running mode, Disable 5-Wire, Disable PenDown-Only,
; 329  : 	g_pfnAC97_SetField(WM9713_DIGITISER_REG3,BIT_15|BIT_14|BIT_0,BIT_15|BIT_14|BIT_12|BIT_11|0x3F,DEV_TOUCH); //0x78

  00080	e3a02b36	 mov         r2, #0x36, 22
  00084	e3a01903	 mov         r1, #3, 18
  00088	e5954000	 ldr         r4, [r5]
  0008c	e382203f	 orr         r2, r2, #0x3F
  00090	e3811001	 orr         r1, r1, #1
  00094	e3a03001	 mov         r3, #1
  00098	e3a00078	 mov         r0, #0x78
  0009c	e1a0e00f	 mov         lr, pc
  000a0	e12fff14	 bx          r4

; 330  : #endif
; 331  : 
; 332  : 	//Disable PIN 5A's Reset function
; 333  : 	g_pfnAC97_SetField(WM9713_ADD_FUN1,BIT_8,BIT_8,DEV_TOUCH); //0x5A

  000a4	e5954000	 ldr         r4, [r5]
  000a8	e3a03001	 mov         r3, #1
  000ac	e3a02c01	 mov         r2, #1, 24
  000b0	e3a01c01	 mov         r1, #1, 24
  000b4	e3a0005a	 mov         r0, #0x5A
  000b8	e1a0e00f	 mov         lr, pc
  000bc	e12fff14	 bx          r4

; 334  : 
; 335  : 	//Clear, which set GPIO 7 as Output
; 336  : 	g_pfnAC97_SetField(WM97_GPIO_PIN_CONFIG,0,BIT_7,DEV_TOUCH); //0x4C

  000c0	e5954000	 ldr         r4, [r5]
  000c4	e3a03001	 mov         r3, #1
  000c8	e3a02080	 mov         r2, #0x80
  000cc	e3a01000	 mov         r1, #0
  000d0	e3a0004c	 mov         r0, #0x4C
  000d4	e1a0e00f	 mov         lr, pc
  000d8	e12fff14	 bx          r4

; 337  : 	
; 338  : 	//Clear, which set GPIO 7 as Pendown function
; 339  : 	g_pfnAC97_SetField(WM97_GPIO_PIN_ASSIGN,0,BIT_7,DEV_TOUCH); //0x56

  000dc	e5954000	 ldr         r4, [r5]
  000e0	e3a03001	 mov         r3, #1
  000e4	e3a02080	 mov         r2, #0x80
  000e8	e3a01000	 mov         r1, #0
  000ec	e3a00056	 mov         r0, #0x56
  000f0	e1a0e00f	 mov         lr, pc
  000f4	e12fff14	 bx          r4

; 340  : 	
; 341  : 	
; 342  : #ifdef TOUCH_DMA
; 343  : 	//Continous Rate = 187.5Hz (bit 9:8=11b)
; 344  : 	//Settling Time  = 20.8 us (bit 7:4= 0000b)
; 345  : 	//Slot selection = SLOT 5  (bit 3:0= 1000b)
; 346  : 	g_pfnAC97_SetField(WM9713_DIGITISER_REG2,0x0308,0xFFFF,DEV_TOUCH); //0x76
; 347  : 
; 348  : 	//Set ADC source: Coordinate mode, Continuous Mode
; 349  : 	g_pfnAC97_SetField(WM9713_DIGITISER_REG1,BIT_8|BIT_0,0xFFFF,DEV_TOUCH); //0x74
; 350  : #else	//Non_DMA Version
; 351  : 	//Set Delay =
; 352  : 	g_pfnAC97_SetField(WM9713_DIGITISER_REG2,WM9713_DEL_3,WM9713_DEL_MASK,DEV_TOUCH); //0x76

  000f8	e5954000	 ldr         r4, [r5]
  000fc	e3a03001	 mov         r3, #1
  00100	e3a020f0	 mov         r2, #0xF0
  00104	e3a01030	 mov         r1, #0x30
  00108	e3a00076	 mov         r0, #0x76
  0010c	e1a0e00f	 mov         lr, pc
  00110	e12fff14	 bx          r4

; 353  : #endif
; 354  : }

  00114	e8bd4030	 ldmia       sp!, {r4, r5, lr}
  00118	e12fff1e	 bx          lr
  0011c		 |$L35470|
  0011c	00000000	 DCD         |AC97SetField|
  00120	00000000	 DCD         |RawAC97SetField|
  00124	00000000	 DCD         |TouchIrq|
  00128	00000000	 DCD         |g_pfnAC97_SetField|
  0012c		 |$M35466|

			 ENDP  ; |?InitTouchCodecValue@@YAXH@Z|, InitTouchCodecValue

	EXPORT	|??_C@_1DE@JOMFELBP@?$AA?2?$AAH?$AAa?$AAr?$AAd?$AAw?$AAa?$AAr?$AAe?$AA?2?$AAD?$AAe?$AAv?$AAi?$AAc?$AAe?$AAm?$AAa?$AAp?$AA?2@| [ DATA ] ; `string'
	EXPORT	|??_C@_1KE@LLCGBFGC@?$AAT?$AAO?$AAU?$AAC?$AAH?$AA?3?$AAT?$AAo?$AAu?$AAc?$AAh?$AAP?$AAa?$AAn?$AAe?$AAl?$AAp?$AAG?$AAe?$AAt@| [ DATA ] ; `string'
	EXPORT	|??_C@_1BK@HHGLMMJE@?$AAD?$AAE?$AAB?$AAU?$AAG?$AA_?$AAB?$AAI?$AAT?$AAM?$AAA?$AAP?$AA?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_1JE@OJAJCOFC@?$AAT?$AAO?$AAU?$AAC?$AAH?$AA?3?$AAT?$AAo?$AAu?$AAc?$AAh?$AAP?$AAa?$AAn?$AAe?$AAl?$AAp?$AAG?$AAe?$AAt@| [ DATA ] ; `string'
	EXPORT	|??_C@_1BM@KCFIODG@?$AAF?$AAI?$AAL?$AAT?$AAE?$AAR?$AA_?$AAB?$AAI?$AAT?$AAM?$AAA?$AAP?$AA?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_1BO@BOOFKNBK@?$AAS?$AAA?$AAM?$AAP?$AAL?$AAI?$AAN?$AAG?$AA_?$AAD?$AAE?$AAL?$AAA?$AAY?$AA?$AA@| [ DATA ] ; `string'
	IMPORT	|WriteDbgMsgToBuffer|
	IMPORT	|NKDbgPrintfW|
	IMPORT	|RegCloseKey|
	IMPORT	|RegOpenKeyExW|
	IMPORT	|RegQueryValueExW|

  00000			 AREA	 |.text| { |?TouchPanelpGetRegistry@@YAXPAK00@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$?TouchPanelpGetRegistry@@YAXPAK00@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?TouchPanelpGetRegistry@@YAXPAK00@Z| } ; comdat associative
|$T35480| DCD	|$L35479|
	DCD	0x40006a02

  00000			 AREA	 |.rdata| { |??_C@_1BO@BOOFKNBK@?$AAS?$AAA?$AAM?$AAP?$AAL?$AAI?$AAN?$AAG?$AA_?$AAD?$AAE?$AAL?$AAA?$AAY?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BO@BOOFKNBK@?$AAS?$AAA?$AAM?$AAP?$AAL?$AAI?$AAN?$AAG?$AA_?$AAD?$AAE?$AAL?$AAA?$AAY?$AA?$AA@| DCB "S"
	DCB	0x0, "A", 0x0, "M", 0x0, "P", 0x0, "L", 0x0, "I", 0x0, "N"
	DCB	0x0, "G", 0x0, "_", 0x0, "D", 0x0, "E", 0x0, "L", 0x0, "A"
	DCB	0x0, "Y", 0x0, 0x0, 0x0			; `string'

  00000			 AREA	 |.rdata| { |??_C@_1BM@KCFIODG@?$AAF?$AAI?$AAL?$AAT?$AAE?$AAR?$AA_?$AAB?$AAI?$AAT?$AAM?$AAA?$AAP?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BM@KCFIODG@?$AAF?$AAI?$AAL?$AAT?$AAE?$AAR?$AA_?$AAB?$AAI?$AAT?$AAM?$AAA?$AAP?$AA?$AA@| DCB "F"
	DCB	0x0, "I", 0x0, "L", 0x0, "T", 0x0, "E", 0x0, "R", 0x0, "_"
	DCB	0x0, "B", 0x0, "I", 0x0, "T", 0x0, "M", 0x0, "A", 0x0, "P"
	DCB	0x0, 0x0, 0x0				; `string'

  00000			 AREA	 |.rdata| { |??_C@_1JE@OJAJCOFC@?$AAT?$AAO?$AAU?$AAC?$AAH?$AA?3?$AAT?$AAo?$AAu?$AAc?$AAh?$AAP?$AAa?$AAn?$AAe?$AAl?$AAp?$AAG?$AAe?$AAt@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1JE@OJAJCOFC@?$AAT?$AAO?$AAU?$AAC?$AAH?$AA?3?$AAT?$AAo?$AAu?$AAc?$AAh?$AAP?$AAa?$AAn?$AAe?$AAl?$AAp?$AAG?$AAe?$AAt@| DCB "T"
	DCB	0x0, "O", 0x0, "U", 0x0, "C", 0x0, "H", 0x0, ":", 0x0, "T"
	DCB	0x0, "o", 0x0, "u", 0x0, "c", 0x0, "h", 0x0, "P", 0x0, "a"
	DCB	0x0, "n", 0x0, "e", 0x0, "l", 0x0, "p", 0x0, "G", 0x0, "e"
	DCB	0x0, "t", 0x0, "R", 0x0, "e", 0x0, "g", 0x0, "i", 0x0, "s"
	DCB	0x0, "t", 0x0, "r", 0x0, "y", 0x0, " ", 0x0, "-", 0x0, " "
	DCB	0x0, "F", 0x0, "a", 0x0, "i", 0x0, "l", 0x0, "e", 0x0, "d"
	DCB	0x0, " ", 0x0, "t", 0x0, "o", 0x0, " ", 0x0, "g", 0x0, "e"
	DCB	0x0, "t", 0x0, " ", 0x0, "%", 0x0, "s", 0x0, " ", 0x0, "v"
	DCB	0x0, "a", 0x0, "l", 0x0, "u", 0x0, "e", 0x0, ",", 0x0, " "
	DCB	0x0, "d", 0x0, "e", 0x0, "f", 0x0, "a", 0x0, "u", 0x0, "l"
	DCB	0x0, "t", 0x0, "i", 0x0, "n", 0x0, "g", 0x0, " ", 0x0, "t"
	DCB	0x0, "o", 0x0, " ", 0x0, "%", 0x0, "d", 0x0, 0xd, 0x0, 0xa
	DCB	0x0, 0x0, 0x0				; `string'

  00000			 AREA	 |.rdata| { |??_C@_1BK@HHGLMMJE@?$AAD?$AAE?$AAB?$AAU?$AAG?$AA_?$AAB?$AAI?$AAT?$AAM?$AAA?$AAP?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BK@HHGLMMJE@?$AAD?$AAE?$AAB?$AAU?$AAG?$AA_?$AAB?$AAI?$AAT?$AAM?$AAA?$AAP?$AA?$AA@| DCB "D"
	DCB	0x0, "E", 0x0, "B", 0x0, "U", 0x0, "G", 0x0, "_", 0x0, "B"
	DCB	0x0, "I", 0x0, "T", 0x0, "M", 0x0, "A", 0x0, "P", 0x0, 0x0
	DCB	0x0					; `string'

  00000			 AREA	 |.rdata| { |??_C@_1KE@LLCGBFGC@?$AAT?$AAO?$AAU?$AAC?$AAH?$AA?3?$AAT?$AAo?$AAu?$AAc?$AAh?$AAP?$AAa?$AAn?$AAe?$AAl?$AAp?$AAG?$AAe?$AAt@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1KE@LLCGBFGC@?$AAT?$AAO?$AAU?$AAC?$AAH?$AA?3?$AAT?$AAo?$AAu?$AAc?$AAh?$AAP?$AAa?$AAn?$AAe?$AAl?$AAp?$AAG?$AAe?$AAt@| DCB "T"
	DCB	0x0, "O", 0x0, "U", 0x0, "C", 0x0, "H", 0x0, ":", 0x0, "T"
	DCB	0x0, "o", 0x0, "u", 0x0, "c", 0x0, "h", 0x0, "P", 0x0, "a"
	DCB	0x0, "n", 0x0, "e", 0x0, "l", 0x0, "p", 0x0, "G", 0x0, "e"
	DCB	0x0, "t", 0x0, "R", 0x0, "e", 0x0, "g", 0x0, "i", 0x0, "s"
	DCB	0x0, "t", 0x0, "r", 0x0, "y", 0x0, " ", 0x0, "-", 0x0, " "
	DCB	0x0, "R", 0x0, "e", 0x0, "g", 0x0, "O", 0x0, "p", 0x0, "e"
	DCB	0x0, "n", 0x0, "K", 0x0, "e", 0x0, "y", 0x0, "E", 0x0, "x"
	DCB	0x0, "(", 0x0, "%", 0x0, "s", 0x0, ")", 0x0, " ", 0x0, "f"
	DCB	0x0, "a", 0x0, "i", 0x0, "l", 0x0, "e", 0x0, "d", 0x0, " "
	DCB	0x0, "%", 0x0, "d", 0x0, ",", 0x0, " ", 0x0, "u", 0x0, "s"
	DCB	0x0, "i", 0x0, "n", 0x0, "g", 0x0, " ", 0x0, "d", 0x0, "e"
	DCB	0x0, "f", 0x0, "a", 0x0, "u", 0x0, "l", 0x0, "t", 0x0, " "
	DCB	0x0, "s", 0x0, "e", 0x0, "t", 0x0, "t", 0x0, "i", 0x0, "n"

⌨️ 快捷键说明

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