Function esp_idf_hal::sys::gptimer_set_raw_count
source ยท pub unsafe extern "C" fn gptimer_set_raw_count(
timer: *mut gptimer_t,
value: u64,
) -> i32
Expand description
@brief Set GPTimer raw count value
@note When updating the raw count of an active timer, the timer will immediately start counting from the new value.
@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[in] value Count value to be set
@return
- ESP_OK: Set GPTimer raw count value successfully
- ESP_ERR_INVALID_ARG: Set GPTimer raw count value failed because of invalid argument
- ESP_FAIL: Set GPTimer raw count value failed because of other error