mcu_hi3321_watch/tjd/system/sys_restart.h
2025-05-26 20:15:20 +08:00

43 lines
1.4 KiB
C

/*----------------------------------------------------------------------------
* Copyright (c) Fenda Technologies Co., Ltd. 2021. All rights reserved.
*
* Description: sys_restart.c
*
* Author: saimen
*
* Create: 2024-06-08
*--------------------------------------------------------------------------*/
#ifndef __SYSTEM_RESTART_
#define __SYSTEM_RESTART_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
/**********************************************************************************************************************
* PUBLIC FUNCTIONS
*/
extern void tjd_sys_start_data_recover (void);
extern void tjd_sys_anomaly_data_save ( void );
extern void tjd_sys_restart_data_save ( void );
extern void tjd_sys_restart_no_save(void);
extern void tjd_sys_restart (void* restart_reason);
extern void tjd_sys_restore_factory(void);
extern void tjd_sys_restore_factory_test(void);
extern void tjd_sys_shipping_mode(void);
extern void tjd_sys_enter_sleep_mode_no_save(void);
extern void tjd_sys_enter_sleep_mode(void);
extern uint32_t tjd_sys_check_restart_reason(void);
extern uint8_t tjd_sys_save_data_before_restart(uint8_t type, void *pdata); // type = HARDFAULT_RESTART or NORMAL_RESTART
extern void tjd_sys_rtc_por_recover(void);
extern uint32_t tjd_sys_restart_get_reason(void);
#ifdef __cplusplus
}
#endif
#endif