Added Touchpad example

This commit is contained in:
lewishe
2023-04-12 13:35:08 +08:00
parent 96a1a08faf
commit 0aec97510a
4 changed files with 124 additions and 5 deletions
+5 -5
View File
@@ -74,11 +74,11 @@ public:
this->writeRegister(GT911_COMMAND, (uint8_t)0x02); // software reset
delay(200);
// int val = readRegister(GT911_MODULE_SWITCH_1);
// val &= 0XFC;
// val |= 0x03;
// this->writeRegister(GT911_MODULE_SWITCH_1, (uint8_t)val);
// delay(200);
int val = readRegister(GT911_MODULE_SWITCH_1);
val &= 0XFC;
val |= 0x03;
this->writeRegister(GT911_MODULE_SWITCH_1, (uint8_t)val);
delay(200);
return true;
}