mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 04:10:26 +08:00
bsp:ls2k:add reboot and power command
This commit is contained in:
parent
b86d608d63
commit
dd36771801
15
bsp/ls2kdev/applications/pmcon.c
Normal file
15
bsp/ls2kdev/applications/pmcon.c
Normal 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user