• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: 系统适配层接口(此文件为DEMO,需集成方适配修改)
15  */
16 #ifndef HILINK_SYS_ADAPTER_H
17 #define HILINK_SYS_ADAPTER_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 typedef enum HiLinkBootReason {
24     HILINK_NORMAL_BOOT = 0,      /* 正常上电 */
25     HILINK_WIFIDOG_REBOOT = 100, /* WIFI挂死重启 */
26     HILINK_SOFTDOG_REBOOT = 101, /* HiLink任务挂死重启 */
27     HILINK_HARDDOG_REBOOT = 102, /* 整机挂死导致的硬件狗复位重启 */
28     HILINK_HOTA_REBOOT = 103,    /* Hota升级成功后重启 */
29     HILINK_SCHEDULED_REBOOT = 104, /* 定时重启 */
30     HILINK_HOTADOG_REBOOT = 105,  /* HOTA挂死重启 */
31     HILINK_BOOT_REASON_BUTT      /* 获取失败 */
32 } HiLinkBootReason;
33 
34 /*
35  * 描述: 重启HiLink SDK
36  * 返回: 0表示成功,其他表示失败
37  * 注意: 若系统不可重启,建议重启HiLink进程
38  */
39 int HILINK_Restart(void);
40 
41 /*
42  * 描述: 获取系统启动原因
43  * 返回: 见HiLinkBootReason
44  */
45 unsigned char HILINK_GetSystemBootReason(void);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* HILINK_SYS_ADAPTER_H */
52