Merge branch 'bugfix/fix_touch_curr_scan_workaround_on_p4' into 'master'

fix(esp32p4): P4 touch channel 14 failure fix

Closes IDFGH-16661

See merge request espressif/esp-idf!42818
This commit is contained in:
Kevin (Lao Kaiyao)
2025-10-24 04:46:39 +08:00
3 changed files with 55 additions and 5 deletions
@@ -492,11 +492,7 @@ static inline void touch_ll_set_idle_channel_connect(touch_idle_conn_t type)
__attribute__((always_inline))
static inline uint32_t touch_ll_get_current_meas_channel(void)
{
uint32_t curr_chan = LP_TOUCH.chn_status.scan_curr;
HAL_ASSERT(curr_chan < 14);
// Workaround: the curr channel read 0 when the actual channel is 14
curr_chan = curr_chan == 0 ? 14 : curr_chan;
return curr_chan;
return LP_TOUCH.chn_status.scan_curr;
}
/**