RDK Documentation (Open Sourced RDK Components)
deepSleepMgr.c
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 
21 
22 /**
23 * @defgroup iarmmgrs
24 * @{
25 * @defgroup deepsleepmgr
26 * @{
27 **/
28 
29 
30 #include <stdio.h>
31 #include <fcntl.h>
32 #include <errno.h>
33 #include <stdint.h>
34 #include <unistd.h>
35 #include <string.h>
36 #include <stdlib.h>
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 #ifdef __cplusplus
43 }
44 #endif
45 #include <sys/stat.h>
46 #include <pthread.h>
47 #include "iarmUtil.h"
48 #include "pwrMgr.h"
49 #include "libIBus.h"
50 #include "deepSleepMgr.h"
51 #include "deepSleepInternal.h"
52 #include "libIBusDaemon.h"
53 #include "deepsleeplogger.h"
54 #include "irMgr.h"
55 #include "comcastIrKeyCodes.h"
56 #include "frontPanelConfig.hpp"
57 #include "manager.hpp"
58 
59 /* For glib APIs*/
60 #include <glib.h>
61 
62 /* Deep Sleep static Functions */
63 static void _eventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len);
64 static IARM_Result_t _DeepSleepWakeup(void *arg);
65 static IARM_Result_t _SetDeepSleepTimer(void *arg);
66 static IARM_Result_t _GetDeepSleepStatus(void *arg);
67 static IARM_Result_t _GetLastWakeupReason(void *arg);
68 static IARM_Result_t _GetLastWakeupKeyCode(void *arg);
69 
70 static gboolean heartbeatMsg(gpointer data);
71 static gboolean deep_sleep_delay_timer_fn(gpointer data);
72 
73 /* Variables for Deep Sleep */
74 static uint32_t deep_sleep_delay_timeout = 0;
75 static uint32_t deep_sleep_wakeup_timer = 0;
76 static bool nwStandbyMode_gs = false;
77 GMainLoop *deepSleepMgr_Loop = NULL;
78 static guint dsleep_delay_event_src = 0;
79 static DeepSleepStatus_t IsDeviceInDeepSleep = DeepSleepStatus_NotStarted;
80 static gboolean isLxcRestart = 0;
81 
82 IARM_Result_t DeepSleepMgr_Start(int argc, char *argv[])
83 {
84  char *settingsFile = NULL;
85  if (argc == 2) settingsFile = argv[1];
86 
87  setvbuf(stdout, NULL, _IOLBF, 0);
88  LOG("Entering [%s] - [%s] - disabling io redirect buf\r\n", __FUNCTION__,IARM_BUS_DEEPSLEEPMGR_NAME);
89 
90  /* Initialize SoC */
91  PLAT_DS_INIT();
92 
93  /* Initialize with IARM Bus*/
96 
97  /* Register for IARM events */
101  IARM_Bus_RegisterCall(IARM_BUS_COMMON_API_DeepSleepWakeup,_DeepSleepWakeup);
102  IARM_Bus_RegisterCall(IARM_BUS_DEEPSLEEPMGR_API_SetDeepSleepTimer, _SetDeepSleepTimer);
103 #ifdef ENABLE_DEEPSLEEP_FPLED_HANDLING
104  try {
106  }
107  catch (...){
108  LOG("Exception Caught during [device::Manager::Initialize]\r\n");
109  }
110 #endif
111  IARM_Bus_RegisterCall("GetDeepSleepStatus", _GetDeepSleepStatus);
112 
113  IARM_Bus_RegisterCall(IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupReason, _GetLastWakeupReason);
114  IARM_Bus_RegisterCall(IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupKeyCode, _GetLastWakeupKeyCode);
115  /* Main loop for Deep Sleep Manager */
116  deepSleepMgr_Loop = g_main_loop_new ( NULL , FALSE );
117  if(deepSleepMgr_Loop != NULL){
118  g_timeout_add_seconds (300 , heartbeatMsg , deepSleepMgr_Loop);
119  }
120  else {
121  LOG("Fails to Create a main Loop for [%s] \r\n",IARM_BUS_DEEPSLEEPMGR_NAME);
122  }
123 
124 
125  return IARM_RESULT_SUCCESS;
126 }
127 
128 IARM_Result_t DeepSleepMgr_Loop()
129 {
131 
132  /* Read the Device Power State on startup... */
134  LOG("Deep Sleep Manager Init with Power State %d\r\n",param.curState);
135 
136  /* Deep Sleep Mgr loop */
137  if(deepSleepMgr_Loop)
138  {
139  g_main_loop_run (deepSleepMgr_Loop);
140  g_main_loop_unref(deepSleepMgr_Loop);
141  }
142 
143  return IARM_RESULT_SUCCESS;
144 }
145 
146 IARM_Result_t DeepSleepMgr_Stop(void)
147 {
148  if(deepSleepMgr_Loop)
149  {
150  g_main_loop_quit(deepSleepMgr_Loop);
151  }
152 
156  IARM_Bus_Term();
157  PLAT_DS_TERM();
158 
159  return IARM_RESULT_SUCCESS;
160 }
161 
162 
163 static gboolean heartbeatMsg(gpointer data)
164 {
165  time_t curr = 0;
166  time(&curr);
167  LOG("I-ARM Deep Sleep Mgr: HeartBeat at %s\r\n", ctime(&curr));
168  return TRUE;
169 }
170 
171 
172 static void _eventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
173 {
174 
175  //LOG("Event handler invoked :: \n");
176  if (strcmp(owner,IARM_BUS_PWRMGR_NAME) == 0)
177  {
178  switch (eventId)
179  {
181  {
182 #if !defined (_DISABLE_SCHD_REBOOT_AT_DEEPSLEEP)
183  /*Scheduled maintanace reboot is disabled for XiOne/Llama/Platco*/
184  system("echo 0 > /opt/.rebootFlag");
185  system(" echo `/bin/timestamp` ------------- Reboot timer expired while in Deep Sleep --------------- >> /opt/logs/receiver.log");
186  system("sleep 5; /rebootNow.sh -s DeepSleepMgr -o 'Rebooting the box due to reboot timer expired while in Deep Sleep...'");
187 #endif /*End of _DISABLE_SCHD_REBOOT_AT_DEEPSLEEP*/
188  }
189  break;
191  {
193  LOG("Event IARM_BUS_PWRMGR_EVENT_MODECHANGED: State Changed %d -- > %d\r\n",
194  param->data.state.curState, param->data.state.newState);
195 
196  if(IARM_BUS_PWRMGR_POWERSTATE_STANDBY_DEEP_SLEEP == param->data.state.newState)
197  {
198  LOG("GOT EVENT TO GO TO DEEP SLEEP \r\n");
199  /*Here we are changing the DeesSleep State assuming that the api would succeed.
200  This is because, once the deep sleep api is called, the CPU would be idle.*/
201  /*Call Deep Sleep API*/
202  deep_sleep_wakeup_timer = param->data.state.deep_sleep_timeout;
203  FILE *fpST = NULL;
204  uint32_t SleepTimeInSec = 0;
205  struct stat buf;
206  IsDeviceInDeepSleep = DeepSleepStatus_InProgress;
207  /* Read the Delay Sleep Time */
208  fpST = fopen("/tmp/deepSleepTimer","r");
209  if (NULL != fpST)
210  {
211  if(0 > fscanf(fpST,"%d",&SleepTimeInSec))
212  {
213  __TIMESTAMP();LOG("Error: fscanf on SleepTimeInSec failed");
214  }
215  else
216  {
217  deep_sleep_delay_timeout = SleepTimeInSec ;
218  __TIMESTAMP();LOG(" /tmp/ override Deep Sleep Time is %d \r\n",deep_sleep_delay_timeout);
219  }
220  fclose (fpST);
221  }
222 
223  LOG("Deep Sleep wakeup time value is %d Secs.. \r\n",deep_sleep_wakeup_timer);
224  if (deep_sleep_delay_timeout) {
225  /* start a Deep sleep timer thread */
226  LOG("Schedule Deep SLeep After %d Sec.. \r\n",deep_sleep_delay_timeout);
227  dsleep_delay_event_src = g_timeout_add_seconds ((guint) deep_sleep_delay_timeout,deep_sleep_delay_timer_fn,deepSleepMgr_Loop);
228  }
229  else{
230  LOG("Enter to Deep sleep Mode..stop Receiver with sleep 10 before DS \r\n");
231  system("sleep 5");
232  if ((stat("/lib/systemd/system/lxc.service", &buf) == 0) && (stat("/opt/lxc_service_disabled",&buf) !=0))
233  {
234  LOG("stopping lxc service\r\n");
235  system("systemctl stop lxc.service");
236  isLxcRestart = 1;
237  }
238  else
239  {
240 #ifndef ENABLE_LLAMA_PLATCO_SKY_XIONE
241  LOG("stopping xre-receiver service\r\n");
242  system("systemctl stop xre-receiver.service");
243  LOG("stopping wpeframework service\r\n");
244  system("systemctl stop wpeframework.service");
245 #else
246  LOG("Skipping Stopping service while entering DEEPSLEEP.\n");
247 #endif
248 #ifdef ENABLE_LLAMA_PLATCO_SKY_XIONE
249  LOG("Update the Deepsleep marker to splunk.\n");
250  system("sh /lib/rdk/alertSystem.sh deepSleepMgrMain SYST_INFO_devicetoDS");
251 #endif
252 
253 #ifndef ENABLE_LLAMA_PLATCO
254  LOG("Unmounting SDcard partition\r\n");
255  system("sh /lib/rdk/disk_checkV2 deepsleep ON");
256 #else
257  LOG("Skipping Unmounting SDcard partition.\r\n");
258 #endif
259  }
260 #ifdef ENABLE_DEEPSLEEP_FPLED_HANDLING
261  __TIMESTAMP();LOG("FrontPanelConfig::fPTerm\n");
263 #endif
264 #ifndef ENABLE_LLAMA_PLATCO_SKY_XIONE
265  LOG("Enter to Deep sleep Mode..stop fog service before DS \r\n");
266  system("systemctl stop fog.service");
267 #endif
268  int status = -1;
269  int retryCount = 0;
270  bool userWakeup = 0;
271  while(retryCount< 5)
272  {
273  LOG("Device entering Deep sleep Mode.. \r\n");
274  userWakeup = 0;
275 #ifdef ENABLE_LLAMA_PLATCO_SKY_XIONE
276  nwStandbyMode_gs = param->data.state.nwStandbyMode;
277  LOG("\nCalling PLAT_DS_SetDeepSleep with nwStandbyMode: %s\n",
278  nwStandbyMode_gs?("Enabled"):("Disabled"));
279 #endif
280  LOG("Device entered to Deep sleep Mode.. \r\n");
281  status = PLAT_DS_SetDeepSleep(deep_sleep_wakeup_timer,&userWakeup, nwStandbyMode_gs);
282 
283  LOG("Device resumed from Deep sleep Mode. \r\n");
284 
285  if(status != 0)
286  {
287  sleep(5);
288  retryCount++;
289  if(retryCount >= 5)
290  {
291  LOG("ERROR: Device failed to enter into Deep sleep Mode.. \r\n");
292  IsDeviceInDeepSleep = DeepSleepStatus_Failed;
293  return;
294  }
295  }
296  else
297  {
298  IsDeviceInDeepSleep = DeepSleepStatus_Completed;
299  break;
300  }
301  }
302  if (userWakeup)
303  {
304  /* Always send KED_DEEPSLEEP_WAKEUP when user action wakes the device from deep sleep. Previously this was sent
305  if we woke from a GPIO event, however there are cases where IR events aren't always passed when exiting
306  deep sleep resulting in the device not fully resuming. To resolve this we will ensure the WAKE event
307  is always sent here */
308  LOG("Resumed due to user action. Sending KED_DEEPSLEEP_WAKEUP. \r\n");
309  IARM_Bus_IRMgr_EventData_t eventData;
310  eventData.data.irkey.keyType = KET_KEYDOWN;
311  eventData.data.irkey.keyCode = KED_DEEPSLEEP_WAKEUP;
312  eventData.data.irkey.isFP = 0;
313  eventData.data.irkey.keySrc = IARM_BUS_IRMGR_KEYSRC_IR;
314 
315  IARM_Bus_BroadcastEvent(IARM_BUS_IRMGR_NAME, (IARM_EventId_t) IARM_BUS_IRMGR_EVENT_IRKEY, (void *)&eventData, sizeof(eventData));
316  eventData.data.irkey.keyType = KET_KEYUP;
317  IARM_Bus_BroadcastEvent(IARM_BUS_IRMGR_NAME, (IARM_EventId_t) IARM_BUS_IRMGR_EVENT_IRKEY, (void *)&eventData, sizeof(eventData));
318  }
319  else {
320  LOG("Resumed without user action. Not sending KED_DEEPSLEEP_WAKEUP. \r\n");
321  }
322 
323 #ifdef USE_WAKEUP_TIMER_EVT
324  DeepSleep_WakeupReason_t wakeupReason = DEEPSLEEP_WAKEUPREASON_UNKNOWN;
325  int reasonStatus = PLAT_DS_GetLastWakeupReason(&wakeupReason);
326  if (DEEPSLEEP_WAKEUPREASON_TIMER == wakeupReason){
327  LOG("Calling IARM_BUS_PWRMGR_API_handleDeepsleepTimeoutWakeup on wakeupReason:%d \n", wakeupReason);
329  }
330 #endif //End of USE_WAKEUP_TIMER_EVT
331  }
332  }
333  }
334  break;
335  default:
336  break;
337  }
338  }
339 }
340 
341 
342 
343 static IARM_Result_t _DeepSleepWakeup(void *arg)
344 {
345  IARM_Bus_CommonAPI_PowerPreChange_Param_t *param = (IARM_Bus_CommonAPI_PowerPreChange_Param_t *) arg;
346 
347 #ifndef ENABLE_LLAMA_PLATCO_SKY_XIONE
348  char* syscommand = "systemctl restart mocadriver.service &";
349 #endif
350 
351  LOG("RPC IARM_BUS_COMMON_API_DeepSleepWakeup : State Changed %d -- > %d\r" , param->curState , param->newState);
352 
353  /* Support Deep sleep to Power ON, Light Sleep and Standby Transition. */
354  if( (IARM_BUS_PWRMGR_POWERSTATE_STANDBY_DEEP_SLEEP == param->curState) &&
355  (IARM_BUS_PWRMGR_POWERSTATE_STANDBY_DEEP_SLEEP != param->newState))
356  {
357  LOG("GOT EVENT TO EXIT FROM DEEP SLEEP \r\n");
358 #ifdef ENABLE_DEEPSLEEP_FPLED_HANDLING
359  __TIMESTAMP();LOG("FrontPanelConfig::fPInit\n");
361 #endif
362  /*Call Wake up API */
363  PLAT_DS_DeepSleepWakeup();
364 
365  /* Remove the Event source */
366  if(dsleep_delay_event_src)
367  {
368  g_source_remove(dsleep_delay_event_src);
369  dsleep_delay_event_src = 0;
370  }
371 
372  if(IsDeviceInDeepSleep)
373  {
374  /*Restart Moca service when exit from Deep Sleep*/
375 #ifndef ENABLE_LLAMA_PLATCO_SKY_XIONE
376  LOG("Restarting Moca Service After Waking up from Deep Sleep.. \r\n");
377  system(syscommand);
378 #endif
379 #ifndef ENABLE_LLAMA_PLATCO
380  LOG("Mounting SDcard partition After Waking up from Deep Sleep..\r\n");
381  system("sh /lib/rdk/disk_checkV2 deepsleep OFF");
382 #endif
383 #ifndef ENABLE_LLAMA_PLATCO_SKY_XIONE
384  LOG("Restarting fog Service After Waking up from Deep Sleep.. \r\n");
385  system("systemctl restart fog.service &");
386 #endif
387  if (isLxcRestart)
388  {
389  LOG("Restarting Lxc Service After Waking up from Deep Sleep\r\n");
390  system("systemctl restart lxc.service");
391  isLxcRestart = 0;
392  }
393  else
394  {
395 #ifndef ENABLE_LLAMA_PLATCO_SKY_XIONE
396  LOG("Restarting WPEFramework Service After Waking up from Deep Sleep\r\n");
397  system("systemctl restart wpeframework.service");
398  LOG("Restarting Receiver Service After Waking up from Deep Sleep\r\n");
399  system("systemctl restart xre-receiver.service");
400 #else
401  LOG("Skipping restart of Services in Sky Platform\n");
402 #endif
403 
404  }
405  }
406  IsDeviceInDeepSleep = DeepSleepStatus_NotStarted;
407 
408  LOG("Device woke up from Deep sleep Mode.. \r\n");
409  }
410  return IARM_RESULT_SUCCESS;
411 }
412 
413 static IARM_Result_t _GetDeepSleepStatus(void *arg)
414 {
415  int *status = (int *)arg;
416  *status = IsDeviceInDeepSleep;
417  return IARM_RESULT_SUCCESS;
418 }
419 
420 
421 static IARM_Result_t _SetDeepSleepTimer(void *arg)
422 {
423  IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t *param = (IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t *)arg;
424 
425  if(param != NULL)
426  {
427  LOG("Deep sleep timer set to : %d Seconds \r\n", param->timeout);
428  deep_sleep_delay_timeout = param->timeout;
429  return IARM_RESULT_SUCCESS;
430  }
431  return IARM_RESULT_IPCCORE_FAIL;
432 }
433 
434 
435 static gboolean deep_sleep_delay_timer_fn(gpointer data)
436 {
437  struct stat buf;
438  int status = -1;
439 
440  LOG("Deep Sleep Timer Expires :Enter to Deep sleep Mode..stop Receiver with sleep 10 before DS \r\n");
441  system("sleep 10");
442 
443  if ((stat("/lib/systemd/system/lxc.service", &buf) == 0) && (stat("/opt/lxc_service_disabled",&buf) !=0))
444  {
445  system("systemctl stop lxc.service");
446  isLxcRestart = 1;
447  }
448  else {
449 #ifndef ENABLE_LLAMA_PLATCO_SKY_XIONE
450  system("systemctl stop xre-receiver.service");
451  system("systemctl stop wpeframework.service");
452 #else
453  LOG("Skiping Stopping of services in Sky Llama Platform\n");
454 #endif
455  }
456  bool userWakeup = 0;
457  status = PLAT_DS_SetDeepSleep(deep_sleep_wakeup_timer,&userWakeup, nwStandbyMode_gs);
458  if(status != 0)
459  {
460  LOG("deep_sleep_delay_timer_fn: Failed to enter deepsleep state \n");
461  }
462 #ifdef USE_WAKEUP_TIMER_EVT
463  //Call pwrmgr InvokeDeepsleepTimeout here
464  DeepSleep_WakeupReason_t wakeupReason = DEEPSLEEP_WAKEUPREASON_UNKNOWN;
465  int reasonStatus = PLAT_DS_GetLastWakeupReason(&wakeupReason);
466  if (DEEPSLEEP_WAKEUPREASON_TIMER == wakeupReason){
467  LOG("Calling IARM_BUS_PWRMGR_API_handleDeepsleepTimeoutWakeup on wakeupReason:%d \n", wakeupReason);
469  }
470 #endif //End of USE_WAKEUP_TIMER_EVT
471  return FALSE; // Send False so the handler should not be called again
472 }
473 
474 static IARM_Result_t _GetLastWakeupReason(void *arg)
475 {
476  DeepSleep_WakeupReason_t *wakeupReason = (DeepSleep_WakeupReason_t *)arg;
477  int status = PLAT_DS_GetLastWakeupReason(wakeupReason);
478  return IARM_RESULT_SUCCESS;
479 }
480 
481 static IARM_Result_t _GetLastWakeupKeyCode(void *arg)
482 {
483  IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t *wakeupKeyCode = (IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t *)arg;
484  int status = PLAT_DS_GetLastWakeupKeyCode(wakeupKeyCode);
485  return (IARM_Result_t)status;
486 
487 }
488 /** @} */
489 /** @} */
IARM_BUS_PWRMGR_NAME
#define IARM_BUS_PWRMGR_NAME
Definition: pwrMgr.h:54
device::FrontPanelConfig::fPTerm
void fPTerm()
This API is used to terminate front panel.
Definition: frontPanelConfig.cpp:132
IARM_Bus_Term
IARM_Result_t IARM_Bus_Term(void)
This API is used to terminate the IARM-Bus library.
IARM_BUS_IRMGR_EVENT_IRKEY
@ IARM_BUS_IRMGR_EVENT_IRKEY
Definition: irMgr.h:220
device::FrontPanelConfig::getInstance
static FrontPanelConfig & getInstance()
This API gets the instance of the FrontPanelConfig. When called for the first time,...
Definition: frontPanelConfig.cpp:82
DeepSleepStatus_Failed
@ DeepSleepStatus_Failed
Definition: deepSleepMgr.h:64
_IARM_Bus_PWRMgr_GetPowerState_Param_t
Structure which holds the current power state of the CPE.
Definition: pwrMgr.h:173
IARM_Bus_Call
IARM_Result_t IARM_Bus_Call(const char *ownerName, const char *methodName, void *arg, size_t argLen)
This API is used to Invoke RPC method by its application name and method name.
Definition: iarm_bus.c:57
device::FrontPanelConfig::fPInit
void fPInit()
This API is used to Initialize front panel.
Definition: frontPanelConfig.cpp:120
manager.hpp
It contains class referenced by manager.cpp file.
_PWRMgr_EventData_t
Structure which holds the event data.
Definition: pwrMgr.h:117
IARM_BUS_PWRMGR_API_GetPowerState
#define IARM_BUS_PWRMGR_API_GetPowerState
Definition: pwrMgr.h:168
IARM_Bus_RegisterEvent
IARM_Result_t IARM_Bus_RegisterEvent(IARM_EventId_t maxEventId)
This API is used to register all the events that are published by the application.
IARM_Bus_RegisterEventHandler
IARM_Result_t IARM_Bus_RegisterEventHandler(const char *ownerName, IARM_EventId_t eventId, IARM_EventHandler_t handler)
This API register to listen to event and provide the callback function for event notification....
Definition: iarmMgrMocks.cpp:43
IARM_BUS_PWRMGR_API_handleDeepsleepTimeoutWakeup
#define IARM_BUS_PWRMGR_API_handleDeepsleepTimeoutWakeup
Definition: pwrMgr.h:323
IARM_Bus_RegisterCall
IARM_Result_t IARM_Bus_RegisterCall(const char *methodName, IARM_BusCall_t handler)
This API is used to register an RPC method that can be invoked by other applications.
DeepSleepStatus_NotStarted
@ DeepSleepStatus_NotStarted
Definition: deepSleepMgr.h:65
IARM_Bus_Disconnect
IARM_Result_t IARM_Bus_Disconnect(void)
This API disconnect Application from IARM Bus so the application will not receive any IARM event or R...
DeepSleepStatus_Completed
@ DeepSleepStatus_Completed
Definition: deepSleepMgr.h:67
device::Manager::Initialize
static void Initialize()
This API is used to initialize the Device Setting module. Each API should be called by any client of ...
Definition: manager.cpp:97
IARM_Bus_BroadcastEvent
IARM_Result_t IARM_Bus_BroadcastEvent(const char *ownerName, IARM_EventId_t eventId, void *data, size_t len)
This API is used to publish an Asynchronous event to all IARM client registered for this perticular e...
libIBus.h
RDK IARM-Bus API Declarations.
IARM_BUS_IRMGR_NAME
#define IARM_BUS_IRMGR_NAME
Definition: irMgr.h:216
frontPanelConfig.hpp
Structures and classes to manage front panel are defined here.
IARM_BUS_PWRMGR_EVENT_MODECHANGED
@ IARM_BUS_PWRMGR_EVENT_MODECHANGED
Definition: pwrMgr.h:60
IARM_BUS_PWRMGR_EVENT_MAX
@ IARM_BUS_PWRMGR_EVENT_MAX
Definition: pwrMgr.h:67
IARM_BUS_IRMGR_KEYSRC_IR
@ IARM_BUS_IRMGR_KEYSRC_IR
Definition: irMgr.h:229
pwrMgr.h
IARM-Bus Power Manager Public API.
irMgr.h
IARM-Bus IR Manager API.
IARM_BUS_DEEPSLEEPMGR_NAME
#define IARM_BUS_DEEPSLEEPMGR_NAME
Definition: deepSleepMgr.h:61
_IRMgr_EventData_t
Definition: irMgr.h:235
DeepSleepStatus_InProgress
@ DeepSleepStatus_InProgress
Definition: deepSleepMgr.h:66
IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT
@ IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT
Definition: pwrMgr.h:61
IARM_Bus_Connect
IARM_Result_t IARM_Bus_Connect(void)
This API is used to connect application to the IARM bus daemon. After connected, the application can ...
Definition: iarmMgrMocks.cpp:33
IARM_Bus_UnRegisterEventHandler
IARM_Result_t IARM_Bus_UnRegisterEventHandler(const char *ownerName, IARM_EventId_t eventId)
This API is used to Remove ALL handlers registered for the given event. This API remove the all the e...
IARM_Bus_Init
IARM_Result_t IARM_Bus_Init(const char *name)
This API is used to initialize the IARM-Bus library.
Definition: iarmMgrMocks.cpp:38
TRUE
#define TRUE
Defines for TRUE/FALSE/ENABLE flags.
Definition: wifi_common_hal.h:199