Driver(touch): fix touch sensor driver for esp32s2.

1.update touch sensor driver for esp32s2;
2.update unit test for touch sensor;
3.update register files about touch sensor;
This commit is contained in:
fuzhibo
2020-02-18 20:29:20 +08:00
parent 4a4db96729
commit 340563f479
40 changed files with 5005 additions and 834 deletions

View File

@@ -19,7 +19,7 @@
void touch_hal_init(void)
{
touch_ll_disable_interrupt();
touch_ll_intr_disable();
touch_ll_clear_channel_mask(SOC_TOUCH_SENSOR_BIT_MASK_MAX);
touch_ll_clear_group_mask(SOC_TOUCH_SENSOR_BIT_MASK_MAX, SOC_TOUCH_SENSOR_BIT_MASK_MAX);
touch_ll_set_trigger_mode(TOUCH_TRIGGER_MODE_DEFAULT);
@@ -35,13 +35,13 @@ void touch_hal_deinit(void)
{
touch_ll_stop_fsm();
touch_ll_clear_trigger_status_mask();
touch_ll_disable_interrupt();
touch_ll_intr_disable();
}
void touch_hal_get_wakeup_status(touch_pad_t *pad_num)
{
uint32_t touch_mask = 0;
touch_hal_read_trigger_status_mask(&touch_mask);
touch_ll_read_trigger_status_mask(&touch_mask);
if (touch_mask == 0) {
*pad_num = -1;
}