mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
pcnt: fix bug in clear interrupt status
This commit is contained in:
parent
8223278050
commit
dcb23c0bc8
@ -286,6 +286,7 @@ static void IRAM_ATTR pcnt_intr_service(void *arg)
|
||||
uint32_t status;
|
||||
pcnt_port_t pcnt_port = (pcnt_port_t)arg;
|
||||
pcnt_hal_get_intr_status(&(p_pcnt_obj[pcnt_port]->hal), &status);
|
||||
pcnt_hal_clear_intr_status(&(p_pcnt_obj[pcnt_port]->hal), status);
|
||||
|
||||
while (status) {
|
||||
int unit = __builtin_ffs(status) - 1;
|
||||
@ -295,7 +296,6 @@ static void IRAM_ATTR pcnt_intr_service(void *arg)
|
||||
(pcnt_isr_func[unit].fn)(pcnt_isr_func[unit].args);
|
||||
}
|
||||
}
|
||||
pcnt_hal_clear_intr_status(&(p_pcnt_obj[pcnt_port]->hal), status);
|
||||
}
|
||||
|
||||
static inline esp_err_t _pcnt_isr_service_install(pcnt_port_t pcnt_port, int intr_alloc_flags)
|
||||
|
Loading…
Reference in New Issue
Block a user