A KMDF HID minidriver for I²C touch calibration provides robust, low-latency correction of touch coordinates without modifying user-space drivers. By intercepting IOCTL_HID_READ_REPORT and applying a transform matrix, it seamlessly integrates into Windows Touch stack. The presented design has been validated on multiple x86/ARM64 tablets with custom touch controllers, reducing touch offset error from ±2mm to <0.5mm after calibration.
Xcalibrated=A⋅Xraw+B⋅Yraw+Ccap X sub c a l i b r a t e d end-sub equals cap A center dot cap X sub r a w end-sub plus cap B center dot cap Y sub r a w end-sub plus cap C
Calibration for touch devices generally addresses three issues: Scaling, Offset, and Orientation. Scaling and Resolution Mapping kmdf hid minidriver for touch i2c device calibration
Microsoft standardized (Common.Class Extension) to simplify this. However, the generic in-box driver ( HIDI2C.sys ) lacks device-specific features—most notably, custom calibration routines .
Matching ACPI I2C device:
A KMDF HID minidriver acts as a transformation layer: raw touch coordinates (with physical offsets, rotations, or non-linearities) enter, and calibrated HID reports exit.
Capture logs via TraceView.exe and correlate with HID class driver traces. A KMDF HID minidriver for I²C touch calibration
For a multi-touch device, your HID Report Descriptor must conform to the Windows Precision Touchpad (PTP) or HID-over-I2C v1.0 spec. A minimal single-touch descriptor: