Touch I2c Device Calibration - Kmdf Hid Minidriver For
Storage formats
Pass the Windows Hardware Lab Kit tests specifically for:
Implement read/write utilities using KMDF I²C target: kmdf hid minidriver for touch i2c device calibration
NTSTATUS I2CRead(WDFIOTARGET I2cTarget, UCHAR Register, PVOID Buffer, ULONG Length)
WDF_MEMORY_DESCRIPTOR wmdIn, wmdOut;
WDFMEMORY memory;
// Build I2C read transaction
SPI_TRANSFER_DESCRIPTOR transferDesc[2];
// ...
return WdfIoTargetSendI2cTransactionSynchronously(...);
[HID Class Driver (hidclass.sys)]
↑
[TouchCalibMini.sys – our KMDF minidriver]
↑
[SPB I2C Controller Driver (SpbCx)]
↑
[I2C Hardware]
Modern touch controllers (e.g., Atmel, Cypress, Goodix) often connect via I²C and conform to the HID over I²C protocol specification. While Windows provides the inbox HIDI2C.sys driver, certain touch panels require custom calibration logic – storing per‑device offsets, sensitivity factors, or edge correction coefficients in non‑volatile memory (NVM) or the registry. A Kernel‑Mode Driver Framework (KMDF) HID minidriver allows you to:
This write‑up assumes you have:
Your INF must declare the driver as a HID minidriver:
[MyDevice_Install.NT] CopyFiles = MyDriver.Copy AddReg = MyDevice_AddReg
[MyDevice_AddReg] HKR,,"UpperFilters",0x00010000,"HidUsb" ; For HID class HKR,,"LowerFilters",0x00010000,"SpbCx" ; For I2C busStorage formats Pass the Windows Hardware Lab Kit