mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-31 13:09:38 +00:00 
			
		
		
		
	fix(touch): fixed tie option take no effect
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD | ||||
|  * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD | ||||
|  * | ||||
|  * SPDX-License-Identifier: Apache-2.0 | ||||
|  */ | ||||
| @@ -200,7 +200,12 @@ static inline void touch_ll_get_slope(touch_pad_t touch_num, touch_cnt_slope_t * | ||||
|  */ | ||||
| static inline void touch_ll_set_tie_option(touch_pad_t touch_num, touch_tie_opt_t opt) | ||||
| { | ||||
|     RTCIO.touch_pad[touch_num].tie_opt = opt; | ||||
|     if (opt == TOUCH_PAD_TIE_OPT_FLOAT) { | ||||
|         RTCIO.touch_pad[touch_num].xpd = 0; | ||||
|     } else { | ||||
|         RTCIO.touch_pad[touch_num].xpd = 1; | ||||
|         RTCIO.touch_pad[touch_num].tie_opt = opt; | ||||
|     } | ||||
| } | ||||
|  | ||||
| /** | ||||
| @@ -211,7 +216,11 @@ static inline void touch_ll_set_tie_option(touch_pad_t touch_num, touch_tie_opt_ | ||||
|  */ | ||||
| static inline void touch_ll_get_tie_option(touch_pad_t touch_num, touch_tie_opt_t *opt) | ||||
| { | ||||
|     *opt = (touch_tie_opt_t)RTCIO.touch_pad[touch_num].tie_opt; | ||||
|     if (RTCIO.touch_pad[touch_num].xpd) { | ||||
|         *opt = (touch_tie_opt_t)RTCIO.touch_pad[touch_num].tie_opt; | ||||
|     } else { | ||||
|         *opt = TOUCH_PAD_TIE_OPT_FLOAT; | ||||
|     } | ||||
| } | ||||
|  | ||||
| /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 laokaiyao
					laokaiyao