Skip to content

Commit

Permalink
ft5x06: Fix initialization of RST and INT pins
Browse files Browse the repository at this point in the history
* fixed initialization of reset and interrupt pins

* Update components/lcd_touch/esp_lcd_touch_ft5x06/esp_lcd_touch_ft5x06.c

Co-authored-by: Vilem Zavodny <[email protected]>

* Update components/lcd_touch/esp_lcd_touch_ft5x06/esp_lcd_touch_ft5x06.c

Co-authored-by: Vilem Zavodny <[email protected]>

* correct names of config gpio variables

---------

Co-authored-by: ivancorrea <[email protected]>
Co-authored-by: Vilem Zavodny <[email protected]>
  • Loading branch information
3 people authored May 15, 2023
1 parent d0ad4e1 commit f1b5f72
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/lcd_touch/esp_lcd_touch_ft5x06/esp_lcd_touch_ft5x06.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,26 @@ esp_err_t esp_lcd_touch_new_i2c_ft5x06(const esp_lcd_panel_io_handle_t io, const
if (esp_lcd_touch_ft5x06->config.int_gpio_num != GPIO_NUM_NC) {
const gpio_config_t int_gpio_config = {
.mode = GPIO_MODE_INPUT,
.intr_type = GPIO_INTR_NEGEDGE,
.pin_bit_mask = BIT64(esp_lcd_touch_ft5x06->config.int_gpio_num)
};
ret = gpio_config(&int_gpio_config);
ESP_GOTO_ON_ERROR(ret, err, TAG, "GPIO config failed");

/* Register interrupt callback */
if (esp_lcd_touch_ft5x06->config.interrupt_callback) {
esp_lcd_touch_register_interrupt_callback(esp_lcd_touch_ft5x06, esp_lcd_touch_ft5x06->config.interrupt_callback);
}
}

/* Prepare pin for touch controller reset */
if (esp_lcd_touch_ft5x06->config.rst_gpio_num != GPIO_NUM_NC) {
const gpio_config_t rst_gpio_config = {
.mode = GPIO_MODE_OUTPUT,
.intr_type = GPIO_INTR_NEGEDGE,
.pin_bit_mask = BIT64(esp_lcd_touch_ft5x06->config.rst_gpio_num)
};
ret = gpio_config(&rst_gpio_config);
ESP_GOTO_ON_ERROR(ret, err, TAG, "GPIO config failed");

/* Register interrupt callback */
if (esp_lcd_touch_ft5x06->config.interrupt_callback) {
esp_lcd_touch_register_interrupt_callback(esp_lcd_touch_ft5x06, esp_lcd_touch_ft5x06->config.interrupt_callback);
}
}

/* Init controller */
Expand Down

0 comments on commit f1b5f72

Please sign in to comment.