Function esp_idf_svc::hal::sys::gptimer_get_raw_count
source ยท pub unsafe extern "C" fn gptimer_get_raw_count(
timer: *mut gptimer_t,
value: *mut u64,
) -> i32
Expand description
@brief Get GPTimer raw count value
@note This function will trigger a software capture event and then return the captured count value.
@note With the raw count value and the resolution returned from gptimer_get_resolution
, you can convert the count value into seconds.
@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
@param[out] value Returned GPTimer count value
@return
- ESP_OK: Get GPTimer raw count value successfully
- ESP_ERR_INVALID_ARG: Get GPTimer raw count value failed because of invalid argument
- ESP_FAIL: Get GPTimer raw count value failed because of other error