source文件里引用了两个库tch_cal.lib和tchmdd.lib.
SOURCELIBS= /
$(_COMMONOAKROOT)/lib/$(_CPUINDPATH)/tch_cal.lib /
$(_COMMONOAKROOT)/lib/$(_CPUINDPATH)/tchmdd.lib /
tch_cal.lib(/WINCEROOT/PUBLIC/COMMON/OAK/DRIVERS/TOUCH/TCH_CAL)实现了触摸屏的校准算法.下表中的ErrorAnalysis,TouchPanelSetCalibration,TouchPanelCalibrateAPoint在此库中实现
tchmdd.lib(/WINCEROOT/PUBLIC/COMMON/OAK/DRIVERS/TOUCH/TCHMAIN/tchmain.c),实现了其他的touch screen driver functions.
这两个库实际上就是触摸屏的MDD层驱动.
Programming element
Description
ErrorAnalysis
This function provides information on the accuracy of the touch screen calibration.
TouchCalibrate
This function starts the touch screen calibration sequence.
TouchPanelCalibrateAPoint
This function converts noncalibrated points to calibrated points.
TouchPanelDisable
This function disables the touch screen.
TouchPanelEnable
This function enables and re-enables the touch screen.
TouchPanelGetDeviceCaps
This function returns information about the capabilities of the touch screen.
TouchPanelInitializeCursor
This function provides an opportunity for touch drivers to move the cursor at initialization time.
TouchPanelPowerHandler
This function handles power-state change notifications.
TouchPanelReadCalibrationAbort
This function aborts the currently active call to the TouchPanelCalibrateAPoint function.
TouchPanelReadCalibrationPoint
This function initiates the process of getting a calibration point.
TouchPanelSetCalibration
This function initializes calibration information in a global parameter vCalcParam, which you can use to convert noncalibrated points to calibrated points by the TouchPanelCalibrateAPoint function.
TouchPanelSetMode
This function sets mode information for a touch screen device.
而我们需要实现的PDD层驱动则是对应的以下DDSI函数,被对应的MDD层函数调用.
Programming element
Description
DdsiTouchPanelAttach
This function executes when the MDD's DLL entry point receives a DLL_PROCESS_ATTACH message.
DdsiTouchPanelDetach
This function executes when the MDD's DLL entry point receives a DLL_PROCESS_DETACH message.
DdsiTouchPanelDisable
This function disables the touch screen device.
DdsiTouchPanelEnable
This function applies power to the touch screen device and initializes it for operation.
DdsiTouchPanelGetDeviceCaps
This function queries capabilities of the touch screen device.
DdsiTouchPanelGetPoint
This function returns the most recently acquired point and its associated tip state information.
DdsiTouchPanelPowerHandler
This function indicates to the driver that the system is entering or leaving the suspend state.
DdsiTouchPanelSetMode
This function sets information about the touch screen device.