Skip to content

Commit dd36771

Browse files
committed
bsp:ls2k:add reboot and power command
1 parent b86d608 commit dd36771

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

bsp/ls2kdev/applications/pmcon.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include <rtthread.h>
2+
3+
static void reboot()
4+
{
5+
rt_hw_cpu_reset();
6+
}
7+
MSH_CMD_EXPORT(reboot, reboot sample);
8+
9+
10+
static void poweroff()
11+
{
12+
rt_hw_cpu_shutdown();
13+
}
14+
MSH_CMD_EXPORT(poweroff, shutdown power sample);
15+

0 commit comments

Comments
 (0)