/* * Copyright (c) 2006-2020, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2020-05-28 Administrator the first version */ #ifndef APPLICATIONS_INC_DTU_UART2_H_ #define APPLICATIONS_INC_DTU_UART2_H_ #define DTU_UART_NAME "uart2" /*串口设备名称*/ #define MAX_DTU_SIZE 512 typedef struct{ char msg_pool[MAX_DTU_SIZE]; }DataTemp; //查询数据---{"cmd": "read"} //重启-------{"cmd": "reboot"} //升级-------{"cmd": "update"} //拍照-------{"cmd": "takephoto"} //{"cmd":"paramconf","ext":{"hst":110,"collt":10,"et":6,"datt":2,"shake_sec":1,"tpl":5,"shake":1,"tph":70,"ts":1,"st":20,"imgres":2,"htim":20,"tt":8}} //{"cmd":"synchronization","ext":{"year":1,"month":1,"day":0,"hour":25,"min":0,"sec":0,"lat":"113.2056","lng":"21.0596","csq",31,"net",0,"iccid","123135453","imei":"895864646464464"}} int DTU_uart2_init(void); void DTU_Write(char *fmt, ...); int dtu_data_play(void); void parseDtu(char *json_string); char * makeJson(); char * makeJson_ReadInfo(); char *makeJson_Warn(char * s,char *t); void UpLoad_Data(void); #endif /* APPLICATIONS_INC_DTU_UART2_H_ */