Compartilhar via


Touch Driver Architecture (Compact 2013)

3/26/2014

The following diagram shows the three major parts of the touch driver subsystem, and shows how touch data is provided to the Graphics, Windowing, and Events Subsystem (GWES).

Compact 7 touch driver software architecture

GWES provides overall control of the touch software. It interacts with the touch driver through the touch proxy driver, which emulates the Windows Embedded CE 6.0 touch driver and acts as an intermediary between GWES and the Compact 2013 touch driver.

The three parts of the driver subsystem (shown in blue) include:

  • The touch driver. This is a stream interface driver that interacts with the touch panel hardware, and is implemented as a layered driver that has model device driver (MDD) and platform dependent driver (PDD) layers. The PDD implements hardware-specific code. For more information about layered drivers that have MDD and PDD layers, see Layered Drivers.
    The MDD exports the standard stream interface functions Init, PreDeinit, Deinit, PreClose, Close, PowerDown, PowerUp, Read, and IOControl. Since it is a stream interface driver, Device Manager loads it and the hardware can be power managed. For more information about stream interface drivers, see Stream Drivers. For more information about Device Manager, see Device Manager.
  • Touch calibration functions. These functions are located in a separate DLL (not compiled into the driver). Keeping this code separate simplifies maintenance of the driver code. The touch proxy driver loads this DLL and calls it as required.
  • The touch proxy driver. This provides the same touch driver API that the Windows Embedded CE 6.0 touch driver provides for GWES. GWES loads this driver instead of the touch driver. The proxy driver also provides the TouchPanelEnableEx function that GWES uses to register a callback function for multi-touch data.

GWES and the drivers work together to provide touch data to GWES as follows:

  1. GWES registers a callback function with the touch driver by calling the TouchPanelEnableEx function provided by the touch proxy driver. The touch proxy driver uses the callback function to provide data to GWES.
  2. The touch proxy driver starts a callback thread and waits for touch data from the touch driver. It also calls the CreateFile function to open the touch driver. For more information about how file functions such as CreateFile relate to stream interface device drivers such as the touch driver, see Device Manager.
  3. The touch driver initializes the hardware and starts the Interrupt Service Thread (IST) that will respond to touch events.
  4. Whenever there is touch event, such as a tap on the touch screen, the IST responds and reads the touch data. It signals the touch proxy driver that the touch data is available, and the touch proxy driver uses IOCTL_TOUCH_GET_SAMPLES to get the touch data. For more information about IOCTLs, see DeviceIoControl.
  5. Depending on the data, the touch proxy driver calibrates it and then passes it to GWES using the callback function provided to TouchPanelEnableEx.

In This Section

  • Touch Proxy Driver
    Describes the touch proxy driver, which provides an API like that of the Windows Embedded CE 6.0 touch driver.

See Also

Concepts

Touch and Gesture