Skip to content

Commit 86bcea6

Browse files
committed
Merge branch 'feature/touch_driver_ng_on_p4_v5.3' into 'release/v5.3'
feat(touch_sensor): touch driver ng on p4 (v5.3) See merge request espressif/esp-idf!31624
2 parents 35e9a11 + 2c79587 commit 86bcea6

File tree

81 files changed

+4289
-403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4289
-403
lines changed

components/driver/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ endif()
7373

7474
# Touch Sensor related source files
7575
if(CONFIG_SOC_TOUCH_SENSOR_SUPPORTED)
76-
list(APPEND srcs "touch_sensor/touch_sensor_common.c"
77-
"touch_sensor/${target}/touch_sensor.c")
78-
list(APPEND includes "touch_sensor/${target}/include")
76+
if(CONFIG_SOC_TOUCH_SENSOR_VERSION LESS 3)
77+
list(APPEND srcs "touch_sensor/touch_sensor_common.c"
78+
"touch_sensor/${target}/touch_sensor.c")
79+
list(APPEND includes "touch_sensor/${target}/include")
80+
endif()
7981
endif()
8082

8183
# TWAI related source files

components/driver/touch_sensor/esp32s2/touch_sensor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "esp_log.h"
1111
#include "sys/lock.h"
1212
#include "soc/soc_pins.h"
13+
#include "soc/rtc_cntl_reg.h"
1314
#include "freertos/FreeRTOS.h"
1415
#include "freertos/semphr.h"
1516
#include "freertos/timers.h"

components/driver/touch_sensor/esp32s3/touch_sensor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "esp_log.h"
1111
#include "sys/lock.h"
1212
#include "soc/soc_pins.h"
13+
#include "soc/rtc_cntl_reg.h"
1314
#include "freertos/FreeRTOS.h"
1415
#include "freertos/semphr.h"
1516
#include "freertos/timers.h"

components/driver/touch_sensor/include/driver/touch_pad.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
#include "soc/soc_caps.h"
1010

11-
#if SOC_TOUCH_SENSOR_SUPPORTED
11+
#if SOC_TOUCH_SENSOR_SUPPORTED && SOC_TOUCH_SENSOR_VERSION < 3
1212
#include "driver/touch_sensor.h"
1313
#endif
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
idf_build_get_property(target IDF_TARGET)
2+
3+
if(${target} STREQUAL "linux")
4+
return() # This component is not supported by the POSIX/Linux simulator
5+
endif()
6+
7+
set(srcs)
8+
set(public_inc)
9+
10+
if(CONFIG_SOC_TOUCH_SENSOR_SUPPORTED)
11+
if(CONFIG_SOC_TOUCH_SENSOR_VERSION EQUAL 3)
12+
list(APPEND srcs "hw_ver3/touch_version_specific.c"
13+
"common/touch_sens_common.c")
14+
list(APPEND public_inc "include" "hw_ver3/include")
15+
endif()
16+
endif()
17+
18+
idf_component_register(SRCS ${srcs}
19+
PRIV_REQUIRES esp_driver_gpio
20+
INCLUDE_DIRS ${public_inc}
21+
)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
menu "ESP-Driver:Touch Sensor Configurations"
2+
depends on SOC_TOUCH_SENSOR_SUPPORTED
3+
config TOUCH_CTRL_FUNC_IN_IRAM
4+
bool "Place touch sensor control functions into IRAM"
5+
default n
6+
help
7+
Place touch sensor oneshot scanning and continuous scanning functions into IRAM,
8+
so that these function can be IRAM-safe and able to be called when the flash cache is disabled.
9+
Enabling this option can improve driver performance as well.
10+
11+
config TOUCH_ISR_IRAM_SAFE
12+
bool "Touch sensor ISR IRAM-Safe"
13+
default n
14+
help
15+
Ensure the touch sensor interrupt is IRAM-Safe by allowing the interrupt handler to be
16+
executable when the cache is disabled (e.g. SPI Flash write).
17+
18+
config TOUCH_ENABLE_DEBUG_LOG
19+
bool "Enable debug log"
20+
default n
21+
help
22+
Whether to enable the debug log message for touch driver.
23+
Note that, this option only controls the touch driver log, won't affect other drivers.
24+
25+
endmenu # Touch Sensor Configuration

0 commit comments

Comments
 (0)