ESP-IDF equivalent of Arduino ESP.restart()

The Arduino function ESP.restart() is used to restart the ESP32. In ESP-IDF, you can achieve the same functionality using the esp_restart() function.

esp_restart_example.cpp
#include <esp_system.h>

void myFunc() {
  // ...
  esp_restart();
}

Check out similar posts by category: ESP32, C/C++