esp_idf_hal::sys

Function esp_timer_restart

Source
pub unsafe extern "C" fn esp_timer_restart(
    timer: *mut esp_timer,
    timeout_us: u64,
) -> i32
Expand description

@brief Restart a currently running timer

Type of timerAction
One-shot timerRestarted immediately and times out once in timeout_us microseconds
Periodic timerRestarted immediately with a new period of timeout_us microseconds

@param timer timer handle created using esp_timer_create() @param timeout_us Timeout in microseconds relative to the current time. In case of a periodic timer, also represents the new period. @return - ESP_OK on success - ESP_ERR_INVALID_ARG if the handle is invalid - ESP_ERR_INVALID_STATE if the timer is not running