]> granicus.if.org Git - esp-idf/commitdiff
bugfix(touch): change the default value for sar_touch_enable register.
authorWangjialin <wangjialin@espressif.com>
Mon, 29 Jan 2018 07:40:21 +0000 (15:40 +0800)
committerWangjialin <wangjialin@espressif.com>
Mon, 29 Jan 2018 07:40:21 +0000 (15:40 +0800)
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

index a04282b8083f12137f8d26221d33da8ad6a1951d..e7725f27939a75978278599f3e03f2a201a13737 100644 (file)
@@ -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);