Trident IoT Z-Wave SDK
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
zpal_power_manager.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Silicon Laboratories Inc. <https://www.silabs.com/>
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
12#ifndef ZPAL_POWER_MANAGER_H_
13#define ZPAL_POWER_MANAGER_H_
14
15#include <stdbool.h>
16#include <stdint.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
65
78
87
91typedef void * zpal_pm_handle_t;
92
93
103
113void zpal_pm_stay_awake(zpal_pm_handle_t handle, uint32_t timeout_milliseconds);
114
122
128
134#ifdef __cplusplus
135}
136#endif
137
138#endif /* ZPAL_POWER_MANAGER_H_ */
void * zpal_pm_handle_t
Power lock handle.
Definition zpal_power_manager.h:91
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 ...
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_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 po...
zpal_pm_mode_t
Defines the power modes the underlying platform can enter or leave.
Definition zpal_power_manager.h:72
zpal_pm_type_t
Defines the different power types that can be requested.
Definition zpal_power_manager.h:61
void zpal_pm_cancel_all(void)
Cancels all active power locks.
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 bef...
@ ZPAL_PM_MODE_SLEEP
Processor is sleeping, but all peripherals are enabled.
Definition zpal_power_manager.h:74
@ ZPAL_PM_MODE_DEEP_SLEEP
Most peripherals are disabled, but the radio is in FLiRS mode.
Definition zpal_power_manager.h:75
@ ZPAL_PM_MODE_SHUTOFF
Chip is off and will boot from reset. Hence, no transition from this power mode will ever happen.
Definition zpal_power_manager.h:76
@ ZPAL_PM_MODE_RUNNING
Processor is active.
Definition zpal_power_manager.h:73
@ ZPAL_PM_TYPE_USE_RADIO
Prevents the system from entering a sleep mode where radio is unavailable.
Definition zpal_power_manager.h:62
@ ZPAL_PM_TYPE_DEEP_SLEEP
Prevents the system from going to a sleep mode that requires wake up from reset state.
Definition zpal_power_manager.h:63