@@ -27,17 +27,51 @@ typedef struct esp_rmaker_time_config {
27
27
28
28
/** Reboot the chip after a delay
29
29
*
30
- * This API just starts an esp_timer and executes a reboot from that.
31
- * Useful if you want to reboot after a delay, to allow other tasks to finish
32
- * their operations (Eg. MQTT publish to indicate OTA success)
30
+ * This API just starts a reboot timer and returns immediately.
31
+ * The actual reboot is trigerred asynchronously in the timer callback.
32
+ * This is useful if you want to reboot after a delay, to allow other tasks to finish
33
+ * their operations (Eg. MQTT publish to indicate OTA success). The \ref RMAKER_EVENT_REBOOT
34
+ * event is triggered when the reboot timer is started.
33
35
*
34
- * @param[in] seconds Time in seconds after which the chip should reboot
36
+ * @param[in] seconds Time in seconds after which the chip should reboot.
35
37
*
36
- * @return ESP_OK on success
37
- * @return error on failure
38
+ * @return ESP_OK on success.
39
+ * @return error on failure.
38
40
*/
39
41
esp_err_t esp_rmaker_reboot (uint8_t seconds );
40
42
43
+ /** Reset Wi-Fi credentials and reboot
44
+ *
45
+ * This will reset just the Wi-Fi credentials and trigger a reboot.
46
+ * This is useful when you want to keep all the entries in NVS memory
47
+ * intact, but just change the Wi-Fi credentials. The \ref RMAKER_EVENT_WIFI_RESET
48
+ * event is triggered after the reset.
49
+ *
50
+ * @note This function internally calls esp_rmaker_reboot() and returns
51
+ * immediately. The reboot happens asynchronously.
52
+ *
53
+ * @param[in] seconds Time in seconds after which the chip should reboot.
54
+ *
55
+ * @return ESP_OK on success.
56
+ * @return error on failure.
57
+ */
58
+ esp_err_t esp_rmaker_wifi_reset (uint8_t seconds );
59
+
60
+ /** Reset to factory defaults and reboot
61
+ *
62
+ * This will clear entire NVS partition and trigger a reboot.
63
+ * The \ref RMAKER_EVENT_FACTORY_RESET event is triggered after the reset.
64
+ *
65
+ * @note This function internally calls esp_rmaker_reboot() and returns.
66
+ * The reboot happens asynchronously.
67
+ *
68
+ * @param[in] seconds Time in seconds after which the chip should reboot.
69
+ *
70
+ * @return ESP_OK on success.
71
+ * @return error on failure.
72
+ */
73
+ esp_err_t esp_rmaker_factory_reset (uint8_t seconds );
74
+
41
75
/** Initialize time synchronization
42
76
*
43
77
* This API initializes SNTP for time synchronization.
0 commit comments