Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
zpal_power_manager.h File Reference
#include <stdbool.h>
#include <stdint.h>
+ Include dependency graph for zpal_power_manager.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void * zpal_pm_handle_t
 Power lock handle.
 

Enumerations

enum  zpal_pm_type_t {
  ZPAL_PM_TYPE_USE_RADIO ,
  ZPAL_PM_TYPE_DEEP_SLEEP
}
 Defines the different power types that can be requested. More...
 
enum  zpal_pm_mode_t {
  ZPAL_PM_MODE_RUNNING ,
  ZPAL_PM_MODE_SLEEP ,
  ZPAL_PM_MODE_DEEP_SLEEP ,
  ZPAL_PM_MODE_SHUTOFF
}
 Defines the power modes the underlying platform can enter or leave. More...
 

Functions

void zpal_zw_pm_event_handler (zpal_pm_mode_t from, zpal_pm_mode_t to)
 The ZPAL implementation must invoke this function whenever a transition happens between one of the power modes defined in zpal_pm_mode_t. This function is implemented by Z-Wave.
 
zpal_pm_handle_t zpal_pm_register (zpal_pm_type_t type)
 Registers a power lock of a given type. This function must be invoked once to allocate power lock before any other API calls are made on that lock.
 
void zpal_pm_stay_awake (zpal_pm_handle_t handle, uint32_t timeout_milliseconds)
 Makes the chip stay awake for a given time in a power mode defined by handle. The power lock must be registered with zpal_pm_register() prior to invoking this function. If invoked on an already active power lock, the timeout will be reset.
 
void zpal_pm_cancel (zpal_pm_handle_t handle)
 Cancels an active power lock. If handle points to NULL or inactive power lock, nothing happens.
 
void zpal_pm_cancel_all (void)
 Cancels all active power locks.
 

Detailed Description

Defines a platform abstraction layer for the Z-Wave power manager.