|
- 放假归来继续搞,以前打印太多信息了,现在屏蔽一些看看。慢慢找到规律。
- 我点击一下就打印了如下信息。
- touch :*px= 580
- touch :*py= 562
- bTSP_DownFlag = TRUE...PenDown!!!
- ::: TSP_SampleStart()
- !!!!!!!!!!!! BACKLIGHT ON !!!!!!!!!!!!
- touch :*px= 589
- touch :*py= 555
- bTSP_DownFlag = TRUE.PenDown!!!IRQ_Timer3 Interrupt
- ::: TSP_SampleStop()
- bTSP_DownFlag = FALSE...PenUP!!!
- 跟踪这些信息找到相关函数:
- /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
- /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
- PUBLIC VOID
- DdsiTouchPanelGetPoint(TOUCH_PANEL_SAMPLE_FLAGS * pTipStateFlags,
- INT * pUncalX,
- INT * pUncalY)
- {
- static INT x, y;
- if (v_pINTregs->SUBSRCPND & (1<
- {
- *pTipStateFlags = TouchSampleValidFlag;
- if ( (v_pADCregs->ADCDAT0 & (1 << 15)) |
- (v_pADCregs->ADCDAT1 & (1 << 15)) )
- {
- bTSP_DownFlag = FALSE;
- DEBUGMSG(ZONE_TIPSTATE, (TEXT("up\r\n")));
- v_pADCregs->ADCTSC &= 0xff;
- *pUncalX = x;
- *pUncalY = y;
- TSP_SampleStop();
- // Test
-
- RETAILMSG(1,(TEXT("bTSP_DownFlag = FALSE...PenUP!!!\r\n")));
- }
- else
- {
- bTSP_DownFlag = TRUE;
- if (!TSP_GetXY(&x, &y))
- {
- RETAILMSG(1,(TEXT("bTSP_DownFlag = TRUE;*pTipStateFlags = TouchSampleIgnore;\r\n")));
- *pTipStateFlags = TouchSampleIgnore;
- }
-
- TSP_TransXY(&x, &y);
- *pUncalX = x;
- *pUncalY = y;
- *pTipStateFlags |= TouchSampleDownFlag;
- //Test
- RETAILMSG(1,(TEXT("bTSP_DownFlag = TRUE...PenDown!!!\r\n")));
- TSP_SampleStart();
- }
- v_pINTregs->SUBSRCPND = (1<
- v_pINTregs->INTSUBMSK &= ~(1<
- InterruptDone(gIntrTouch);
- }
- else /* SYSINTR_TOUCH_CHANGED Interrupt Case */
- {
- // TSP_SampleStart();
-
- if (bTSP_DownFlag)
- {
- INT tx, ty;
- INT dx, dy;
- if (!TSP_GetXY(&tx, &ty))
- {
- *pTipStateFlags = TouchSampleIgnore;
- RETAILMSG(1,(TEXT("SYSINTR_TOUCH_CHANGED ;*pTipStateFlags = TouchSampleIgnore;\r\n")));
- }
- else
- {
-
- RETAILMSG(1,(TEXT("bTSP_DownFlag = TRUE.PenDown!!!IRQ_Timer3 Interrupt\r\n")));
- TSP_TransXY(&tx, &ty);
- // insert by mostek@dstcorp.com
- #define X_ERRV 0x3bf
- #define Y_ERRV 0x4ff
- if ((tx == X_ERRV) && (ty == Y_ERRV))
- {
- tx = x;
- ty = y;
- }
- // =================== mostek
- dx = (tx > x) ? (tx - x) : (x - tx);
- dy = (ty > y) ? (ty - y) : (y - ty);
- if (dx > TSP_CHANGE || dy > TSP_CHANGE)
- {
- *pUncalX = x = tx;
- *pUncalY = y = ty;
- //DEBUGMSG(ZONE_TIPSTATE, (TEXT("down-c-v %x %x\r\n"), x, y));
- *pTipStateFlags = TouchSampleValidFlag | TouchSampleDownFlag;
- }
- else
- {
- *pUncalX = x;
- *pUncalY = y;
- DEBUGMSG(ZONE_TIPSTATE, (TEXT("down-c %x %x\r\n"), x, y));
- *pTipStateFlags = TouchSampleIgnore;
- }
- }
- }
- else
- {
- *pTipStateFlags = TouchSampleIgnore;
- TSP_SampleStop();
-
- RETAILMSG(1,(TEXT("bTSP_DownFlag = FALSE.PenDown!!!IRQ_Timer3 Interrupt\r\n")));
- }
- InterruptDone(gIntrTouchChanged);
- }
- // add by wogo at2009.03.23 why?
- SetEvent(hEventTouchInput);
- }
复制代码
|
|