Browse Source

bsp:ls2k:add reboot and power command

michael 4 years ago
parent
commit
dd36771801
1 changed files with 15 additions and 0 deletions
  1. 15 0
      bsp/ls2kdev/applications/pmcon.c

+ 15 - 0
bsp/ls2kdev/applications/pmcon.c

@@ -0,0 +1,15 @@
+#include <rtthread.h>
+
+static void reboot()
+{
+	rt_hw_cpu_reset();
+}
+MSH_CMD_EXPORT(reboot, reboot sample);
+
+
+static void poweroff()
+{
+	rt_hw_cpu_shutdown();
+}
+MSH_CMD_EXPORT(poweroff, shutdown power sample);
+