Skip to content

Commit bf720c0

Browse files
committed
drivers/ft5x06: configure interrupt mode in any case
The interrupt mode has to be configured independent on whether the INT pin is initialized already by the `ft5x06_init` function if parameter `cb` is defined or later, for example by the `touch_dev` implementation.
1 parent 7ac2865 commit bf720c0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/ft5x06/ft5x06.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ int ft5x06_init(ft5x06_t *dev, const ft5x06_params_t *params, ft5x06_event_cb_t
8383
if (gpio_is_valid(dev->params->int_pin) && cb) {
8484
DEBUG("[ft5x06] init: configuring touchscreen interrupt\n");
8585
gpio_init_int(dev->params->int_pin, GPIO_IN, GPIO_RISING, cb, arg);
86-
i2c_write_reg(FT5X06_BUS, FT5X06_ADDR, FT5X06_G_MODE_REG, FT5X06_G_MODE_INTERRUPT_TRIGGER & 0x01, 0);
8786
}
8887

88+
i2c_write_reg(FT5X06_BUS, FT5X06_ADDR, FT5X06_G_MODE_REG, FT5X06_G_MODE_INTERRUPT_TRIGGER & 0x01, 0);
89+
8990
i2c_release(FT5X06_BUS);
9091

9192
return 0;

0 commit comments

Comments
 (0)