mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(hal): graudate the touch sensor hal driver into a new component
This commit is contained in:
@@ -8,6 +8,3 @@
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/soc_caps_eval.h"
|
||||
|
||||
/*------------------------------- Touch Sensor ------------------------------------*/
|
||||
#define _SOC_CAPS_TOUCH_CHAN_NUM 15 // Number of touch sensor channels
|
||||
|
||||
@@ -16,4 +16,3 @@
|
||||
#include "soc/gpio_pins.h"
|
||||
#include "soc/spi_pins.h"
|
||||
#include "soc/sdmmc_pins.h"
|
||||
#include "soc/touch_sensor_pins.h"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SOC_TOUCH_SHIELD_CHANNEL (14) /*!< The waterproof function includes a shielded channel (TOUCH_PAD_NUM14) */
|
||||
#define SOC_TOUCH_DENOISE_CHANNEL (0) /*!< T0 is an internal channel that does not have a corresponding external GPIO.
|
||||
T0 will work simultaneously with the measured channel Tn. Finally, the actual
|
||||
measured value of Tn is the value after subtracting lower bits of T0. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/touch_sensor_channel.h"
|
||||
|
||||
/* Store IO number corresponding to the Touch Sensor channel number. */
|
||||
/* Note: T0 is an internal channel that does not have a corresponding external GPIO. */
|
||||
const int touch_sensor_channel_io_map[] = {
|
||||
-1,
|
||||
TOUCH_PAD_NUM1_GPIO_NUM,
|
||||
TOUCH_PAD_NUM2_GPIO_NUM,
|
||||
TOUCH_PAD_NUM3_GPIO_NUM,
|
||||
TOUCH_PAD_NUM4_GPIO_NUM,
|
||||
TOUCH_PAD_NUM5_GPIO_NUM,
|
||||
TOUCH_PAD_NUM6_GPIO_NUM,
|
||||
TOUCH_PAD_NUM7_GPIO_NUM,
|
||||
TOUCH_PAD_NUM8_GPIO_NUM,
|
||||
TOUCH_PAD_NUM9_GPIO_NUM,
|
||||
TOUCH_PAD_NUM10_GPIO_NUM,
|
||||
TOUCH_PAD_NUM11_GPIO_NUM,
|
||||
TOUCH_PAD_NUM12_GPIO_NUM,
|
||||
TOUCH_PAD_NUM13_GPIO_NUM,
|
||||
TOUCH_PAD_NUM14_GPIO_NUM
|
||||
};
|
||||
Reference in New Issue
Block a user