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

📄 app_cfg.h

📁 GNU环境下uC/OS-II的移植代码:BSP & OS部分
💻 H
📖 第 1 页 / 共 2 页
字号:
/*
*********************************************************************************************************
*
*                                             EXAMPLE CODE
*
*                          (c) Copyright 2003-2006; 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.
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*
*                                          CONFIGURATION FILE
*
* Filename      : app_cfg.h
* Version       : V1.88
* Programmer(s) : Jean-Denis Hatier
*********************************************************************************************************
*/


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

#define  APP_TCPIP_EN                           DEF_DISABLED

#define  APP_CLK_EN                             DEF_DISABLED
#define  APP_DHCPc_EN                           DEF_DISABLED
#define  APP_DNSc_EN                            DEF_DISABLED
#define  APP_FS_EN                              DEF_DISABLED
#define  APP_FTPc_EN                            DEF_DISABLED
#define  APP_FTPs_EN                            DEF_DISABLED
#define  APP_HTTPs_EN                           DEF_DISABLED
#define  APP_POP3c_EN                           DEF_DISABLED
#define  APP_SMTPc_EN                           DEF_DISABLED
#define  APP_SNTPc_EN                           DEF_DISABLED
#define  APP_TFTPs_EN                           DEF_DISABLED
#define  APP_TTCP_EN                            DEF_DISABLED


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

#define  CLK_OS_CFG_TASK_NAME                  "RealTime Clock"
#define  DHCPc_OS_CFG_TASK_NAME                "DHCP (Client)"
#define  FTPs_SRV_OS_CFG_TASK_NAME             "FTP (Server)"
#define  FTPs_CTRL_OS_CFG_TASK_NAME            "FTP (Control)"
#define  HTTPs_OS_CFG_TASK_NAME                "HTTP (Server)"
#define  TFTPs_OS_CFG_TASK_NAME                "TFTP (Server)"
#define  TTCP_OS_CFG_TASK_NAME                 "TTCP"


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

#define  CLK_OS_CFG_TASK_PRIO                              4
#define  APP_START_OS_CFG_TASK_PRIO                        5

#define  NET_OS_CFG_IF_RX_TASK_PRIO                        8
#define  NET_OS_CFG_TMR_TASK_PRIO                          9

#define  TTCP_OS_CFG_TASK_PRIO                            16
#define  HTTPs_OS_CFG_TASK_PRIO                           17
#define  FTPs_SRV_OS_CFG_TASK_PRIO                        18
#define  FTPs_CTRL_OS_CFG_TASK_PRIO                       19
#define  TFTPs_OS_CFG_TASK_PRIO                           20
#define  DHCPc_OS_CFG_TASK_PRIO                           21

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


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

#define  CLK_OS_CFG_TASK_STK_SIZE                        512
#define  APP_START_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

#define  TTCP_OS_CFG_TASK_STK_SIZE                      1024
#define  HTTPs_OS_CFG_TASK_STK_SIZE                     2048
#define  FTPs_SRV_OS_CFG_TASK_STK_SIZE                  1024
#define  FTPs_CTRL_OS_CFG_TASK_STK_SIZE                 4096
#define  TFTPs_OS_CFG_TASK_STK_SIZE                      512
#define  DHCPc_OS_CFG_TASK_STK_SIZE                      256

#define  APP_1_OS_CFG_TASK_STK_SIZE                      512


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

#define  uC_CFG_OPTIMIZE_ASM_EN                 DEF_ENABLED
#define  LIB_STR_CFG_FP_EN                      DEF_ENABLED


/*
*********************************************************************************************************
*                                           CLK CONFIGURATION
*********************************************************************************************************
*/

#define  CLK_CFG_SIGNAL_RATE                    OS_TICKS_PER_SEC/* Number of time ClkTask() is called per second.       */


#define  CLK_CFG_ARG_CHK_EN                     DEF_ENABLED     /* Enable / disable argument checking.                  */

#define  CLK_CFG_SIGNAL_EN                      DEF_DISABLED    /* Enabled:  clock source is 'clock tick' ISR mode.     */
                                                                /* Disabled: clock source is kernel task time delay.    */

#define  CLK_CFG_STR_CONV_EN                    DEF_ENABLED     /* Enable / disable clock conversion to string.         */


/*
*********************************************************************************************************
*                                                  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.102"
#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          "192.168.0.2"
#define  APP_CFG_CLK_UTC_OFFSET                 -18000


/*
*********************************************************************************************************
*                                                 DHCPc
*********************************************************************************************************
*/

                                                                /* DHCP server IP port. Default is 67.                  */
#define  DHCPc_CFG_IP_PORT_SERVER                         67
                                                                /* DHCP client IP port. Default is 68.                  */
#define  DHCPc_CFG_IP_PORT_CLIENT                         68

                                                                /* Maximum number of attempts to negotiate lease with   */
                                                                /* the DHCP server.                                     */
#define  DHCPc_CFG_MAX_REQ_LEASE_RETRY                     5

                                                                /* Once the DHCP server has assigned the client an      */
                                                                /* address, the later may perform a final check prior   */
                                                                /* to use this address in order to make sure it is not  */
                                                                /* being used by another host on the network.           */
#define  DHCPc_CFG_ADDR_VALIDATE_EN             DEF_ENABLED

                                                                /* Number of seconds to wait for a possible ARP reply   */
                                                                /* when performing the final check on the suggested     */
                                                                /* address.  The minimum is 1 second.                   */
#define  DHCPc_CFG_ADDR_VALIDATE_WAIT_TIME_S               3

                                                                /* The broadcast bit is used to instruct the server to  */
                                                                /* use broadcast packets instead of unicast.            */
                                                                /* Useful when the IP stack cannot receive unicast      */
                                                                /* packets when not fully configured.                   */
                                                                /* This is our case, so the value MUST be DEF_ENABLED.  */
#define  DHCPc_CFG_BROADCAST_BIT                DEF_ENABLED

                                                                /* Size of array used for the client identifier,        */
                                                                /* typically a 48-bit MAC/net address.                  */
                                                                /* The minimum size value is 2.                         */
#define  DHCPc_CFG_CLIENT_ID_SIZE               NET_IF_ADDR_SIZE

                                                                /* Size of array used for the vendor class identifier.  */
                                                                /* Set this value according to the argument length      */
                                                                /* passed to the DHCPc_SetVendorClassID function.       */
                                                                /* The minimum size value is 1.                         */
#define  DHCPc_CFG_VENDOR_CLASS_ID_SIZE                   11

                                                                /* Size of the array used for the requested parameter   */
                                                                /* list.  Defines the maximum number of parameters to   */
                                                                /* request when invoking DHCPc_SetParamReqList.         */
#define  DHCPc_CFG_PARAM_REQ_LIST_SIZE                    10


/*
*********************************************************************************************************
*                                                 DNSc
*********************************************************************************************************
*/

#define  DNSc_CFG_IPPORT                                  53    /* Client IP port. Default is 53.                       */

#define  DNSc_CFG_MAX_RX_TIMEOUT_S                         5    /* Maximum inactivity time (s) on RX.                   */
#define  DNSc_CFG_MAX_TX_TIMEOUT_S                         5    /* Maximum inactivity time (s) on TX.                   */


/*
*********************************************************************************************************
*                                                 FTPc
*********************************************************************************************************
*/

#define  FTPc_CFG_CTRL_IPPORT                             21    /* FTP Control IP port. Default is 21.                  */
#define  FTPc_CFG_DTP_IPPORT                              20    /* FTP Data IP port.    Default is 20.                  */

#define  FTPc_CFG_CTRL_MAX_CONN_TIMEOUT_S                 30    /* Maximum inactivity time (s) on CONNECT.              */
#define  FTPc_CFG_CTRL_MAX_RX_TIMEOUT_S                   30    /* Maximum inactivity time (s) on RX.                   */
#define  FTPc_CFG_CTRL_MAX_TX_TIMEOUT_S                   30    /* Maximum inactivity time (s) on TX.                   */

#define  FTPc_CFG_DTP_MAX_ACCEPT_TIMEOUT_S                30    /* Maximum inactivity time (s) on ACCEPT.               */

⌨️ 快捷键说明

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