1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-20 03:22:01 +00:00

fix(core): fix touch activity detection in bootloader

[no changelog]
This commit is contained in:
cepetr 2025-02-12 10:54:45 +01:00 committed by cepetr
parent 850b52c1fe
commit ef51ea7801
4 changed files with 5 additions and 0 deletions

View File

@ -139,6 +139,7 @@ static secbool ft6x36_write_reg(i2c_bus_t* bus, uint8_t reg, uint8_t value) {
// To avoid this issue, we need to wake up the controller before
// sending any commands to it.
static void ft6x36_wake_up(i2c_bus_t* bus) {
#ifdef TOUCH_WAKEUP_WORKAROUND
uint8_t temp;
// Wake up the touch controller by reading one of its registers
// (the specific register does not matter)
@ -146,6 +147,7 @@ static void ft6x36_wake_up(i2c_bus_t* bus) {
// Wait for the touch controller to wake up
// (not sure if this is necessary, but it's safer to include it)
systick_delay_ms(1);
#endif
}
// Powers down the touch controller and puts all

View File

@ -109,6 +109,7 @@
#define I2C_INSTANCE_3_GUARD_TIME 50
#define TOUCH_SENSITIVITY 0x40
#define TOUCH_WAKEUP_WORKAROUND 1
#define TOUCH_I2C_INSTANCE 2
#define TOUCH_INT_PORT GPIOC
#define TOUCH_INT_PIN GPIO_PIN_3

View File

@ -108,6 +108,7 @@
#define I2C_INSTANCE_3_GUARD_TIME 50
#define TOUCH_SENSITIVITY 0x40
#define TOUCH_WAKEUP_WORKAROUND 1
#define TOUCH_I2C_INSTANCE 2
#define TOUCH_INT_PORT GPIOC
#define TOUCH_INT_PIN GPIO_PIN_3

View File

@ -109,6 +109,7 @@
#define I2C_INSTANCE_3_GUARD_TIME 50
#define TOUCH_SENSITIVITY 0x40
#define TOUCH_WAKEUP_WORKAROUND 1
#define TOUCH_I2C_INSTANCE 2
#define TOUCH_INT_PORT GPIOC
#define TOUCH_INT_PIN GPIO_PIN_3