Reduce touch overhead and cap frame rate at 24 FPS
This commit is contained in:
@@ -27,8 +27,9 @@ static bool ft6336u_read_reg(uint8_t reg, uint8_t *value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add delay after write, before read (like Arduino library does)
|
||||
sleep_us(10000); // 10ms delay
|
||||
// Short settle time between register address write and read.
|
||||
// 10ms here heavily throttles touch sampling during hold/move.
|
||||
sleep_us(100); // 0.1ms
|
||||
|
||||
result = i2c_read_blocking(g_config->i2c, FT6336U_ADDR, value, 1, false);
|
||||
if (result == 1) {
|
||||
@@ -50,8 +51,9 @@ static bool ft6336u_read_regs(uint8_t reg, uint8_t *buf, size_t len) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add delay after write, before read (like Arduino library does)
|
||||
sleep_us(10000); // 10ms delay
|
||||
// Short settle time between register address write and read.
|
||||
// 10ms here heavily throttles touch sampling during hold/move.
|
||||
sleep_us(100); // 0.1ms
|
||||
|
||||
result = i2c_read_blocking(g_config->i2c, FT6336U_ADDR, buf, len, false);
|
||||
if (result == (int)len) {
|
||||
|
||||
Reference in New Issue
Block a user