driver: add doc on how to unregister event callbacks

Closes https://github.com/espressif/esp-idf/pull/9523
This commit is contained in:
morris
2022-08-08 15:47:30 +08:00
parent 0d881fc9e0
commit 970d4cab09
10 changed files with 18 additions and 5 deletions

View File

@@ -138,7 +138,8 @@ esp_err_t gptimer_get_raw_count(gptimer_handle_t timer, uint64_t *value);
* @brief Set callbacks for GPTimer
*
* @note User registered callbacks are expected to be runnable within ISR context
* @note This function should be called when the timer is in the init state (i.e. before calling `gptimer_enable()`)
* @note The first call to this function needs to be before the call to `gptimer_enable`
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
*
* @param[in] timer Timer handle created by `gptimer_new_timer()`
* @param[in] cbs Group of callback functions

View File

@@ -168,6 +168,8 @@ typedef struct {
/**
* @brief Set event callbacks for MCPWM capture channel
*
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
*
* @param[in] cap_channel MCPWM capture channel handle, allocated by `mcpwm_new_capture_channel()`
* @param[in] cbs Group of callback functions
* @param[in] user_data User data, which will be passed to callback functions directly

View File

@@ -63,6 +63,8 @@ typedef struct {
/**
* @brief Set event callbacks for MCPWM comparator
*
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
*
* @param[in] cmpr MCPWM comparator handle, allocated by `mcpwm_new_comparator()`
* @param[in] cbs Group of callback functions
* @param[in] user_data User data, which will be passed to callback functions directly

View File

@@ -97,6 +97,8 @@ typedef struct {
/**
* @brief Set event callbacks for MCPWM fault
*
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
*
* @param[in] fault MCPWM GPIO fault handle, allocated by `mcpwm_new_gpio_fault()`
* @param[in] cbs Group of callback functions
* @param[in] user_data User data, which will be passed to callback functions directly

View File

@@ -119,6 +119,8 @@ typedef struct {
/**
* @brief Set event callbacks for MCPWM operator
*
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
*
* @param[in] oper MCPWM operator handle, allocated by `mcpwm_new_operator()`
* @param[in] cbs Group of callback functions
* @param[in] user_data User data, which will be passed to callback functions directly

View File

@@ -107,6 +107,9 @@ esp_err_t mcpwm_timer_start_stop(mcpwm_timer_handle_t timer, mcpwm_timer_start_s
/**
* @brief Set event callbacks for MCPWM timer
*
* @note The first call to this function needs to be before the call to `mcpwm_timer_enable`
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
*
* @param[in] timer MCPWM timer handle, allocated by `mcpwm_new_timer()`
* @param[in] cbs Group of callback functions
* @param[in] user_data User data, which will be passed to callback functions directly

View File

@@ -233,7 +233,8 @@ esp_err_t pcnt_unit_get_count(pcnt_unit_handle_t unit, int *value);
* @brief Set event callbacks for PCNT unit
*
* @note User registered callbacks are expected to be runnable within ISR context
* @note This function is only allowed to be called when the unit is in the init state (i.e. before calling `pcnt_unit_enable()`)
* @note The first call to this function needs to be before the call to `pcnt_unit_enable`
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
*
* @param[in] unit PCNT unit handle created by `pcnt_new_unit()`
* @param[in] cbs Group of callback functions