Explorar o código

bsp:ls2k:add reboot and power command

michael %!s(int64=5) %!d(string=hai) anos
pai
achega
dd36771801
Modificáronse 1 ficheiros con 15 adicións e 0 borrados
  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);
+