2023-06-02 02:23:26 +00:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*
|
|
|
|
|
* Change Logs:
|
|
|
|
|
* Date Author Notes
|
|
|
|
|
* 2023-06-02 murmur the first version
|
|
|
|
|
*/
|
|
|
|
|
#ifndef APPLICATIONS_USRCFG_H_
|
|
|
|
|
#define APPLICATIONS_USRCFG_H_
|
|
|
|
|
|
2023-08-31 09:14:48 +00:00
|
|
|
|
#include "cfg/cfg.h"
|
|
|
|
|
#include "ttTR/ttTR.h"
|
|
|
|
|
#include "ttmsg/ttmsg.h"
|
2023-08-31 08:12:44 +00:00
|
|
|
|
|
|
|
|
|
#define malloc rt_malloc
|
|
|
|
|
#define memset rt_memset
|
|
|
|
|
#define free rt_free
|
2023-08-25 02:01:16 +00:00
|
|
|
|
/* parameters for sram peripheral */
|
|
|
|
|
/* stm32f4 Bank3:0X68000000 */
|
|
|
|
|
#define SRAM_BANK_ADDR ((uint32_t)0X68000000)
|
|
|
|
|
|
|
|
|
|
/* data width: 8, 16, 32 */
|
|
|
|
|
#define SRAM_DATA_WIDTH 16
|
|
|
|
|
/* sram size */
|
|
|
|
|
#define SRAM_SIZE ((uint32_t)0x00100000)
|
|
|
|
|
|
2023-07-28 08:29:57 +00:00
|
|
|
|
#define MIN_FRAME_LEN 10
|
2023-08-04 10:13:59 +00:00
|
|
|
|
#define BUFFER_ROW 10//存储编码后信息的二维数组的维数
|
2023-07-28 08:29:57 +00:00
|
|
|
|
|
2023-06-02 06:37:58 +00:00
|
|
|
|
#define WORK_BOARD
|
2023-06-02 02:23:26 +00:00
|
|
|
|
#define FILE_IS_OK 1
|
|
|
|
|
#define TIMER_IS_OUT 1<<1
|
|
|
|
|
#define TT_IS_OK 1<<2
|
2023-06-16 03:18:52 +00:00
|
|
|
|
#define TT_TCP_OK 1<<3
|
|
|
|
|
#define TTIP "10.10.10.72"
|
2023-06-06 07:45:13 +00:00
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
rt_uint8_t cnt;
|
|
|
|
|
rt_uint8_t s;
|
|
|
|
|
} CFG;
|
|
|
|
|
|
2023-06-20 10:09:07 +00:00
|
|
|
|
typedef struct
|
|
|
|
|
{
|
2023-08-01 08:27:21 +00:00
|
|
|
|
uint8_t sendInterval;
|
|
|
|
|
uint8_t maxTTWaitTime;
|
|
|
|
|
uint8_t maxTTRetryCnt;
|
|
|
|
|
uint8_t minTTPeriCnt;
|
|
|
|
|
uint8_t minTTsinal;
|
|
|
|
|
uint8_t timeout;
|
2023-09-05 10:53:01 +00:00
|
|
|
|
uint8_t openWindowTime[60];
|
2023-08-01 08:27:21 +00:00
|
|
|
|
uint16_t maxSizePerFile;
|
|
|
|
|
uint8_t commMode;
|
|
|
|
|
uint8_t selfDesSW;
|
|
|
|
|
uint8_t locAlert;
|
2023-08-19 06:41:13 +00:00
|
|
|
|
uint8_t locRepInterval;
|
2023-09-06 01:51:08 +00:00
|
|
|
|
int8_t isMaWin;
|
2023-09-11 09:43:26 +00:00
|
|
|
|
uint8_t wljd[40];//围栏jd,支持15个点
|
|
|
|
|
uint8_t wlwd[40];//围栏wd
|
2023-08-01 08:27:21 +00:00
|
|
|
|
|
2023-06-20 10:09:07 +00:00
|
|
|
|
} SYS_CFG;
|
2023-06-06 07:45:13 +00:00
|
|
|
|
|
|
|
|
|
//struct rt_event sw_check;//软件条件
|
|
|
|
|
|
2023-08-29 11:29:58 +00:00
|
|
|
|
#define ROOT_PATH_LOG "/sd/log/" //收发数据
|
|
|
|
|
#define ROOT_PATH_DATA "/sd/cdata/" //缓存数据
|
2023-09-02 07:23:32 +00:00
|
|
|
|
#define ROOT_PATH_DEBUG "/sd/debug" //调试日志
|
2023-08-22 10:23:41 +00:00
|
|
|
|
#define CRYPT_BEFRE_PACK
|
2023-06-06 07:45:13 +00:00
|
|
|
|
|
2023-08-24 03:06:44 +00:00
|
|
|
|
#define UPDATE_INTERVAL 10
|
2023-08-15 09:10:18 +00:00
|
|
|
|
#define RELAY
|
2023-06-06 07:45:13 +00:00
|
|
|
|
|
2023-06-02 02:23:26 +00:00
|
|
|
|
#endif /* APPLICATIONS_USRCFG_H_ */
|