Lines Matching refs:pcnt_isr_func
54 static pcnt_isr_func_t *pcnt_isr_func = NULL; variable
267 …PCNT_CHECK(pcnt_isr_func != NULL, "ISR service is not installed, call pcnt_install_isr_service() f… in _pcnt_isr_handler_add()
272 if (pcnt_isr_func) { in _pcnt_isr_handler_add()
273 pcnt_isr_func[unit].fn = isr_handler; in _pcnt_isr_handler_add()
274 pcnt_isr_func[unit].args = args; in _pcnt_isr_handler_add()
285 PCNT_CHECK(pcnt_isr_func != NULL, "ISR service is not installed", ESP_ERR_INVALID_STATE); in _pcnt_isr_handler_remove()
290 if (pcnt_isr_func) { in _pcnt_isr_handler_remove()
291 pcnt_isr_func[unit].fn = NULL; in _pcnt_isr_handler_remove()
292 pcnt_isr_func[unit].args = NULL; in _pcnt_isr_handler_remove()
311 if (pcnt_isr_func[unit].fn != NULL) { in pcnt_intr_service()
312 (pcnt_isr_func[unit].fn)(pcnt_isr_func[unit].args); in pcnt_intr_service()
320 PCNT_CHECK(pcnt_isr_func == NULL, "ISR service already installed", ESP_ERR_INVALID_STATE); in _pcnt_isr_service_install()
322 pcnt_isr_func = (pcnt_isr_func_t *) calloc(SOC_PCNT_UNITS_PER_GROUP, sizeof(pcnt_isr_func_t)); in _pcnt_isr_service_install()
324 if (pcnt_isr_func == NULL) { in _pcnt_isr_service_install()
330 free(pcnt_isr_func); in _pcnt_isr_service_install()
331 pcnt_isr_func = NULL; in _pcnt_isr_service_install()
341 PCNT_CHECK(pcnt_isr_func != NULL, "ISR Service not installed yet.", ESP_ERR_INVALID_STATE); in _pcnt_isr_service_uninstall()
344 free(pcnt_isr_func); in _pcnt_isr_service_uninstall()
345 pcnt_isr_func = NULL; in _pcnt_isr_service_uninstall()