/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2021-12-01 19813 the first version */ #ifndef APPLICATIONS_HOST_HOST_H_ #define APPLICATIONS_HOST_HOST_H_ #include "loar.h" #include "stm32g0xx_hal.h" #include "gprs.h" #include "at_client.h" #include #include "wwdg.h" uint8_t Host_Service(void); uint8_t Matching_service(void); uint8_t Pairing_response(void); uint8_t slave_check(uint16_t time_point); void Time_fine_tuning(uint8_t type, uint8_t value ,uint8_t address); extern void format_uartbuf(uint8_t uart); void RTC_time_synchronization(uint8_t address); uint16_t slave_json_format(char *buff , uint8_t address); uint8_t Data_fill(void); void LED_buling(uint16_t speed , uint8_t excute_time); void him_page1(uint8_t type); void use_match_cfg(uint8_t Type); void log_w_slave(uint8_t addr); uint8_t send_s_fw(uint8_t addr); uint8_t send_s_fw_process(void); void reply_fw(uint8_t packet , uint8_t part); //存放配对的从机信息 从0开始 typedef struct { uint8_t ID[4]; //存放从机的ID uint8_t Address; //存放从机地址 // uint8_t Sstate ; //存放从机在线标志 // uint8_t Svbat ; //存放从机电量信息 } Loar_Device; //存放从机上报的数据 从1开始 typedef struct { uint8_t Address; //存放从机地址 char eValue[MAX_SENSOR_NUM][7]; //传感器字符串形式数据 char imei[15]; //imei char volt[5]; //电压 uint8_t saved; //数据是否填充标记位 char CSQ[4]; //信号质量 char SNR[4]; //本次接收的信噪比 char Version[4]; //从机版本号 uint8_t ver; //版本号数字版 } Loar_Device_Data; #endif /* APPLICATIONS_HOST_HOST_H_ */