drivers: kscan: Fix the kscan gt911 driver

Update the calculation of the row and column.
Issues were seen when running the LVGL sample.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2023-01-31 13:15:05 -06:00 committed by Stephanos Ioannidis
parent b2eeecfee0
commit 5d7051f173

View file

@ -115,8 +115,8 @@ static int gt911_process(const struct device *dev)
}
pressed = (points == 1);
row = ((pointRegs.highX) << 8U) | pointRegs.lowX;
col = ((pointRegs.highY) << 8U) | pointRegs.lowY;
row = ((pointRegs.highY) << 8U) | pointRegs.lowY;
col = ((pointRegs.highX) << 8U) | pointRegs.lowX;
LOG_DBG("pressed: %d, row: %d, col: %d", pressed, row, col);