This is the David Smart RA8875 Library with mods for working with FRDM-K64F
Diff: RA8875_Touch_GSL1680.cpp
- Revision:
- 182:8832d03a2a29
- Parent:
- 171:f92c0f1f6db4
- Child:
- 193:74f80834d59d
--- a/RA8875_Touch_GSL1680.cpp Fri Aug 02 02:12:26 2019 +0000 +++ b/RA8875_Touch_GSL1680.cpp Sat Aug 03 00:26:33 2019 +0000 @@ -6,14 +6,14 @@ /// after power-up, the program must be installed into the chip. This is done through /// the I2C interface. /// -/// @caution To make it a bit more complicated, I cannot find any source +/// @attention To make it a bit more complicated, I cannot find any source /// for this micro, only "bytestream", which one has to hope is defect free. /// -/// @caution To make it even more complicated, I do not have a display with this +/// @attention To make it even more complicated, I do not have a display with this /// controller in it, so this body of work is the collective merge of what I've /// found and interpreted and interface converted to align with this library. /// -/// @caution It is probably clear that this represents a work in process, and is +/// @attention It is probably clear that this represents a work in process, and is /// an attempt to make a working driver. /// /// http://linux-sunxi.org/GSL1680 has some useful information, a bit of which @@ -214,8 +214,6 @@ uint8_t RA8875::GSL1680_TouchPositions(void) { - uint16_t fingerAndY, AndX; - // [80] = # touch points // [81] not used // [82] not used @@ -241,6 +239,7 @@ int tNdx = GSL1680_TOUCH_POINTS - 1; int dNdx = TD_SPACE - 1; for ( ; tNdx >= 0; tNdx--, dNdx -= 4) { + uint16_t fingerAndY, AndX; fingerAndY = (uint16_t)(touch_data[dNdx-0])<<8 | (uint16_t)touch_data[dNdx-1]; AndX = (uint16_t)(touch_data[dNdx-2])<<8 | (uint16_t)touch_data[dNdx-3]; touchInfo[tNdx].coordinates.y = fingerAndY & 0x0FFF;