Function esp_idf_sys::gptimer_start
source · pub unsafe extern "C" fn gptimer_start(
timer: gptimer_handle_t,
) -> esp_err_t
Expand description
@brief Start GPTimer (internal counter starts counting)
@note This function will transit the timer state from “enable” to “run”.
@note This function is allowed to run within ISR context
@note If CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM
is enabled, this function will be placed in the IRAM by linker,
makes it possible to execute even when the Flash Cache is disabled.
@param[in] timer Timer handle created by gptimer_new_timer
@return
- ESP_OK: Start GPTimer successfully
- ESP_ERR_INVALID_ARG: Start GPTimer failed because of invalid argument
- ESP_ERR_INVALID_STATE: Start GPTimer failed because the timer is not enabled or is already in running
- ESP_FAIL: Start GPTimer failed because of other error