power: policy: cc13x2_cc26x2: guard references to sleep states
Use of macros such as SYS_POWER_STATE_SLEEP_2 needs to be guarded by making sure CONFIG_SYS_POWER_SLEEP_STATES is defined. Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
parent
16fab6c4f8
commit
8cf74c8e02
1 changed files with 4 additions and 0 deletions
|
@ -143,5 +143,9 @@ enum power_states sys_pm_policy_next_state(s32_t ticks)
|
|||
|
||||
__weak bool sys_pm_policy_low_power_devices(enum power_states pm_state)
|
||||
{
|
||||
#ifdef CONFIG_SYS_POWER_SLEEP_STATES
|
||||
return (pm_state == SYS_POWER_STATE_SLEEP_2);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue