For Kernel-Mode Driver Framework (KMDF) HID minidrivers on Windows, the HID over I2C driver

The following example code illustrates a basic calibration implementation in a KMDF HID minidriver:

  1. Show targets on screen.
  2. Read raw coordinates via IOCTL_TOUCH_GET_RAW (another private IOCTL that bypasses calibration).
  3. Compute transform.
  4. Write back via IOCTL_TOUCH_SET_CALIBRATION.
// Set the gain and offset values i2cInterface->WriteRegister(I2C_ADDRESS, REG_GAIN_X, CalibrationData->gainX); i2cInterface->WriteRegister(I2C_ADDRESS, REG_OFFSET_Y, CalibrationData->offsetY);

Testing and Validation

KMDF HID Minidriver for Touch I2C Device — Calibration Guide

Overview

This document describes how to implement calibration support in a KMDF-based HID minidriver for a touch controller connected over I²C. It covers design goals, data flow, required HID usages and reports, driver components, calibration algorithms, persistent storage, and testing/validation steps.