Windows CE 觸摸屏(TouchPanel)驅動簡析(2)-DDSI函數

 1.DdsiTouchPanelAttach和DdsiTouchPanelDetach
          DLL entry進入或結束執行,這裏不需要任何工作,直接返回0

LONG DdsiTouchPanelAttach(void)
{
  return  1;
}  

This function executes when the MDD's DLL entry point gets a DLL_PROCESS_ATTACH message.

 

LONG DdsiTouchPanelDetach(void) { return 0; }

 

This function executes when the MDD's DLL entry point receives a DLL_PROCESS_DETACH message.

2.DdsiTouchPanelEnable
    DdsiTouchPanelEnable使能觸摸屏並進行相應的初始化工作等。

3.DdsiTouchPanelDisable
      對應的就有DdsiTouchPanelDisable函數,將DdsiTouchPanelEnable申請的資源進行釋放.屏蔽中斷.

4.DdsiTouchPanelSetMode
    DdsiTouchPanelSetMode用來設置觸摸屏的採樣率週期.函數傳入TPSM_SAMPLERATE_LOW_ID或TPSM_SAMPLERATE_HIGH_ID來進行相應的設置.這裏只有一個採樣率週期,所以函數不做實際工作.

5.DdsiTouchPanelPowerHandler
         DdsiTouchPanelPowerHandler用來通知驅動系統正進入或離開掛起狀態.
參數bOff爲TRUE表明系統正在關閉, FALSE表明系統正在開啓.

6.DdsiTouchPanelGetDeviceCaps
    DdsiTouchPanelGetDeviceCaps用來查詢觸摸屏設備的性能參數.
    iIndex可能爲以下3個參數:
    TPDC_SAMPLE_RATE_ID: 返回採樣週期,這裏TSP_SAMPLE_RATE_LOW,TSP_SAMPLE_RATE_HIGH,

     TPDC_CALIBRATION_POINT_ID:返回需要校準點的XY座標.校準點座標索引在PointNumber(lpOutput傳遞的結構成員).調用     

7.DdsiTouchPanelGetPoint來獲得.這點分別位於四個角和中間,也就是我們調用觸摸屏校準程序時會調用到的函數.
        TPDC_CALIBRATION_POINT_COUNT_ID:返回用來校準觸摸屏的校準點數目.這裏的數目設置爲5.

8. DdsiTouchPanelPowerHandler

        As with all power-down handlers, this function cannot call functions in
other DLLs, memory allocators, debugging output functions, or do anything
that could cause a page fault. This routine is called by the MDD.

 

 9. DdsiTouchPanelSetMode

         This function sets information about the touch screen device.

 

 

 DEF:

   

LIBRARY touch

   

LIBRARY touch

EXPORTS
 TouchPanelGetDeviceCaps
 TouchPanelEnable
 TouchPanelDisable
 TouchPanelSetMode
 TouchPanelReadCalibrationPoint
 TouchPanelReadCalibrationAbort
 TouchPanelSetCalibration
 TouchPanelCalibrateAPoint
 TouchPanelPowerHandler

 

 

 

 


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章