T-Box Basic dev
Loading...
Searching...
No Matches
sys_device.h
Go to the documentation of this file.
1
10#ifndef SYS_DEVICE_H
11#define SYS_DEVICE_H
12
13#include <stdint.h>
14
15#ifdef __cplusplus
16extern "C"
17{
18#endif
19
20// 自检配置
21#define SYS_EMMC_TEST_FILE_NAME "tmp_test_file"
22#define SYS_THRESHOLD_PARTITION_1_MB 10
23#define SYS_THRESHOLD_PARTITION_2_MB 50
24#define SYS_THRESHOLD_PARTITION_3_MB 50
25#define SYS_THRESHOLD_MODULES_MB 5
26
27/* GNSS定位状态 */
28typedef enum
29{
30 SYS_GNSS_NOT_FIX = 0,
31 SYS_GNSS_FIX = 1,
32 SYS_GNSS_SERIAL_FAULT = 2,
33} sys_gnss_fix_t;
34
35/* 模组网络状态 */
36typedef enum
37{
38 SYS_G4_GSM_NOT_REGISTERED = 0,
39 SYS_G4_GSM_REGISTERED = 1,
40 SYS_G4_CONNECT_NETWORK = 2,
41} sys_g4_module_t;
42
43#pragma pack(1)
44typedef struct
45{
46 uint8_t wifi_status;
47 uint8_t wifi_signal; /* WIFI信号强度,0,1,2,3,4-无信号,,,,极强 */
48 uint8_t network_status;
49 uint8_t network_signal; /* 通讯模块信号强度 */
50 uint8_t sim_card_status; /* SIM卡状态,0 - 识别SIM,1 - 未识别SIM */
51 uint8_t gnss_status; /* GPS模块状态 0 正常,1异常*/
52 uint8_t gnss_star_count; /* GPS卫星个数 */
53 uint16_t gnss_direction; /*GPS方向高位*/
54 uint8_t gnss_fix_status; /* GPS定位,0 - 无定位,1 - 已定位, 2 -故障或GPS关闭 */
55 uint8_t gnss_signal; /* GNSS 信号强度值 */
56 uint8_t emmc_status; /* emmc状态,0正常,1异常 */
58#pragma pack()
59
60void sys_self_check_init(void);
61void sys_tx_device_status(void);
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif /* SYS_DEVICE_H */
Definition sys_device.h:45