Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Commit 75f711f

Browse files
committed
feat(example): ota example use HAL_Reboot in wrapper
1 parent b16466d commit 75f711f

File tree

1 file changed

+3
-1
lines changed
  • examples/ota/ota_example_mqtt/components/ota_handle

1 file changed

+3
-1
lines changed

examples/ota/ota_example_mqtt/components/ota_handle/ota_solo.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "ota_api.h"
1515
#include "dm_wrapper.h"
1616

17+
void HAL_Reboot();
18+
1719
char g_product_key[IOTX_PRODUCT_KEY_LEN + 1] = {0};
1820
char g_device_name[IOTX_DEVICE_NAME_LEN + 1] = {0};
1921
char g_device_secret[IOTX_DEVICE_SECRET_LEN + 1] = {0};
@@ -230,7 +232,7 @@ static int _ota_mqtt_client(void)
230232
} while (!ota_over);
231233

232234
if (HAL_Firmware_Persistence_Stop() == SUCCESS_RETURN) {
233-
esp_restart();
235+
HAL_Reboot();
234236
}
235237

236238
HAL_SleepMs(200);

0 commit comments

Comments
 (0)