⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 app_cfg.h

📁 Micrium提供的专门针对ucos操作系统的TCP/IP协议栈 ucip
💻 H
字号:
/*
*********************************************************************************************************
*
*                                             EXAMPLE CODE
*
*                          (c) Copyright 2003-2007; Micrium, Inc.; Weston, FL
*
*               All rights reserved.  Protected by international copyright laws.
*
*               Knowledge of the source code may NOT be used to develop a similar product.
*
*               Please help us continue to provide the Embedded community with the finest
*               software available.  Your honesty is greatly appreciated.
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*
*                                   APPLICATION CONFIGURATION FILE
*
* Filename      : app_cfg.h
* Version       : V1.91
* Programmer(s) : JDH
*                 SR
*                 ITJ
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                        MODULE ENABLE / DISABLE
*********************************************************************************************************
*/

#define  APP_TCPIP_EN                           DEF_ENABLED
#define  APP_TTCP_EN                            DEF_ENABLED


/*
*********************************************************************************************************
*                                              TASKS NAMES
*********************************************************************************************************
*/

#define  TTCP_OS_CFG_TASK_NAME                 "TTCP"


/*
*********************************************************************************************************
*                                           TASKS PRIORITIES
*********************************************************************************************************
*/

#define  APP_OS_CFG_START_TASK_PRIO                        5

#define  TTCP_OS_CFG_TASK_PRIO                            16

#define  NET_OS_CFG_IF_RX_TASK_PRIO                       28
#define  NET_OS_CFG_TMR_TASK_PRIO                         29

#define  APP_OS_CFG_1_TASK_PRIO                           32
#define  OS_TASK_TMR_PRIO                (OS_LOWEST_PRIO - 2)


/*
*********************************************************************************************************
*                                              STACK SIZES
*                             Size of the task stacks (# of OS_STK entries)
*********************************************************************************************************
*/

#define  APP_OS_CFG_START_TASK_STK_SIZE                 1024
#define  APP_OS_CFG_1_TASK_STK_SIZE                      512

#define  TTCP_OS_CFG_TASK_STK_SIZE                      1024

#define  NET_OS_CFG_IF_RX_TASK_STK_SIZE                 1024
#define  NET_OS_CFG_TMR_TASK_STK_SIZE                   1024


/*
*********************************************************************************************************
*                                                  LIB
*********************************************************************************************************
*/

#define  uC_CFG_OPTIMIZE_ASM_EN                 DEF_ENABLED
#define  LIB_STR_CFG_FP_EN                      DEF_ENABLED


/*
*********************************************************************************************************
*                                                  NIC
*********************************************************************************************************
*/

                                                                /* AT91RM9200 EMAC MAC address source :                 */
                                                                /* AT91RM9200_EMAC_MAC_ADDR_SEL_EEPROM from NIC's EEPROM*/
                                                                /* AT91RM9200_EMAC_MAC_ADDR_SEL_CFG    from application.*/
#define  AT91RM9200_EMAC_CFG_MAC_ADDR_SEL       AT91RM9200_EMAC_MAC_ADDR_SEL_CFG


/*
*********************************************************************************************************
*                                    NO DHCP / STATIC CONFIGURATION
*********************************************************************************************************
*/

#define  APP_CFG_IP_ADDR_STR_THIS_HOST         "192.168.0.6"
#define  APP_CFG_IP_ADDR_STR_REMOTE_HOST       "192.168.0.3"
#define  APP_CFG_IP_ADDR_STR_NET_MASK          "255.255.255.0"
#define  APP_CFG_IP_ADDR_STR_DFLT_GATEWAY      "192.168.0.1"
#define  APP_CFG_IP_ADDR_STR_DNS_SRVR          "192.168.0.2"
#define  APP_CFG_IP_ADDR_STR_NTP_SRVR          "132.246.168.164"
#define  APP_CFG_CLK_UTC_OFFSET                 -18000
#define  APP_CFG_DFLT_HOST_NAME                "CSB637"


/*
*********************************************************************************************************
*                                                 TTCP
*********************************************************************************************************
*/

#define  TTCP_CFG_MAX_ACCEPT_TIMEOUT_MS                30000    /* Maximum inactivity time (ms) on ACCEPT.              */
#define  TTCP_CFG_MAX_CONN_TIMEOUT_MS                  30000    /* Maximum inactivity time (ms) on CONNECT.             */
#define  TTCP_CFG_MAX_RX_TIMEOUT_MS                    30000    /* Maximum inactivity time (ms) on RX.                  */
#define  TTCP_CFG_MAX_TX_TIMEOUT_MS                    30000    /* Maximum inactivity time (ms) on TX.                  */

#define  TTCP_CFG_MAX_ACCEPT_RETRY                         3    /* Maximum number of retries on ACCEPT.                 */
#define  TTCP_CFG_MAX_CONN_RETRY                           3    /* Maximum number of retries on CONNECT.                */
#define  TTCP_CFG_MAX_RX_RETRY                             3    /* Maximum number of retries on RX.                     */
#define  TTCP_CFG_MAX_TX_RETRY                             3    /* Maximum number of retries on TX.                     */

#define  TTCP_CFG_BUF_LEN                               2048    /* Buffer length.                                       */


/*
*********************************************************************************************************
*                                                TRACING
*********************************************************************************************************
*/

#include  <monlib.h>

#define  TRACE_LEVEL_OFF                                   0
#define  TRACE_LEVEL_INFO                                  1
#define  TRACE_LEVEL_DEBUG                                 2

#define  APP_TRACE_LEVEL                        TRACE_LEVEL_DEBUG
#define  APP_TRACE                              mon_printf

#define  TTCP_TRACE_LEVEL                       TRACE_LEVEL_INFO
#define  TTCP_TRACE                             mon_printf

#define  APP_TRACE_INFO(x)                    ((APP_TRACE_LEVEL >= TRACE_LEVEL_INFO)  ? (void)(APP_TRACE x) : (void)0)
#define  APP_TRACE_DEBUG(x)                   ((APP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) ? (void)(APP_TRACE x) : (void)0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -