2023-07-18 11:23:48 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2023-07-18 murmur the first version
|
|
|
|
*/
|
|
|
|
#ifndef APPLICATIONS_FUNC_FUNC_H_
|
|
|
|
#define APPLICATIONS_FUNC_FUNC_H_
|
|
|
|
|
2023-07-19 10:57:54 +00:00
|
|
|
#include <rtthread.h>
|
|
|
|
#include <usrcfg.h>
|
|
|
|
#include <ttmsg/ttmsg.h>
|
|
|
|
#include <dfs_file.h>
|
2023-07-18 11:23:48 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
_ONLY_FOR_TT=0,
|
|
|
|
_ONLY_FOR_3S,
|
|
|
|
_FOR_BOTH,
|
|
|
|
}sub_mode;
|
|
|
|
#ifdef ENUM
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
// CFG 代表更新配置
|
|
|
|
// CMD 代表执行相关功能
|
|
|
|
|
|
|
|
_CFG_COMM_MODE, // 配置工作方式
|
|
|
|
|
|
|
|
_CMD_SELF_TEST, // 执行自检
|
|
|
|
|
|
|
|
_CFG_SELF_DESTRUCT, // 设置自毁开关
|
|
|
|
_CMD_SELF_DESTRUCT, // 执行自毁
|
|
|
|
|
|
|
|
_CFG_COMM_WINDOW, // 配置开窗
|
|
|
|
_CMD_OPEN_WINDOW, // 执行手动开窗
|
|
|
|
_CMD_CLOSE_WINDOW, // 执行手动关窗
|
|
|
|
|
|
|
|
_CFG_LOCATION_ALERT, // 配置位置告警
|
|
|
|
|
|
|
|
_CMD_CLEAR_DATA, // 执行清空数据
|
|
|
|
|
|
|
|
_CMD_RETRY_DATA,
|
|
|
|
|
|
|
|
} cmd;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//define function
|
|
|
|
// CFG 代表更新配置
|
|
|
|
// CMD 代表执行相关功能
|
|
|
|
|
2023-07-19 10:57:54 +00:00
|
|
|
#define _CFG_COMM_MODE 0x7000 // 配置工作方式
|
2023-07-18 11:23:48 +00:00
|
|
|
|
2023-07-19 10:57:54 +00:00
|
|
|
#define _CMD_SELF_TEST 0x7001 // 执行自检
|
2023-07-18 11:23:48 +00:00
|
|
|
|
|
|
|
#define _CFG_SELF_DESTRUCT 0x0A21 // 设置自毁开关
|
2023-07-19 10:57:54 +00:00
|
|
|
#define _CMD_SELF_DESTRUCT 0x7002 // 执行自毁
|
2023-07-18 11:23:48 +00:00
|
|
|
|
2023-07-19 10:57:54 +00:00
|
|
|
#define _CFG_COMM_WINDOW 0x7003 // 配置开窗
|
2023-07-18 11:23:48 +00:00
|
|
|
#define _CMD_OPEN_WINDOW 0x0B11 // 执行手动开窗
|
|
|
|
#define _CMD_CLOSE_WINDOW 0x1905 // 执行手动关窗
|
|
|
|
|
2023-07-19 10:57:54 +00:00
|
|
|
#define _CFG_LOCATION_ALERT 0x7004// 配置位置告警
|
2023-07-18 11:23:48 +00:00
|
|
|
|
2023-07-19 10:57:54 +00:00
|
|
|
#define _CMD_CLEAR_DATA 0x7005 // 执行清空数据
|
2023-07-18 11:23:48 +00:00
|
|
|
|
2023-07-19 10:57:54 +00:00
|
|
|
#define _CMD_RETRY_DATA 0x7006 //
|
2023-07-18 11:23:48 +00:00
|
|
|
|
2023-07-26 00:44:18 +00:00
|
|
|
#define _CFG_UPDATE_CFG 0x7007
|
2023-07-18 11:23:48 +00:00
|
|
|
|
|
|
|
//3S
|
|
|
|
#define _CMD_DEPTH_REQUEST 0x0601
|
2023-07-21 08:02:32 +00:00
|
|
|
#define _CMD_RTC_REQUEST 0x410F
|
|
|
|
|
2023-07-18 11:23:48 +00:00
|
|
|
|
|
|
|
//
|
2023-07-19 10:57:54 +00:00
|
|
|
#define ADDR_ANJI 0x42 //0x42?
|
2023-07-18 11:23:48 +00:00
|
|
|
#define ADDR_TT 0x41
|
2023-07-26 00:44:18 +00:00
|
|
|
#define ADDR_3S 0x32
|
2023-07-18 11:23:48 +00:00
|
|
|
|
2023-07-29 08:08:15 +00:00
|
|
|
//#define ROOT_PATH_LOG "/sd/log/"
|
|
|
|
//#define ROOT_PATH_DATA "/sd/rxdata/"
|
2023-07-18 11:23:48 +00:00
|
|
|
|
|
|
|
#endif /* APPLICATIONS_FUNC_FUNC_H_ */
|