📄 cfg.h
字号:
#ifndef _CFG_H
#define _CFG_H
/*-----------------------------------------------------------------------------*
*- Module select -*
*-----------------------------------------------------------------------------*/
#define CS_MODULE_EN 1
#define EPA_MODULE_EN 1
#define DEBUG_MODULE_EN 1
#define ROUTER_MODULE_EN 1
#define RIP_MODULE_EN 1
/*-----------------------------------------------------------------------------*
*- Module depends -*
*-----------------------------------------------------------------------------*/
#if CS_MODULE_EN > 0
#define PTP_MODULE_EN 0
#else
#define PTP_MODULE_EN 0
#endif // PTP_MODULE_EN
/*-----------------------------------------------------------------------------*
*- PERIPHERAL_MODULE options -*
*-----------------------------------------------------------------------------*/
#if PTP_MODULE_EN > 0
#define ST_MODULE_EN 1
#define PTP_TEST_EN 0
#else
#define ST_MODULE_EN 1
#define PTP_TEST_EN 0
#endif // PTP_MODULE_EN
/*-----------------------------------------------------------------------------*
*- EPA_MODULE options -*
*-----------------------------------------------------------------------------*/
#if EPA_MODULE_EN > 0
#define FS_MODULE_EN 0
#define NS_MODULE_EN 0
#else
#define FS_MODULE_EN 0
#define NS_MODULE_EN 0
#endif // EPA_MODULE_EN
/*-----------------------------------------------------------------------------*
*- EPA_MODULE options -*
*-----------------------------------------------------------------------------*/
//#if RIP_MODULE_EN > 0
// #define RIP_MODULE_EN 0
// #define RIP_MODULE_EN 1
//#else
// #define RIP_MODULE_EN 0
// #define RIP_MODULE_EN 0
//#endif // EPA_MODULE_EN
/*-----------------------------------------------------------------------------*
*- TIMER_MODULE options -*
*-----------------------------------------------------------------------------*/
#define CSTIMER_TICKS_MILLISECONS (469) // Ticks of CS timer in one millisecond, MCK/128 as counter input
#define CSTIMER_MAX_MILLISECONS (140) // Max milliseconds of cs timer, MCK/128 as counter input
#define CS_TICK_NANOSECONDS (2134) // Nano-Seconds during one crystal tick
/*-----------------------------------------------------------------------------*
*- MEMIF_MODULE options -*
*-----------------------------------------------------------------------------*/
#define VAR_AMOUNT_ALL (0x20) // Max number of variables
#define LISTITEM_AMOUNT_ALL (0x40) // Max number of list item
#define SOCK_BUFF_SIZE (0x200)
#define MEM_VALIDCHK_EN 1
/*-----------------------------------------------------------------------------*
*- Debug options -*
*-----------------------------------------------------------------------------*/
#define SYSTEM_VALIDCHK_EN 0
#if DEBUG_MODULE_EN > 0
#define MEM_DEBUG_EN 1
#define ETHER_DEBUG_EN 0
#define TC_DEBUG_EN 0
#define SOFTIMER_DEBUG_EN 0
#define IP_DEBUG_EN 0
#else
#define MEM_DEBUG_EN 0
#define ETHER_DEBUG_EN 0
#define TC_DEBUG_EN 0
#define SOFTIMER_DEBUG_EN 0
#define IP_DEBUG_EN 0
#endif // DEBUG_EN
/*-----------------------------------------------------------------------------*
*- Priority of each task -*
*-----------------------------------------------------------------------------*/
#define TASK_PRIORITY_ERR (6)
#define TASK_PRIORITY_TCPIP (7)
#define TASK_PRIORITY_ROUTER (8)
#define TASK_PRIORITY_CSEND (9)
#define TASK_PRIORITY_EPAFB (10)
#define TASK_PRIORITY_EPA (11)
#define TASK_PRIORITY_ST (12)
#define TASK_PRIORITY_MACRO (13)
#define TASK_PRIORITY_PTP (14)
#define TASK_PRIORITY_RIP (15)
/*-----------------------------------------------------------------------------*
*- Max number of Msgs in each task's Msg queen -*
*-----------------------------------------------------------------------------*/
#define MSG_AMOUNT_ERRORHANDLE (0x08)
#define MSG_AMOUNT_TCPIP (0x80)
#define MSG_AMOUNT_CSEND (0x10)
#define MSG_AMOUNT_EPAFB (0x10)
#define MSG_AMOUNT_EPA (0x20)
#define MSG_AMOUNT_ROUTER (0x20)
#define MSG_AMOUNT_ST (0x10)
#define Msg_AMOUNT_MACRO (0x10)
#define Msg_AMOUNT_RIPMACRO (0x10)
#define MSG_AMOUNT_PTP (0x08)
/*-----------------------------------------------------------------------------*
*- Timeout value of each task when pending on its Msg -*
*- 0 indicates that corresponding task will never be timeout unless Msg -*
*- comes. -*
*-----------------------------------------------------------------------------*/
#define TASK_TIMEOUT_ERR (0)
#define TASK_TIMEOUT_TCPIP (0)
#define TASK_TIMEOUT_CSEND (0)
#define TASK_TIMEOUT_EPAFB (0)
#define TASK_TIMEOUT_EPA (0)
#define TASK_TIMEOUT_ROUTER (0)
#define TASK_TIMEOUT_ST (0)
#define TASK_TIMEOUT_MACRO (0)
#define TASK_TIMEOUT_PTP (0)
#define TASK_TIMEOUT_RIPMACRO (0)
/*-----------------------------------------------------------------------------*
*- Timeout value of each task when pending on its Msg -*
*- 0 indicates that corresponding task will never be timeout unless Msg -*
*- comes. -*
*-----------------------------------------------------------------------------*/
#define STACK_SIZE_ERR (512)
#define STACK_SIZE_TCPIP (512)
#define STACK_SIZE_CSEND (512)
#define STACK_SIZE_EPAFB (1024)
#define STACK_SIZE_EPA (1024)
#define STACK_SIZE_ROUTER (1024)
#define STACK_SIZE_ST (1024)
#define STACK_SIZE_MACRO (1024)
#define STACK_SIZE_RIPMACRO (1024)
#define STACK_SIZE_PTP (512)
#endif // _CFG_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -