Function esp_idf_svc::sys::gpio_new_etm_task
source · pub unsafe extern "C" fn gpio_new_etm_task(
config: *const gpio_etm_task_config_t,
ret_task: *mut *mut esp_etm_task_t,
...
) -> i32
Expand description
@brief Create an ETM task object for the GPIO peripheral
@note The created ETM task object can be deleted later by calling esp_etm_del_task
@note The GPIO ETM task works like a container, a newly created ETM task object doesn’t have GPIO members to be managed.
You need to call gpio_etm_task_add_gpio
to put one or more GPIOs to the container.
@note Every success call to this function will acquire a free GPIO ETM task channel
@param[in] config GPIO ETM task configuration
@param[out] ret_task Returned ETM task handle
@param[out] … Other returned ETM task handles if any (the order of the returned task handles is aligned with the array order in field actions
in gpio_etm_task_config_t
)
@return
- ESP_OK: Create ETM task successfully
- ESP_ERR_INVALID_ARG: Create ETM task failed because of invalid argument
- ESP_ERR_NO_MEM: Create ETM task failed because of out of memory
- ESP_ERR_NOT_FOUND: Create ETM task failed because all tasks are used up and no more free one
- ESP_FAIL: Create ETM task failed because of other reasons