Function esp_idf_sys::gptimer_get_resolution

source ยท
pub unsafe extern "C" fn gptimer_get_resolution(
    timer: gptimer_handle_t,
    out_resolution: *mut u32,
) -> esp_err_t
Expand description

@brief Return the real resolution of the timer

@note usually the timer resolution is same as what you configured in the gptimer_config_t::resolution_hz, but some unstable clock source (e.g. RC_FAST) will do a calibration, the real resolution can be different from the configured one.

@param[in] timer Timer handle created by gptimer_new_timer @param[out] out_resolution Returned timer resolution, in Hz @return - ESP_OK: Get GPTimer resolution successfully - ESP_ERR_INVALID_ARG: Get GPTimer resolution failed because of invalid argument - ESP_FAIL: Get GPTimer resolution failed because of other error