Open Bornock opened 3 years ago
As far as I can understand, the linux kernel seem to do the same as I am currently doing: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/input/touchscreen/silead.c#n244
Maybe I did not understand what you are saying. Feel free to open a PR, so we can discus this over some code ;)
In the two routines void GSL1680::clear_reg() and void GSL1680::reset() the < delay(TIMER[i]); > should be placed outside of the for...loop after the < int r = Wire.endTransmission(); >
With the delay inside the loop it introduces extra delays onto the I2C bus timings that cause unwanted errors 3 or 4. The GSL1680 uses these delays to actually execute the clear and/or reset.