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

 

 

 

 


 

你可能感兴趣的:(windows,工作,function,dll,library,debugging)