[Bugfix][T106BUG-267] Poweralarm demo using lynq_set_poweralarm sets the shutdown alarm clock, which setting the time twice
Only Configure:No
Affected branch:master
Affected module:Rtc
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update:Yes
Change-Id: I318e6c5773a73f86bd7577026eb0105d0619ef35
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp
index 199106b..a83d3d7 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp
@@ -132,7 +132,7 @@
ret = wakealarm(tmp_time);
if(ret != 0)
{
- printf("set poweralarm failed\n");
+ printf("set wakealarm failed\n");
return -1;
}
break;
@@ -155,18 +155,19 @@
printf("Input time_sec you want poweralarm,e.g:60 (seconds)\n");
scanf("%lu",&time_sec);
ret =lynq_set_poweralarm(time_sec);
+ printf("ret is %d\n",ret);
if(ret != 0)
{
printf("lynq_set_poweralarm failed\n");
return -1;
}
-
+ break;
}
case 5:
{
int ret = 0;
unsigned long time_sec = 0;
- printf("Input time_sec you want poweralarm,e.g:60 (seconds)\n");
+ printf("Input time_sec you want wakealarm,e.g:60 (seconds)\n");
scanf("%lu",&time_sec);
ret =lynq_set_wakealarm(time_sec);
if(ret != 0)
@@ -174,6 +175,7 @@
printf("lynq_set_wakealarm failed\n");
return -1;
}
+ break;
}
default: