X_display = (X_raw - X_min) * (DisplayWidth / (X_max - X_min)) Y_display = (Y_raw - Y_min) * (DisplayHeight / (Y_max - Y_min))
Implementing calibration in a KMDF HID minidriver for an I2C touch device is powerful but must be done carefully. Follow these best practices: kmdf hid minidriver for touch i2c device calibration best
// Calibration interface #define IOCTL_CALIBRATION_SET_SENSITIVITY CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS) // ... X_display = (X_raw - X_min) * (DisplayWidth /