1 #include <stdio.h>
2 #include "hal_cmu.h"
3 #include "hal_bootmode.h"
4 #include "pmu.h"
5 
6 #if AOS_COMP_DEBUG
7 extern volatile uint32_t g_crash_steps;
8 #endif
9 
hal_reboot(void)10 void hal_reboot(void)
11 {
12 #if AOS_COMP_DEBUG
13 	if (g_crash_steps) {
14 		hal_sw_bootmode_set(HAL_SW_BOOTMODE_REBOOT_FROM_CRASH);
15 	}
16 #endif
17     hal_cmu_sys_reboot();
18 }
19 
set_silent_reboot_flag(void)20 int set_silent_reboot_flag(void)
21 {
22     hal_sw_bootmode_set(HAL_SW_BOOTMODE_RESERVED_BIT24);
23     return 0;
24 }
25 
26 /*0:first boot, 1:silent boot*/
probe_silent_reboot_flag(void)27 int probe_silent_reboot_flag(void)
28 {
29     return (hal_sw_bootmode_get() & HAL_SW_BOOTMODE_RESERVED_BIT24);
30 }
31