Function esp_idf_hal::sys::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
If the given timer is a one-shot timer, the timer is restarted immediately and will timeout once in timeout_us
microseconds.
If the given timer is a periodic timer, the timer is restarted 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