TT12-MCU/applications/usrcfg.h

74 lines
1.6 KiB
C
Raw Normal View History

/*
* 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"
#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)
#define MIN_FRAME_LEN 10
#define BUFFER_ROW 10//存储编码后信息的二维数组的维数
2023-06-02 06:37:58 +00:00
#define WORK_BOARD
#define FILE_IS_OK 1
#define TIMER_IS_OUT 1<<1
#define TT_IS_OK 1<<2
#define TT_TCP_OK 1<<3
#define TTIP "10.10.10.72"
typedef struct
{
rt_uint8_t cnt;
rt_uint8_t s;
} CFG;
typedef struct
{
uint8_t sendInterval;
uint8_t maxTTWaitTime;
uint8_t maxTTRetryCnt;
uint8_t minTTPeriCnt;
uint8_t minTTsinal;
uint8_t timeout;
uint8_t openWindowTime[60];
uint16_t maxSizePerFile;
uint8_t commMode;
uint8_t selfDesSW;
uint8_t locAlert;
uint8_t locRepInterval;
int8_t isMaWin;
} SYS_CFG;
//struct rt_event sw_check;//软件条件
#define ROOT_PATH_LOG "/sd/log/" //收发数据
#define ROOT_PATH_DATA "/sd/cdata/" //缓存数据
#define ROOT_PATH_DEBUG "/sd/debug" //调试日志
#define CRYPT_BEFRE_PACK
#define UPDATE_INTERVAL 10
#define RELAY
#endif /* APPLICATIONS_USRCFG_H_ */