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().
This commit is contained in:
Wangjialin 2018-01-29 15:40:21 +08:00
parent 00da9c1cab
commit 3da8f2eda1

View 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);