mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(esp32p4): P4 touch channel 14 failure fix
Merges https://github.com/espressif/esp-idf/pull/17759 Core dump when using all touch channels on a P4 unless curr_chan is allowed to be 14
This commit is contained in:
committed by
laokaiyao
parent
b6370af474
commit
450ee3366d
@@ -482,11 +482,7 @@ static inline void touch_ll_set_idle_channel_connect(touch_pad_conn_type_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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user