From 3da8f2eda156d9371be9caea2b83932683caaabf Mon Sep 17 00:00:00 2001 From: Wangjialin Date: Mon, 29 Jan 2018 15:40:21 +0800 Subject: [PATCH] bugfix(touch): change the default value for sar_touch_enable register. Reported from github: https://github.com/espressif/esp-idf/issues/1236 All the touch channels are enabled by default in hardware. This would interfere other RTC function on Touch IOs. Disable touch function in touch_pad_init(). --- components/driver/rtc_module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/driver/rtc_module.c b/components/driver/rtc_module.c index a04282b808..e7725f2793 100644 --- a/components/driver/rtc_module.c +++ b/components/driver/rtc_module.c @@ -783,6 +783,7 @@ esp_err_t touch_pad_init() return ESP_FAIL; } touch_pad_intr_disable(); + touch_pad_clear_group_mask(TOUCH_PAD_BIT_MASK_MAX, TOUCH_PAD_BIT_MASK_MAX, TOUCH_PAD_BIT_MASK_MAX); touch_pad_set_fsm_mode(TOUCH_FSM_MODE_DEFAULT); touch_pad_set_trigger_mode(TOUCH_TRIGGER_MODE_DEFAULT); touch_pad_set_trigger_source(TOUCH_TRIGGER_SOURCE_DEFAULT);