80 lines
1.8 KiB
C
80 lines
1.8 KiB
C
|
/*
|
||
|
* 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_
|
||
|
|
||
|
|
||
|
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 代表执行相关功能
|
||
|
|
||
|
#define _CFG_COMM_MODE 0x00 // 配置工作方式
|
||
|
|
||
|
#define _CMD_SELF_TEST 0x01 // 执行自检
|
||
|
|
||
|
#define _CFG_SELF_DESTRUCT 0x0A21 // 设置自毁开关
|
||
|
#define _CMD_SELF_DESTRUCT 0x02 // 执行自毁
|
||
|
|
||
|
#define _CFG_COMM_WINDOW 0x03 // 配置开窗
|
||
|
#define _CMD_OPEN_WINDOW 0x0B11 // 执行手动开窗
|
||
|
#define _CMD_CLOSE_WINDOW 0x1905 // 执行手动关窗
|
||
|
|
||
|
#define _CFG_LOCATION_ALERT 0x04// 配置位置告警
|
||
|
|
||
|
#define _CMD_CLEAR_DATA 0x05 // 执行清空数据
|
||
|
|
||
|
#define _CMD_RETRY_DATA 0x06 //
|
||
|
|
||
|
#define _CFG_UPDATE_CFG 0x7001
|
||
|
|
||
|
//3S
|
||
|
#define _CMD_DEPTH_REQUEST 0x0601
|
||
|
#define _CMD_RTC_CHECK 0x410F
|
||
|
|
||
|
//
|
||
|
#define ADDR_ANJI 0x32 //0x42?
|
||
|
#define ADDR_TT 0x41
|
||
|
#define ADDR_3S 0x3E
|
||
|
|
||
|
|
||
|
|
||
|
#endif /* APPLICATIONS_FUNC_FUNC_H_ */
|