bsp:ls2k:add reboot and power command

This commit is contained in:
michael 2020-09-15 11:25:37 +08:00
parent b86d608d63
commit dd36771801
1 changed files with 15 additions and 0 deletions

View File

@ -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);