Function esp_idf_svc::hal::sys::gptimer_stop
source · pub unsafe extern "C" fn gptimer_stop(timer: *mut gptimer_t) -> i32
Expand description
@brief Stop GPTimer (internal counter stops counting)
@note This function will transit the timer state from “run” to “enable”.
@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: Stop GPTimer successfully
- ESP_ERR_INVALID_ARG: Stop GPTimer failed because of invalid argument
- ESP_ERR_INVALID_STATE: Stop GPTimer failed because the timer is not in running.
- ESP_FAIL: Stop GPTimer failed because of other error