Use WDF_DEVICE_PROPERTY_DATA to store calibration parameters as a binary buffer under the Device Parameters\TouchCalibration key.
// 3. Persist to registry status = StoreCalibrationRegistry(matrix); kmdf hid minidriver for touch i2c device calibration best
NTSTATUS TouchCalibrate_EvtIoDeviceControl( _In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, _In_ size_t OutputBufferLength, _In_ size_t InputBufferLength, _In_ ULONG IoControlCode) However, even the most well-written driver is only
Specifically, for I2C-connected touch devices, the most robust architecture is a . However, even the most well-written driver is only as good as its calibration routine. Send HID Feature Report to I2C device (Report
[ X_calibrated = A \cdot X_raw + B \cdot Y_raw + C ] [ Y_calibrated = D \cdot X_raw + E \cdot Y_raw + F ]
// 2. Compute affine matrix using Least Squares double matrix[6]; status = ComputeCalibrationMatrix(input->RawPoints, input->DisplayPoints, input->NumPoints, matrix);
// 4. Send HID Feature Report to I2C device (Report ID 0x03) UCHAR featureReport[32] = 0; featureReport[0] = 0x03; // Report ID for calibration RtlCopyMemory(&featureReport[1], matrix, sizeof(matrix)); status = WriteI2C_HIDFeatureReport(DeviceContext, featureReport, 32);