1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2010-11-13 weety first version 9 */ 10 11 12 #include <rthw.h> 13 #include <rtthread.h> 14 #include "dm36x.h" 15 16 /** 17 * @addtogroup DM36X 18 */ 19 /*@{*/ 20 21 /** 22 * reset cpu by dog's time-out 23 * 24 */ machine_reset()25void machine_reset() 26 { 27 reset_system(); 28 } 29 30 /** 31 * shutdown CPU 32 * 33 */ machine_shutdown()34void machine_shutdown() 35 { 36 37 } 38 39 #ifdef RT_USING_FINSH 40 41 #include <finsh.h> 42 43 #ifdef FINSH_USING_MSH cmd_reset(int argc,char ** argv)44int cmd_reset(int argc, char** argv) 45 { 46 rt_hw_cpu_reset(); 47 return 0; 48 } 49 MSH_CMD_EXPORT_ALIAS(cmd_reset, reset, restart the system); 50 cmd_shutdown(int argc,char ** argv)51int cmd_shutdown(int argc, char** argv) 52 { 53 rt_hw_cpu_shutdown(); 54 return 0; 55 } 56 MSH_CMD_EXPORT_ALIAS(cmd_shutdown, shutdown, shutdown the system); 57 58 #endif 59 #endif 60 61 /*@}*/ 62