KMDF HID Minidriver for Touch I2C Device is a kernel-mode driver framework (KMDF) solution used by Windows to enable communication between a touch screen and the system via the

Chosen: Upper filter on top of HIDI2C.sys — simpler because HID reports are already parsed.

For calibrating a touch I2C device using a KMDF HID Minidriver

Introduction

X_cal = A * X_raw + B * Y_raw + C
Y_cal = D * X_raw + E * Y_raw + F

10. Sample Calibration Flow

  1. Boot: Driver loads, reads HKLM\...\CalibrationMatrix.
  2. Device start: Sends I²C command to enable raw mode.
  3. Report interception: Every touch report is transformed.
  4. User-mode calibration tool sends IOCTL to driver to update matrix:
    #define IOCTL_SET_CALIBRATION CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)