uapi_gpio_set_val(FT6X46_RESET_GPIO, GPIO_LEVEL_HIGH);
/* delay 100ms */
osDelay(200);
- uapi_gpio_set_dir(FT6X46_RESET_GPIO, GPIO_DIRECTION_INPUT);
+ // uapi_gpio_set_dir(FT6X46_RESET_GPIO, GPIO_DIRECTION_INPUT);
}
int32_t mem_ret;
static int fail_count = 0;
+ if (g_ft6x46_drv.work_status != FT6X46_WORK_NORMAL) {
+ tp_print("TOUCH:ft6x46_irq_callback not in normal mode skip read touch");
+ return ERRCODE_FAIL;
+ }
+
if (fts_touch_process() != ERRCODE_SUCC)
{
fail_count ++ ;
}else{
fail_count = 0;
}
- if (fail_count > 10){
+ if (fail_count%50 == 49){
+ tp_print("TOUCH:ft6x46_irq_callback fail to reset touch ");
hal_custom_resume_touch();
}
if (ret != EXT_ERR_SUCCESS) { tp_err("touch sleep ret=0x%x", ret); }
#if defined(TPTYPE_FT6X46)
if (ft6x46_suspend() == EXT_ERR_SUCCESS){
- i2c_save_reg(TOUCH_I2C_BUS);
- uapi_gpio_disable_interrupt(TOUCH_INT_GPIO); // close tp_int gpio interrupt
+
}
+ i2c_save_reg(TOUCH_I2C_BUS);
+ uapi_gpio_disable_interrupt(TOUCH_INT_GPIO); // close tp_int gpio interrupt
#else
i2c_save_reg(TOUCH_I2C_BUS);
uapi_gpio_disable_interrupt(TOUCH_INT_GPIO); // close tp_int gpio interrupt