BugID:18744724:include low power head file for calling the low power api
#include "aos/kernel.h"
#include "aos/hal/wdg.h"
+#ifdef AOS_COMP_PWRMGMT
+#include "pwrmgmt.h"
+#endif
+
#if defined OTA_CONFIG_SECURE_DL_MODE
static wdg_dev_t ota_wdg = {0};
static aos_timer_t ota_mon_tmr = {0};
@@ -79,7 +83,7 @@ int ota_service_start(ota_service_t *ctx)
{
int ret = 0;
#ifdef AOS_COMP_PWRMGMT
- pwrmgmt_lowpower_suspend();
+ pwrmgmt_lowpower_suspend(PWRMGMT_OTA);
#endif
ota_ctx = ctx;
#if defined OTA_CONFIG_SECURE_DL_MODE
@@ -148,7 +152,7 @@ EXIT:
param->upg_status = OTA_FINISH;
}
#ifdef AOS_COMP_PWRMGMT
- pwrmgmt_lowpower_resume();
+ pwrmgmt_lowpower_resume(PWRMGMT_OTA);
#endif
if((ctx != NULL)&&(ctx->on_boot != NULL)) {
ctx->on_boot(param);
