Function esp_idf_svc::hal::sys::gptimer_get_resolution

source ยท
pub unsafe extern "C" fn gptimer_get_resolution(
    timer: *mut gptimer_t,
    out_resolution: *mut u32,
) -> i32
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