[Bugfix][T106BUG-421] Optimize poweralarm demo, reinitialize after de initialization

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: Id788d0f45c1362533cd3d46157aa6685f2b03e26
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 2e0f71f..0bca3bb 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
@@ -8,7 +8,7 @@
 

 

 #define INIT_SUCCESS    0

-

+#define RTC_DEINIT    -1

 typedef struct

 {

     int  cmdIdx;

@@ -285,6 +285,10 @@
                             printf("lynq rtc service deinit failed \n");

                             return -1;

                         }

+                        else

+                        {

+                            init_flag = RTC_DEINIT;

+                        }

                     }

                     break;

                 }