Kmdf Hid Minidriver For Touch I2c Device Calibration Here
CalibratedPoint->X = (RawPoint->X * pContext->CoeffA) + (RawPoint->Y * pContext->CoeffB) + pContext->CoeffC; CalibratedPoint->Y = (RawPoint->X * pContext->CoeffD) + (RawPoint->Y * pContext->CoeffE) + pContext->CoeffF;
WDFKEY hKey; WdfDeviceOpenRegistry(Device, PLUGPLAY_REGKEY_DEVICE, &hKey); // Read REG_BINARY "CalibCoeffs" -> store in device context WdfRegistryClose(hKey); When user-mode sends SET_COEFFS , write back immediately to the registry. kmdf hid minidriver for touch i2c device calibration
In your KMDF driver, implement a EvtIoDeviceControl callback: X = (RawPoint->
VOID ApplyCalibration(PTOUCH_POINT RawPoint, PTOUCH_POINT CalibratedPoint) X * pContext->