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

📄 net_cfg.h

📁 从Luminary官方网站下载的LM3S6000系列的UCos+Tcp/IP的源码, 经本人稍微修改后可直接在IAR6.2下编译通过,里面包括了LM3S6000系列的所有外设UART, PWn....
💻 H
📖 第 1 页 / 共 3 页
字号:
*               Timers are required for :
*
*               (a) ARP  cache entries
*               (b) IP   fragment reassembly
*               (c) ICMP low-network-resources monitor task
*               (d) TCP  state machine connections
*
*           (2) Configure NET_TMR_CFG_TASK_FREQ to schedule the execution frequency of the network timer
*               task -- how often NetTmr_TaskHandler() is scheduled to run per second as implemented in
*               NetOS_Tmr_Task().
*
*               (a) NET_TMR_CFG_TASK_FREQ  MUST NOT be configured as a floating-point frequency.
*
*               See also 'net_tmr.h  NETWORK TIMER TASK TIME DEFINES  Notes #1 & #2'
*                      & 'net_os.c   NetOS_Tmr_Task()  Notes #1 & #2'.
*********************************************************************************************************
*/

#define  NET_TMR_CFG_NBR_TMR                              30    /* Configure total number of TIMERs (see Note #1).      */

#define  NET_TMR_CFG_TASK_FREQ                            10    /* Configure Timer Task frequency   (see Note #2).      */


/*
*********************************************************************************************************
*                               NETWORK BUFFER MANAGEMENT CONFIGURATION
*
* Note(s) : (1) (a) Configure NET_BUF_CFG_NBR_SMALL with the desired number of SMALL network BUFFER objects.
*
*               (b) Configure NET_BUF_CFG_NBR_LARGE with the desired number of SMALL network BUFFER objects.
*
*               (c) Buffers are required to :
*
*                   (1) Receive  packets from the network
*                   (2) Transmit packets to   the network
*
*           (2) (a) Configure NET_BUF_CFG_DATA_SIZE_SMALL with the desired data buffer size for SMALL network BUFFERs.
*
*               (b) Configure NET_BUF_CFG_DATA_SIZE_LARGE with the desired data buffer size for LARGE network BUFFERs.
*
*               (c) NET_BUF_CFG_DATA_SIZE_SMALL & NET_BUF_CFG_DATA_SIZE_LARGE  MUST be declared with values ...
*
*                   (1) that are greater than or equal to NET_BUF_DATA_SIZE_MIN (see 'net_buf.h  NETWORK BUFFER
*                       INDEX & SIZE DEFINES')
*
*                   (2) such that NET_BUF_CFG_DATA_SIZE_LARGE has a value greater than NET_BUF_CFG_DATA_SIZE_SMALL
*
*                   ... and SHOULD be declared with values
*
*                   (3) that are integer multiples of 'CPU_ALIGN' word size (to force word-alignment of buffer arrays)
*
*               See also 'net_buf.h  NETWORK BUFFER DATA TYPE  Note #3'.
*********************************************************************************************************
*/

                                                                /* Configure total number of       BUFFERs ...          */
                                                                /* ... (see Note #1) :                                  */
#define  NET_BUF_CFG_NBR_SMALL                             6    /* Configure total number of SMALL BUFFERs.             */
#define  NET_BUF_CFG_NBR_LARGE                             4    /* Configure total number of LARGE BUFFERs.             */

                                                                /* Configure size of       BUFFER DATA areas ...        */
                                                                /* ... (see Note #2) :                                  */
#define  NET_BUF_CFG_DATA_SIZE_SMALL                     256    /* Configure size of SMALL BUFFER DATA area.            */
#define  NET_BUF_CFG_DATA_SIZE_LARGE                    1596    /* Configure size of LARGE BUFFER DATA area.            */


/*$PAGE*/
/*
*********************************************************************************************************
*                                NETWORK INTERFACE CARD CONFIGURATION
*
* Note(s) : (1) Configure NIC-specific parameters.
*
*               Consult the specific NIC's documentation to determine the NIC's required configuration
*               parameters; see also the specific NIC's source documentation in the following network
*               directory :
*
*                   \<Network Protocol Suite>\NIC\<if>\<nic>\
*
*                       where
*                               <Network Protocol Suite>        directory path for network protocol suite
*                               <nic>                           directory name for specific network interface card (NIC)
*
*           (2) Configure NET_NIC_CFG_INT_CTRL_EN to enable/disable any software to handle the presence
*               of a NIC interrupt controller.
*
*           (3) Configure NET_NIC_CFG_RD_WR_SEL   to select whether to implement the NIC's read/write
*               functionality with functions or macro's.
*
*               (a) When NET_NIC_RD_WR_SEL_FNCT,  NIC read/write functionality SHOULD be implemented
*                   as functions in the application-specific 'net_bsp.c' (or some other application-
*                   specific file) & MUST be prototyped in the NIC's 'net_nic.h'.
*
*               (b) When NET_NIC_RD_WR_SEL_MACRO, NIC read/write functionality SHOULD be implemented
*                   as macro's   in the application-specific 'net_bsp.h'.
*
*           (4) (a) Configure NET_NIC_CFG_TX_RDY_INIT_VAL to initialize the NIC-transmit-ready OS object with
*                   one of the following values :
*
*                   (1) 0, for NIC driver's that implement the NIC's transmit-ready status using a
*                              Transmit Empty    interrupt.
*
*                   (2) 1, for NIC driver's that implement the NIC's transmit-ready status using a
*                              Transmit Complete interrupt.
*
*               (b) This configuration currently applicable for single-transmit-packet-buffer NIC drivers ONLY.
*
*               See also 'net_os.c  NetOS_NIC_Init()  Note #1a'.
*
*           (5) Configure NET_NIC_CFG_TX_PKT_PREPARE_EN to enable/disable the early preparation of NIC
*               transmit packet(s) by the network interface :
*
*               (a) When ENABLED,  NIC transmit packet(s) are     prepared BEFORE waiting on the NIC's
*                   transmit ready signal.  This is useful for NICs that can simultaneously prepare
*                   transmit packet(s) while also transmitting previously-prepared packet(s).
*
*               (a) When DISABLED, NIC transmit packet(s) are NOT prepared BEFORE waiting on the NIC's
*                   transmit ready signal.
*********************************************************************************************************
*/
                                                                /* Configure presence of interrupt controller ...       */
                                                                /* ... (see Note #2) :                                  */
#define  NET_NIC_CFG_INT_CTRL_EN                DEF_ENABLED
                                                                /*   DEF_DISABLED  Interrupt controller NOT present     */
                                                                /*   DEF_ENABLED   Interrupt controller     present     */

                                                                /* Configure NIC Read/Write Selection (see Note #3) :   */
#define  NET_NIC_CFG_RD_WR_SEL                  NET_NIC_RD_WR_SEL_FNCT
                                                                /*   NET_NIC_RD_WR_SEL_FNCT   NIC Read/Write ...        */
                                                                /*   ... functionality implemented with functions       */
                                                                /*   NET_NIC_RD_WR_SEL_MACRO  NIC Read/Write ...        */
                                                                /*   ... functionality implemented with macro's         */

#define  NET_NIC_CFG_TX_RDY_INIT_VAL                       1    /* Configure transmit ready initial value (see Note #4).*/

                                                                /* Configure transmit preparation feature (see Note #5):*/
#define  NET_NIC_CFG_TX_PKT_PREPARE_EN          DEF_DISABLED
                                                                /*   DEF_DISABLED   Transmit packets NOT pre-prepared   */
                                                                /*   DEF_ENABLED    Transmit packets     pre-prepared   */


/*$PAGE*/
/*
*********************************************************************************************************
*                                NETWORK INTERFACE LAYER CONFIGURATION
*
* Note(s) : (1) See 'net_def.h  NETWORK INTERFACE LAYER DEFINES' for supported network interface types.
*********************************************************************************************************
*/
                                                                /* Configure interface type (see Note #1).              */
#define  NET_IF_CFG_TYPE                        NET_IF_TYPE_ETHER

#define  NET_IF_CFG_ADDR_FLTR_EN                DEF_ENABLED     /* Configure Net IF address filter feature :            */
                                                                /*   DEF_DISABLED        Addresses NOT filtered         */
                                                                /*   DEF_ENABLED         Addresses     filtered         */

/*
*********************************************************************************************************
*                           ADDRESS RESOLUTION PROTOCOL LAYER CONFIGURATION
*
* Note(s) : (1) Address Resolution Protocol ONLY required for some network interfaces (see 'net_arp.h
*               Note #1').
*
*           (2) See 'net_arp.h  ARP HARDWARE & PROTOCOL DEFINES  Note #1' for supported ARP hardware &
*               protocol types.
*********************************************************************************************************
*/
                                                                /* Configure ARP types (see Note #2) :                  */
#define  NET_ARP_CFG_HW_TYPE                    NET_ARP_HW_TYPE_ETHER
#define  NET_ARP_CFG_PROTOCOL_TYPE              NET_ARP_PROTOCOL_TYPE_IP_V4

#define  NET_ARP_CFG_NBR_CACHE                            10    /* Configure ARP cache size.                            */

#define  NET_ARP_CFG_ADDR_FLTR_EN               DEF_ENABLED     /* Configure ARP address filter feature :               */
                                                                /*   DEF_DISABLED    ARP addresses NOT filtered         */
                                                                /*   DEF_ENABLED     ARP addresses     filtered         */

/*$PAGE*/
/*
*********************************************************************************************************
*                                INTERNET PROTOCOL LAYER CONFIGURATION
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                        INTERNET CONTROL MESSAGE PROTOCOL LAYER CONFIGURATION
*********************************************************************************************************
*/

#define  NET_ICMP_CFG_TX_SRC_QUENCH_EN          DEF_DISABLED    /* Configure ICMP Transmit Source Quench feature :      */
                                                                /*   DEF_DISABLED  ICMP Transmit Source Quench DISABLED */
                                                                /*   DEF_ENABLED   ICMP Transmit Source Quench ENABLED  */

#define  NET_ICMP_CFG_TX_SRC_QUENCH_SIZE                  20    /* Configure ICMP transmit source quench list size.     */


/*$PAGE*/
/*
*********************************************************************************************************
*                                    TRANSPORT LAYER CONFIGURATION
*********************************************************************************************************
*/
                                                        /* Configure Transport Layer Selection :                        */
#define  NET_CFG_TRANSPORT_LAYER_SEL            NET_TRANSPORT_LAYER_SEL_UDP_TCP
                                                        /*   NET_TRANSPORT_LAYER_SEL_UDP       UDP     ONLY             */
                                                        /*   NET_TRANSPORT_LAYER_SEL_UDP_TCP   UDP/TCP                  */


⌨️ 快捷键说明

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