esp_timer_restart() function
Restart a currently running timer Type of `timer` | Action --------------- | ------ One-shot timer | Restarted immediately and times out once in `timeout_us` microseconds Periodic timer | Restarted immediately with a new period of `timeout_us` microseconds
Arguments
timer
timer handle created using esp_timer_create()
timeout_us
Timeout in microseconds relative to the current time. In case of a periodic timer, also represents the new period.
Return value
- ESP_OK on success - ESP_ERR_INVALID_ARG if the handle is invalid - ESP_ERR_INVALID_STATE if the timer is not running