boardctl: added the option to change the pm state

This commit is contained in:
Cis van Mierlo
2021-03-23 16:57:20 +01:00
committed by Xiang Xiao
parent ed8fb9d96e
commit dc31b4f1c1
2 changed files with 6 additions and 1 deletions
+4
View File
@@ -258,6 +258,10 @@ static inline int boardctl_pmctrl(FAR struct boardioc_pm_ctrl_s *ctrl)
ctrl->state = pm_querystate(ctrl->domain);
break;
case BOARDIOC_PM_CHANGESTATE:
ret = pm_changestate(ctrl->domain, ctrl->state);
break;
default:
ret = -EINVAL;
}
+2 -1
View File
@@ -225,7 +225,8 @@ enum boardioc_action_e
BOARDIOC_PM_STAY,
BOARDIOC_PM_RELAX,
BOARDIOC_PM_STAYCOUNT,
BOARDIOC_PM_QUERYSTATE
BOARDIOC_PM_QUERYSTATE,
BOARDIOC_PM_CHANGESTATE
};
struct boardioc_pm_ctrl_s