wifi_provisioning: Add an API for resetting provisioning config

This commit is contained in:
yuanjm
2021-02-18 14:57:15 +08:00
parent 6936dbf4a1
commit 49f3fba14d
2 changed files with 22 additions and 0 deletions

View File

@@ -1553,3 +1553,15 @@ void wifi_prov_mgr_stop_provisioning(void)
RELEASE_LOCK(prov_ctx_lock);
}
esp_err_t wifi_prov_mgr_reset_provisioning(void)
{
esp_err_t ret = esp_wifi_restore();
if (ret != ESP_OK) {
ESP_LOGE(TAG, "esp_wifi_restore fail, ret is %d", ret);
ret = ESP_FAIL;
}
return ret;
}