You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/29 16:21:50 UTC

[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1243: rptun & pmconfig cmd update

pkarashchenko commented on code in PR #1243:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1243#discussion_r933432898


##########
nshlib/nsh_syscmds.c:
##########
@@ -200,27 +220,12 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
       boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
       next_state = ctrl.state;
 
-      ctrl.action = BOARDIOC_PM_STAYCOUNT;
-      ctrl.state = PM_NORMAL;
-      boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
-      normal_count = ctrl.count;
-
-      ctrl.state = PM_IDLE;
-      boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
-      idle_count = ctrl.count;
-
-      ctrl.state = PM_STANDBY;
-      boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
-      standby_count = ctrl.count;
-
-      ctrl.state = PM_SLEEP;
-      boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
-      sleep_count = ctrl.count;
+      nsh_output(vtbl, "Last state %d, Next state %d\n",
+                 last_state, next_state);
 
-      nsh_output(vtbl, "Last state %d, Next state %d"
-                 "PM stay [%d, %d, %d, %d]\n",
-                 last_state, next_state, normal_count, idle_count,
-                 standby_count, sleep_count);
+      return nsh_foreach_direntry(vtbl, argv[0],
+                                  CONFIG_NSH_PROC_MOUNTPOINT "/pm",

Review Comment:
   `nsh_syscmds.c:227:35: error: 'CONFIG_NSH_PROC_MOUNTPOINT' undeclared`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org