esp_idf_sys

Function esp_timer_restart

Source
pub unsafe extern "C" fn esp_timer_restart(
    timer: esp_timer_handle_t,
    timeout_us: u64,
) -> esp_err_t
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