|
|
@@ -98,6 +98,8 @@ typedef intr_handle_t pcnt_isr_handle_t;
|
|
|
|
|
|
/**
|
|
|
* @brief Configure Pulse Counter unit
|
|
|
+ * @note
|
|
|
+ * This function will disable three events: PCNT_EVT_L_LIM, PCNT_EVT_H_LIM, PCNT_EVT_ZERO.
|
|
|
*
|
|
|
* @param pcnt_config Pointer of Pulse Counter unit configure parameter
|
|
|
*
|
|
|
@@ -233,16 +235,19 @@ esp_err_t pcnt_get_event_value(pcnt_unit_t unit, pcnt_evt_type_t evt_type, int16
|
|
|
/**
|
|
|
* @brief Register PCNT interrupt handler, the handler is an ISR.
|
|
|
* The handler will be attached to the same CPU core that this function is running on.
|
|
|
+ * Please do not use pcnt_isr_service_install if this function was called.
|
|
|
*
|
|
|
* @param fn Interrupt handler function.
|
|
|
* @param arg Parameter for handler function
|
|
|
* @param intr_alloc_flags Flags used to allocate the interrupt. One or multiple (ORred)
|
|
|
* ESP_INTR_FLAG_* values. See esp_intr_alloc.h for more info.
|
|
|
* @param handle Pointer to return handle. If non-NULL, a handle for the interrupt will
|
|
|
- * be returned here.
|
|
|
+ * be returned here. Calling esp_intr_free to unregister this ISR service if needed,
|
|
|
+ * but only if the handle is not NULL.
|
|
|
*
|
|
|
* @return
|
|
|
* - ESP_OK Success
|
|
|
+ * - ESP_ERR_NOT_FOUND Can not find the interrupt that matches the flags.
|
|
|
* - ESP_ERR_INVALID_ARG Function pointer error.
|
|
|
*/
|
|
|
esp_err_t pcnt_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, pcnt_isr_handle_t *handle);
|
|
|
@@ -358,7 +363,8 @@ esp_err_t pcnt_isr_handler_add(pcnt_unit_t unit, void(*isr_handler)(void *), voi
|
|
|
/**
|
|
|
* @brief Install PCNT ISR service.
|
|
|
* @note We can manage different interrupt service for each unit.
|
|
|
- * Please do not use pcnt_isr_register if this function was called.
|
|
|
+ * This function will use the default ISR handle service, Calling pcnt_isr_service_uninstall to
|
|
|
+ * uninstall the default service if needed. Please do not use pcnt_isr_register if this function was called.
|
|
|
*
|
|
|
* @param intr_alloc_flags Flags used to allocate the interrupt. One or multiple (ORred)
|
|
|
* ESP_INTR_FLAG_* values. See esp_intr_alloc.h for more info.
|