虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

c_<b>Control</b>

  • 基于FPGA的计算机可编程外围接口芯片的设计与实现

    随着电子技术和EDA技术的发展,大规模可编程逻辑器件PLD(Programmable Logic Device)、现场可编程门阵列FPGA(Field Programmable Gates Array)完全可以取代大规模集成电路芯片,实现计算机可编程接口芯片的功能,并可将若干接口电路的功能集成到一片PLD或FPGA中.基于大规模PLD或FPGA的计算机接口电路不仅具有集成度高、体积小和功耗低等优点,而且还具有独特的用户可编程能力,从而实现计算机系统的功能重构.该课题以Altera公司FPGA(FLEX10K)系列产品为载体,在MAX+PLUSⅡ开发环境下采用VHDL语言,设计并实现了计算机可编程并行接芯片8255的功能.设计采用VHDL的结构描述风格,依据芯片功能将系统划分为内核和外围逻辑两大模块,其中内核模块又分为RORT A、RORT B、OROT C和Control模块,每个底层模块采用RTL(Registers Transfer Language)级描述,整体生成采用MAX+PLUSⅡ的图形输入法.通过波形仿真、下载芯片的测试,完成了计算机可编程并行接芯片8255的功能.

    标签: FPGA 计算机 可编程 外围接口

    上传时间: 2013-06-08

    上传用户:asddsd

  • PCA9549 Octal bus switch with

    The PCA9549 provides eight bits of high speed TTL-compatible bus switching controlledby the I2C-bus. The low ON-state resistance of the switch allows connections to be madewith minimal propagation delay. Any individual A to B channel or combination of channelscan be selected via the I2C-bus, determined by the contents of the programmable Controlregister. When the I2C-bus bit is HIGH (logic 1), the switch is on and data can flow fromPort A to Port B, or vice versa. When the I2C-bus bit is LOW (logic 0), the switch is open,creating a high-impedance state between the two ports, which stops the data flow.An active LOW reset input (RESET) allows the PCA9549 to recover from a situationwhere the I2C-bus is stuck in a LOW state. Pulling the RESET pin LOW resets the I2C-busstate machine and causes all the bits to be open, as does the internal power-on resetfunction.

    标签: switch Octal 9549 with

    上传时间: 2014-11-22

    上传用户:xcy122677

  • 8051单片机系统扩展与接口技术

    8051单片机系统扩展与接口技术:第一节   8051 单片机系统扩展概述第二节  单片机外部存储器扩展第三节  单片机输入输出(I/O)口扩展及应用第四节   LED显示器接口电路及显示程序第五节  单片机键盘接口技术第六节 单片机与数模(D/A)及模数(A/D)转换1、地址总线(Address Bus,简写为AB)地址总线可传送单片机送出的地址信号,用于访问外部存储器单元或I/O端口。A   地址总线是单向的,地址信号只是由单片机向外发出。B   地址总线的数目决定了可直接访问的存储器单元的数目。例如N位地址,可以产生2N个连续地址编码,因此可访问2N个存储单元,即通常所说的寻址范围为 2N个地址单元。MCS—51单片机有十六位地址线,因此存储器展范围可达216 = 64KB地址单元。C   挂在总线上的器件,只有地址被选中的单元才能与CPU交换数据,其余的都暂时不能操作,否则会引起数据冲突。2、数据总线(Data Bus,简写为DB)数据总线用于在单片机与存储器之间或单片机与I/O端口之间传送数据。A   单片机系统数据总线的位数与单片机处理数据的字长一致。例如MCS—51单片机是8位字长,所以数据总线的位数也是8位。B   数据总线是双向的,即可以进行两个方向的数据传送。3、控制总线(Control Bus,简写为CB)控制总线实际上就是一组控制信号线,包括单片机发出的,以及从其它部件送给单片机的各种控制或联络信号。对于一条控制信号线来说,其传送方向是单向的,但是由不同方向的控制信号线组合的控制总线则表示为双向的。总线结构形式大大减少了单片机系统中连接线的数目,提高了系统的可靠性,增加了系统的灵活性。此外,总线结构也使扩展易于实现,各功能部件只要符合总线规范,就可以很方便地接入系统,实现单片机扩展。

    标签: 8051 单片机 系统扩展 接口技术

    上传时间: 2013-10-18

    上传用户:assef

  • labview中文教程

    第八章 labview的编程技巧     本章介绍局部变量、全局变量、属性节点和其他一些有助于提高编程技巧的问题,恰当地运用这些技巧可以提高程序的质量。   8.1 局部变量 严格的语法尽管可以保证程序语言的严密性,但有时它也会带来一些使用上的不便。在labview这样的数据流式的语言中,将变量严格地分为控制器(Control)和指示器(Indicator),前者只能向外流出数据,后者只能接受流入的数据,反过来不行。在一般的代码式语言中,情况不是这样的。例如我们有变量a、b和c,只要需要我们可以将a的值赋给b,将b的值赋给c等等。前面所介绍的labview内容中,只有移位积存器即可输入又可输出。另外,一个变量在程序中可能要在多处用到,在图形语言中势必带来过多连线,这也是一件烦人的事。还有其他需要,因此labview引入了局部变量。

    标签: labview 教程

    上传时间: 2013-10-27

    上传用户:xieguodong1234

  • by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 Third Edition, published July 2001. (See

    by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 Third Edition, published July 2001. (See the catalog page for this book.) the text of Learning Perl, 3rd Edition. Table of Contents Copyright Page Preface Chapter 1: Introduction Chapter 2: Scalar Data Chapter 3: Lists and Arrays Chapter 4: Subroutines Chapter 5: Hashes Chapter 6: I/O Basics Chapter 7: Concepts of Regular Expressions Chapter 8: More About Regular Expressions Chapter 9: Using Regular Expressions Chapter 10: More Control Structures Chapter 11: Filehandles and File Tests Chapter 12: Directory Operations Chapter 13: Manipulating Files and Directories Chapter 14: Process Management Chapter 15: Strings and Sorting Chapter 16: Simple Databases Chapter 17: Some Advanced Perl Techniques Appendix A: Exercise Answers Appendix B: Beyond the Llama Index Colophon

    标签: L. published Schwartz Edition

    上传时间: 2014-11-29

    上传用户:kr770906

  • by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 Third Edition, published July 2001. (See

    by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 Third Edition, published July 2001. (See the catalog page for this book.) Learning Perl, 3rd Edition. Table of Contents Copyright Page Preface Chapter 1: Introduction Chapter 2: Scalar Data Chapter 3: Lists and Arrays Chapter 4: Subroutines Chapter 5: Hashes Chapter 6: I/O Basics Chapter 7: Concepts of Regular Expressions Chapter 8: More About Regular Expressions Chapter 9: Using Regular Expressions Chapter 10: More Control Structures Chapter 11: Filehandles and File Tests Chapter 12: Directory Operations Chapter 13: Manipulating Files and Directories Chapter 14: Process Management Chapter 15: Strings and Sorting Chapter 16: Simple Databases Chapter 17: Some Advanced Perl Techniques Appendix A: Exercise Answers Appendix B: Beyond the Llama Index Colophon

    标签: L. published Schwartz Edition

    上传时间: 2015-09-03

    上传用户:lifangyuan12

  • 可编程并行接口8255A完成的交通灯实验   用8255A的B端口和C端口控制12个LED的亮和灭(输出为0则亮

    可编程并行接口8255A完成的交通灯实验   用8255A的B端口和C端口控制12个LED的亮和灭(输出为0则亮,输出为1则灭),模拟十字路口的交通灯。 -programmable parallel interface 8255A completed, the traffic lights experimental 8255A port B and C - I control 12 LED bright and methomyl (output of 0-liang, the output of an anti), the simulation of traffic lights at a crossroads.

    标签: 可编程 交通灯 并行接口 实验

    上传时间: 2016-08-13

    上传用户:来茴

  • net_tcp.h

    /* ********************************************************************************************************* *                                             uC/TCP-IP V2 *                                      The Embedded TCP/IP Suite * *                          (c) Copyright 2003-2010; Micrium, Inc.; Weston, FL * *               All rights reserved.  Protected by international copyright laws. * *               uC/TCP-IP is provided in source form to registered licensees ONLY.  It is  *               illegal to distribute this source code to any third party unless you receive  *               written permission by an authorized Micrium representative.  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. * *               You can contact us at www.micrium.com. ********************************************************************************************************* */ /* ********************************************************************************************************* * *                                          NETWORK TCP LAYER *                                   (TRANSMISSION CONTROL PROTOCOL) * * Filename      : net_tcp.h * Version       : V2.10 * Programmer(s) : ITJ ********************************************************************************************************* * Note(s)       : (1) Supports Transmission Control Protocol as described in RFC #793 with the following *                     restrictions/constraints : * *                     (a) TCP Security & Precedence NOT supported               RFC # 793, Section 3.6 * *                     (b) TCP Urgent Data           NOT supported               RFC # 793, Section 3.7 *                                                                                'The Communication of *                                                                                  Urgent Information' * *                     (c) The following TCP options NOT supported :              * *                         (1) Window Scale                                      RFC #1072, Section 2 *                                                                               RFC #1323, Section 2 *                         (2) Selective Acknowledgement (SACK)                  RFC #1072, Section 3 *                                                                               RFC #2018 *                                                                               RFC #2883 *                         (3) TCP Echo                                          RFC #1072, Section 4 *                         (4) Timestamp                                         RFC #1323, Section 3.2 *                         (5) Protection Against Wrapped Sequences (PAWS)       RFC #1323, Section 4 * *                     (d) #### IP-Options-to-TCP-Connection                     RFC #1122, Section 4.2.3.8 *                                Handling NOT           supported * *                     (e) #### ICMP-Error-Message-to-TCP-Connection             RFC #1122, Section 4.2.3.9 *                                Handling NOT currently supported * *                 (2) TCP Layer assumes/requires Network Socket Layer (see 'net_sock.h  MODULE  Note #1a2'). ********************************************************************************************************* */ /*$PAGE*/ /* ********************************************************************************************************* *                                               MODULE * * Note(s) : (1) TCP Layer module is NOT required for UDP-to-Application API configuration. * *               See also 'net_cfg.h  TRANSPORT LAYER CONFIGURATION' *                      & 'net_cfg.h  USER DATAGRAM PROTOCOL LAYER CONFIGURATION'. * *               See also 'net_tcp.h  Note #2'. * *           (2) The following TCP-module-present configuration value MUST be pre-#define'd in  *               'net_cfg_net.h' PRIOR to all other network modules that require TCP Layer *               configuration (see 'net_cfg_net.h  TCP LAYER CONFIGURATION  Note #2b') : * *                   NET_TCP_MODULE_PRESENT ********************************************************************************************************* */ #ifdef   NET_TCP_MODULE_PRESENT                                 /* See Note #2.                                         */ /* ********************************************************************************************************* *                                               EXTERNS ********************************************************************************************************* */ #if ((defined(NET_TCP_MODULE)) && \      (defined(NET_GLOBALS_EXT))) #define  NET_TCP_EXT #else #define  NET_TCP_EXT  extern #endif /*$PAGE*/ /* ********************************************************************************************************* *                                               DEFINES ********************************************************************************************************* */ /* ********************************************************************************************************* *                                         TCP HEADER DEFINES * * Note(s) : (1) The following TCP value MUST be pre-#define'd in 'net_def.h' PRIOR to 'net_buf.h' so that *               the Network Buffer Module can configure maximum buffer header size (see 'net_def.h  TCP *               LAYER DEFINES' & 'net_buf.h  NETWORK BUFFER INDEX & SIZE DEFINES  Note #1') : * *               (a) NET_TCP_HDR_SIZE_MAX                  60        (NET_TCP_HDR_LEN_MAX *                                                                  * NET_TCP_HDR_LEN_WORD_SIZE) * *           (2) Urgent pointer & data NOT supported (see 'net_tcp.h  Note #1b'). ********************************************************************************************************* */ #define  NET_TCP_HDR_LEN_MASK                         0xF000u #define  NET_TCP_HDR_LEN_SHIFT                            12u #define  NET_TCP_HDR_LEN_NONE                              0u #define  NET_TCP_HDR_LEN_MIN                               5u #define  NET_TCP_HDR_LEN_MAX                              15u #define  NET_TCP_HDR_LEN_WORD_SIZE                       CPU_WORD_SIZE_32 #define  NET_TCP_HDR_SIZE_MIN                           (NET_TCP_HDR_LEN_MIN * NET_TCP_HDR_LEN_WORD_SIZE) #if 0                                                           /* See Note #1a.                                        */ #define  NET_TCP_HDR_SIZE_MAX                           (NET_TCP_HDR_LEN_MAX * NET_TCP_HDR_LEN_WORD_SIZE) #endif #define  NET_TCP_HDR_SIZE_TOT_MIN                       (NET_IP_HDR_SIZE_TOT_MIN + NET_TCP_HDR_SIZE_MIN) #define  NET_TCP_HDR_SIZE_TOT_MAX                       (NET_IP_HDR_SIZE_TOT_MAX + NET_TCP_HDR_SIZE_MAX) #define  NET_TCP_PSEUDO_HDR_SIZE                          12u   /*  = sizeof(NET_TCP_PSEUDO_HDR)                        */ #define  NET_TCP_PORT_NBR_RESERVED                       NET_PORT_NBR_RESERVED #define  NET_TCP_PORT_NBR_NONE                           NET_TCP_PORT_NBR_RESERVED #define  NET_TCP_HDR_URG_PTR_NONE                     0x0000u   /* See Note #2.                                         */ /*$PAGE*/ /* ********************************************************************************************************* *                                       TCP HEADER FLAG DEFINES * * Note(s) : (1) See 'TCP HEADER  Note #2' for flag fields. * *           (2) Urgent pointer & data NOT supported (see 'net_tcp.h  Note #1b'). ********************************************************************************************************* */ #define  NET_TCP_HDR_FLAG_MASK                        0x0FFFu #define  NET_TCP_HDR_FLAG_NONE                    DEF_BIT_NONE #define  NET_TCP_HDR_FLAG_RESERVED                    0x0FE0u   /* MUST be '0'.                                         */ #define  NET_TCP_HDR_FLAG_URGENT                  DEF_BIT_05    /* See Note #2.                                         */ #define  NET_TCP_HDR_FLAG_ACK                     DEF_BIT_04 #define  NET_TCP_HDR_FLAG_PUSH                    DEF_BIT_03 #define  NET_TCP_HDR_FLAG_RESET                   DEF_BIT_02 #define  NET_TCP_HDR_FLAG_SYNC                    DEF_BIT_01 #define  NET_TCP_HDR_FLAG_FIN                     DEF_BIT_00 #define  NET_TCP_HDR_FLAG_CLOSE                   NET_TCP_HDR_FLAG_FIN /* ********************************************************************************************************* *                                          TCP FLAG DEFINES ********************************************************************************************************* */                                                                 /* ------------------ NET TCP FLAGS ------------------- */ #define  NET_TCP_FLAG_NONE                        DEF_BIT_NONE #define  NET_TCP_FLAG_USED                        DEF_BIT_00    /* TCP conn cur used; i.e. NOT in free TCP conn pool.   */                                                                 /* ------------------ TCP TX  FLAGS ------------------- */                                                                 /* TCP tx flags copied from TCP hdr flags.              */ #define  NET_TCP_FLAG_TX_FIN                      NET_TCP_HDR_FLAG_FIN #define  NET_TCP_FLAG_TX_CLOSE                    NET_TCP_FLAG_TX_FIN #define  NET_TCP_FLAG_TX_SYNC                     NET_TCP_HDR_FLAG_SYNC #define  NET_TCP_FLAG_TX_RESET                    NET_TCP_HDR_FLAG_RESET #define  NET_TCP_FLAG_TX_PUSH                     NET_TCP_HDR_FLAG_PUSH #define  NET_TCP_FLAG_TX_ACK                      NET_TCP_HDR_FLAG_ACK #define  NET_TCP_FLAG_TX_URGENT                   NET_TCP_HDR_FLAG_URGENT #define  NET_TCP_FLAG_TX_BLOCK                    DEF_BIT_07                                                                 /* ------------------ TCP RX  FLAGS ------------------- */ #define  NET_TCP_FLAG_RX_DATA_PEEK                DEF_BIT_08 #define  NET_TCP_FLAG_RX_BLOCK                    DEF_BIT_15 /*$PAGE*/ /* ********************************************************************************************************* *                                          TCP TYPE DEFINES * * Note(s) : (1) NET_TCP_TYPE_&&& #define values specifically chosen as ASCII representations of the TCP *               types.  Memory displays of TCP types will display with their chosen ASCII names. ********************************************************************************************************* */                                                                 /* ------------------ NET TCP TYPES ------------------- */ #if     (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) #define  NET_TCP_TYPE_NONE                        0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x54435020u   /* "TCP " in ASCII.                                     */ #else #if     (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_32) #define  NET_TCP_TYPE_NONE                        0x454E4F4Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x20504354u   /* "TCP " in ASCII.                                     */ #elif   (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_16) #define  NET_TCP_TYPE_NONE                        0x4F4E454Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x43542050u   /* "TCP " in ASCII.                                     */ #else                                                           /* Dflt CPU_WORD_SIZE_08.                               */ #define  NET_TCP_TYPE_NONE                        0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x54435020u   /* "TCP " in ASCII.                                     */ #endif #endif /* ********************************************************************************************************* *                                     TCP SEQUENCE NUMBER DEFINES * * Note(s) : (1) TCP initial transmit sequence number is incremented by a fixed value, preferably a large *               prime value or a large value with multiple unique factors. * *               (a) One reasonable TCP initial transmit sequence number increment value example : * *                       65527  =  37 * 23 * 11 * 7 * * *               #### NET_TCP_TX_SEQ_NBR_CTR_INC could be developer-configured in 'net_cfg.h'. * *               See also 'NET_TCP_TX_GET_SEQ_NBR()  Notes #1b2 & #1c2'. ********************************************************************************************************* */ #define  NET_TCP_SEQ_NBR_NONE                              0u #define  NET_TCP_ACK_NBR_NONE                            NET_TCP_SEQ_NBR_NONE #define  NET_TCP_TX_SEQ_NBR_CTR_INC                    65527u   /* See Note #1.                                         */ #define  NET_TCP_ACK_NBR_DUP_WIN_SIZE_SCALE                4 /*$PAGE*/ /* ********************************************************************************************************* *                                    TCP DATA/TOTAL LENGTH DEFINES * * Note(s) : (1) (a) TCP total length #define's (NET_TCP_TOT_LEN)  relate to the total size of a complete *                   TCP packet, including the packet's TCP header.  Note that a complete TCP packet MAY *                   be fragmented in multiple Internet Protocol packets. * *               (b) TCP data  length #define's (NET_TCP_DATA_LEN) relate to the data  size of a complete *                   TCP packet, equal to the total TCP packet length minus its TCP header size.  Note  *                   that a complete TCP packet MAY be fragmented in multiple Internet Protocol packets. ********************************************************************************************************* */                                                                                 /* See Notes #1a & #1b.                 */ #define  NET_TCP_DATA_LEN_MIN                              0u #define  NET_TCP_TOT_LEN_MIN                            (NET_TCP_HDR_SIZE_MIN + NET_TCP_DATA_LEN_MIN) #define  NET_TCP_TOT_LEN_MAX                            (NET_IP_TOT_LEN_MAX   - NET_IP_HDR_SIZE_MIN ) #define  NET_TCP_DATA_LEN_MAX                           (NET_TCP_TOT_LEN_MAX  - NET_TCP_HDR_SIZE_MIN) /*$PAGE*/ /* ********************************************************************************************************* *                                      TCP SEGMENT SIZE DEFINES * * Note(s) : (1) (a) RFC # 879, Section 3 states that the TCP Maximum Segment Size "counts only *                   data octets in the segment, ... not the TCP header or the IP header". * *               (b) RFC #1122, Section 4.2.2.6 requires that : * *                   (1) "The MSS value to be sent in an MSS option must be less than or equal to * *                        (A) MMS_R - 20 * *                        where MMS_R is the maximum size for a transport-layer message that can *                        be received." * *                   (2) "If an MSS option is not received at connection setup, TCP MUST assume a *                        default send MSS of 536 (576 - 40)." * *                   See also 'net_ip.h  IP DATA/TOTAL LENGTH DEFINES  Note #1'. ********************************************************************************************************* */                                                                                         /* See Note #1.                 */ #define  NET_TCP_MAX_SEG_SIZE_DFLT                      (NET_IP_MAX_DATAGRAM_SIZE_DFLT - NET_IP_HDR_SIZE_MIN - NET_TCP_HDR_SIZE_MIN) #define  NET_TCP_MAX_SEG_SIZE_DFLT_RX                    NET_TCP_DATA_LEN_MAX           /* See Note #1b1.               */ #define  NET_TCP_MAX_SEG_SIZE_DFLT_TX                    NET_TCP_MAX_SEG_SIZE_DFLT      /* See Note #1b2.               */ #define  NET_TCP_MAX_SEG_SIZE_NONE                         0u #define  NET_TCP_MAX_SEG_SIZE_MIN                        NET_TCP_MAX_SEG_SIZE_DFLT #define  NET_TCP_MAX_SEG_SIZE_MAX                        NET_TCP_DATA_LEN_MAX #define  NET_TCP_SEG_LEN_MIN                             NET_TCP_DATA_LEN_MIN #define  NET_TCP_SEG_LEN_MAX                             NET_TCP_DATA_LEN_MAX #define  NET_TCP_SEG_LEN_SYNC                              1u #define  NET_TCP_SEG_LEN_FIN                               1u #define  NET_TCP_SEG_LEN_CLOSE                           NET_TCP_SEG_LEN_FIN #define  NET_TCP_SEG_LEN_ACK                               0u #define  NET_TCP_SEG_LEN_RESET                             0u #define  NET_TCP_SEG_LEN_PROBE                             0u #define  NET_TCP_DATA_LEN_TX_SYNC                          0u #define  NET_TCP_DATA_LEN_TX_FIN                           0u #define  NET_TCP_DATA_LEN_TX_CLOSE                       NET_TCP_DATA_LEN_TX_FIN #define  NET_TCP_DATA_LEN_TX_ACK                           0u #define  NET_TCP_DATA_LEN_TX_PROBE_NO_DATA                 0u #define  NET_TCP_DATA_LEN_TX_PROBE_DATA                    1u #define  NET_TCP_DATA_LEN_TX_RESET                         0u #define  NET_TCP_TX_PROBE_DATA                          0x00u /* ********************************************************************************************************* *                                       TCP WINDOW SIZE DEFINES * * Note(s) : (1) Although NO RFC specifies the absolute minimum TCP connection window size value allowed, *               RFC #793, Section 3.7 'Data Communication : Managing the Window' states that for "the *               window ... there is an assumption that this is related to the currently available data *               buffer space available for this connection". ********************************************************************************************************* */ #define  NET_TCP_WIN_SIZE_NONE                             0u #define  NET_TCP_WIN_SIZE_MIN                            NET_TCP_MAX_SEG_SIZE_MIN #define  NET_TCP_WIN_SIZE_MAX                            DEF_INT_16U_MAX_VAL /*$PAGE*/ /* ********************************************************************************************************* *                                     TCP HEADER OPTIONS DEFINES * * Note(s) : (1) See the following RFC's for TCP options summary : * *               (a) RFC # 793, Section  3.1 'Header Format : Options' *               (b) RFC #1122; Sections 4.2.2.5, 4.2.2.6 * *           (2) TCP option types are encoded in the first octet for each TCP option as follows : * *                           -------- *                           | TYPE | *                           -------- * *               The TCP option type value determines the TCP option format : * *               (a) The following TCP option types are single-octet TCP options -- i.e. the option type *                   octet is the ONLY octet for the TCP option. * *                   (1) TYPE =  0   End of Options List *                   (2) TYPE =  1   No Operation * * *               (b) All other TCP options MUST be multi-octet TCP options (see RFC #1122, Section 4.2.2.5) : * *                           ------------------------------ *                           | TYPE | LEN  |   TCP OPT    | *                           ------------------------------ * *                       where  *                               TYPE        Indicates the specific TCP option type *                               LEN         Indicates the total    TCP option length, in octets, including  *                                                the option type & the option length octets *                               TCP OPT     Additional TCP option octets, if any, that contain the remaining *                                                TCP option information * *                   The following TCP option types are multi-octet TCP options where the option's second *                   octet specify the total TCP option length, in octets, including the option type & the *                   option length octets : * *                   (1) TYPE =  2   Maximum Segment Size        See RFC # 793, Section  3.1 'Header Format : *                                                                   Options : Maximum Segment Size'; *                                                                   RFC #1122, Section 4.2.2.6; *                                                                   RFC # 879, Section 3 * *                   (2) TYPE =  3   Window  Scale               See 'net_tcp.h  Note #1c1' *                   (3) TYPE =  4   SACK Allowed                See 'net_tcp.h  Note #1c2' *                   (4) TYPE =  5   SACK Option                 See 'net_tcp.h  Note #1c2' *                   (5) TYPE =  6   Echo Request                See 'net_tcp.h  Note #1c3' *                   (6) TYPE =  7   Echo Reply                  See 'net_tcp.h  Note #1c3' *                   (7) TYPE =  8   Timestamp                   See 'net_tcp.h  Note #1c4' * *           (3) TCP header allows for a maximum option list length of 40 octets : * *                   NET_TCP_HDR_OPT_SIZE_MAX = NET_TCP_HDR_SIZE_MAX - NET_TCP_HDR_SIZE_MIN * *                                            = 60 - 20 * *                                            = 40 * *           (4) 'NET_TCP_OPT_SIZE'  MUST be pre-defined PRIOR to all definitions that require TCP option  *                size data type. ********************************************************************************************************* */ /*$PAGE*/ #define  NET_TCP_HDR_OPT_END_LIST                          0u #define  NET_TCP_HDR_OPT_NOP                               1u #define  NET_TCP_HDR_OPT_MAX_SEG_SIZE                      2u #define  NET_TCP_HDR_OPT_WIN_SCALE                         3u #define  NET_TCP_HDR_OPT_SACK_PERMIT                       4u #define  NET_TCP_HDR_OPT_SACK                              5u #define  NET_TCP_HDR_OPT_ECHO_REQ                          6u #define  NET_TCP_HDR_OPT_ECHO_REPLY                        7u #define  NET_TCP_HDR_OPT_TS                                8u #define  NET_TCP_HDR_OPT_PAD                             NET_TCP_HDR_OPT_END_LIST #define  NET_TCP_HDR_OPT_LEN_END_LIST                      1u #define  NET_TCP_HDR_OPT_LEN_NOP                           1u #define  NET_TCP_HDR_OPT_LEN_MAX_SEG_SIZE                  4u #define  NET_TCP_HDR_OPT_LEN_WIN_SCALE                     3u #define  NET_TCP_HDR_OPT_LEN_SACK_PERMIT                   2u #define  NET_TCP_HDR_OPT_LEN_ECHO_REQ                      6u #define  NET_TCP_HDR_OPT_LEN_ECHO_REPLY                    6u #define  NET_TCP_HDR_OPT_LEN_TS                           10u #define  NET_TCP_HDR_OPT_LEN_SACK_MIN                      6u #define  NET_TCP_HDR_OPT_LEN_SACK_MAX                     38u #define  NET_TCP_HDR_OPT_LEN_MIN                           1u #define  NET_TCP_HDR_OPT_LEN_MIN_LEN                       2u #define  NET_TCP_HDR_OPT_LEN_MAX                          38u typedef  CPU_INT32U  NET_TCP_OPT_SIZE;                          /* TCP opt size data type (see Note #4).                */ #define  NET_TCP_HDR_OPT_SIZE_WORD               (sizeof(NET_TCP_OPT_SIZE)) #define  NET_TCP_HDR_OPT_SIZE_MAX                       (NET_TCP_HDR_SIZE_MAX - NET_TCP_HDR_SIZE_MIN) #define  NET_TCP_HDR_OPT_NBR_MIN                           0u #define  NET_TCP_HDR_OPT_NBR_MAX                        (NET_TCP_HDR_OPT_SIZE_MAX / NET_TCP_HDR_OPT_SIZE_WORD) #define  NET_TCP_HDR_OPT_IX                              NET_TCP_HDR_SIZE_MIN /*$PAGE*/ /* ********************************************************************************************************* *                                TCP OPTION CONFIGURATION TYPE DEFINES * * Note(s) : (1) NET_TCP_OPT_CFG_TYPE_&&& #define values specifically chosen as ASCII representations of  *               the TCP option configuration types.  Memory displays of TCP option configuration buffers  *               will display the TCP option configuration TYPEs with their chosen ASCII names. ********************************************************************************************************* */                                                                 /* ---------------- TCP OPT CFG TYPES ----------------- */ #if     (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) #define  NET_TCP_OPT_CFG_TYPE_NONE                0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x4D535320u   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x57494E20u   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x53434B50u   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x5341434Bu   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x45524551u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x4543484Fu   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x54532020u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #else #if     (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_32) #define  NET_TCP_OPT_CFG_TYPE_NONE                0x454E4F4Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x2053534Du   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x204E4957u   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x504B4353u   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x4B434153u   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x51455245u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x4F484345u   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x20205354u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #elif   (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_16) #define  NET_TCP_OPT_CFG_TYPE_NONE                0x4F4E454Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x534D2053u   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x4957204Eu   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x4353504Bu   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x41534B43u   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x52455145u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x43454F48u   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x53542020u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #else                                                           /* Dflt CPU_WORD_SIZE_08.                               */ #define  NET_TCP_OPT_CFG_TYPE_NONE                0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x4D535320u   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x57494E20u   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x53434B50u   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x5341434Bu   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x45524551u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x4543484Fu   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x54532020u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #endif #endif /*$PAGE*/ /* ********************************************************************************************************* *                                   TCP CONNECTION TIMEOUT DEFINES * * Note(s) : (1) (a) (1) RFC #1122, Section 4.2.2.13 'DISCUSSION' states that "the graceful close algorithm *                       of TCP requires that the connection state remain defined on (at least) one end of *                       the connection, for a timeout period of 2xMSL ... During this period, the (remote  *                       socket, local socket) pair that defines the connection is busy and cannot be reused". * *                   (2) The following sections reiterate that the TIME-WAIT state timeout scalar is two *                       maximum segment lifetimes (2 MSL) : * *                       (A) RFC #793, Section 3.9 'Event Processing : SEGMENT ARRIVES : *                               Check Sequence Number : TIME-WAIT STATE' *                       (B) RFC #793, Section 3.9 'Event Processing : SEGMENT ARRIVES : *                               Check FIN Bit         : TIME-WAIT STATE' * *               (b) (1) RFC #793, Section 3.3 'Sequence Numbers : Knowing When to Keep Quiet' states that *                       "the Maximum Segment Lifetime (MSL) is ... to be 2 minutes.  This is an engineering *                       choice, and may be changed if experience indicates it is desirable to do so". * *                   (2) Microsoft Corporation's Windows XP defaults MSL to 15 seconds. ********************************************************************************************************* */                                                                                     /* Max seg timeout (see Note #1b) : */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_MIN_SEC   (  0u                           )   /* ... min  =  0 seconds            */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_MAX_SEC   (  2u * DEF_TIME_NBR_SEC_PER_MIN)   /* ... max  =  2 minutes            */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_DFLT_SEC  ( 15u                           )   /* ... dflt = 15 seconds            */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_SCALAR       2u                               /* ... scalar (see Note #1a).       */ #define  NET_TCP_CONN_TIMEOUT_CONN_DFLT_SEC     (120u * DEF_TIME_NBR_SEC_PER_MIN)   /* Dflt conn timeout = 120 minutes  */ #define  NET_TCP_CONN_TIMEOUT_USER_DFLT_SEC     ( 30u * DEF_TIME_NBR_SEC_PER_MIN)   /* Dflt user timeout =  30 minutes  */ /*$PAGE*/ /* ********************************************************************************************************* *                                        TCP CONNECTION STATES * * Note(s) : (1) See the following RFC's for TCP state machine summary : * *               (a) RFC # 793; Sections 3.2, 3.4, 3.5, 3.9 *               (b) RFC #1122; Sections 4.2.2.8, 4.2.2.10, 4.2.2.11, 4.2.2.13, 4.2.2.18, 4.2.2.20 * *           (2) (a) #### Additional closing-data-available state used for closing connections to allow the *                   application layer to receive any remaining data. * *                   See also 'net_tcp.c  NetTCP_RxPktConnHandlerFinWait1()  Note #2f5A2', *                            'net_tcp.c  NetTCP_RxPktConnHandlerFinWait2()  Note #2f5B', *                            'net_tcp.c  NetTCP_RxPktConnHandlerClosing()   Note #2d2B2a1B', *                          & 'net_tcp.c  NetTCP_RxPktConnHandlerLastAck()   Note #2d2A1b'. ********************************************************************************************************* */ #define  NET_TCP_CONN_STATE_NONE                           0u #define  NET_TCP_CONN_STATE_FREE                           1u #define  NET_TCP_CONN_STATE_CLOSED                        10u #define  NET_TCP_CONN_STATE_LISTEN                        20u #define  NET_TCP_CONN_STATE_SYNC_RXD                      30u #define  NET_TCP_CONN_STATE_SYNC_RXD_PASSIVE              31u #define  NET_TCP_CONN_STATE_SYNC_RXD_ACTIVE               32u #define  NET_TCP_CONN_STATE_SYNC_TXD                      35u #define  NET_TCP_CONN_STATE_CONN                          40u #define  NET_TCP_CONN_STATE_FIN_WAIT_1                    50u #define  NET_TCP_CONN_STATE_FIN_WAIT_2                    51u #define  NET_TCP_CONN_STATE_CLOSING                       52u #define  NET_TCP_CONN_STATE_TIME_WAIT                     53u #define  NET_TCP_CONN_STATE_CLOSE_WAIT                    55u #define  NET_TCP_CONN_STATE_LAST_ACK                      56u #define  NET_TCP_CONN_STATE_CLOSING_DATA_AVAIL            59u   /* See Note #2a.                                        */ /* ********************************************************************************************************* *                                     TCP CONNECTION QUEUE STATES ********************************************************************************************************* */ #define  NET_TCP_RX_Q_STATE_NONE                           0u #define  NET_TCP_RX_Q_STATE_CLOSED                       100u #define  NET_TCP_RX_Q_STATE_CLOSING                      101u #define  NET_TCP_RX_Q_STATE_SYNC                         110u #define  NET_TCP_RX_Q_STATE_CONN                         111u #define  NET_TCP_TX_Q_STATE_NONE                           0u #define  NET_TCP_TX_Q_STATE_CLOSED                       200u #define  NET_TCP_TX_Q_STATE_CLOSING                      201u #define  NET_TCP_TX_Q_STATE_SYNC                         210u #define  NET_TCP_TX_Q_STATE_CONN                         211u #define  NET_TCP_TX_Q_STATE_SUSPEND                      215u #define  NET_TCP_TX_Q_STATE_CLOSED_SUSPEND               220u #define  NET_TCP_TX_Q_STATE_CLOSING_SUSPEND              221u /*$PAGE*/ /* ********************************************************************************************************* *                                     TCP CONNECTION CODE DEFINES **************

    标签: tcp uCOS-II

    上传时间: 2015-11-22

    上传用户:the same kong

  • VIP专区-单片机源代码精选合集系列(72)

    eeworm.com VIP专区 单片机源码系列 71资源包含以下内容:1. PWM模块单片机的步进电机细分驱动的理论和方法介绍.pdf2. 基于状态分析的键盘管理软件设计.pdf3. 单片机的步进电机控制器设计介绍.pdf4. 单片机温度控制系统的设计及实现.pdf5. 基于单片机的步进电机细分技术介绍.pdf6. 基于单片机的太阳能电池自动跟踪系统的设计.zip7. 单片机的步进电机细分技术研究介绍.pdf8. 气体压缩因子Z的在线修正与单片机实现.pdf9. Emulating a synchronous serial.pdf10. 基于单片机的霍尔传感器测试系统介绍.pdf11. 使用软件程序仿真C500微控制器系列SSC(同步串行通道)功.pdf12. MPC106 PCI Bridge/Memory Contr.pdf13. 单片机以太网通讯的实现介绍.pdf14. MPC106 PCI桥/存储器控制器硬件规范说明.pdf15. USB Demonstration for DK3200 w.pdf16. 对带有uPSD3234A的DK3200的USB演示.pdf17. An easy way to work with Exter.pdf18. 用外部设备设置32位微控制器TriCore的中断的指令及方法.pdf19. P90CL301 I2C driver routines.pdf20. Input Signal Rise and Fall Tim.pdf21. P90CL301 IIC驱动电路的例行测试及其程序.pdf22. 用51单片机实现公历与农历星期的转换.pdf23. 介绍C16x系列微控制器的输入信号升降时序图及特性.pdf24. XA-S3 I2C driver software.pdf25. 万年历算法.pdf26. MCS-51单片机对步进电机控制的实现.pdf27. XA-S3的IIC接口的驱动器软件程序(C语言).pdf28. Reading and Writing iButtons v.pdf29. 通用单片机试验板原理图.pdf30. I2C slave routines for the 87L.pdf31. Philips微控制器在LIN中的应用.pdf32. MPC7400 Part Number Speci&THOR.pdf33. 87LPC76X的IIC从程序.pdf34. 基于P87C591的CAN总线系统智能节点设计.pdf35. MPC7400l零件号码规范说明.pdf36. Using the 87LPC76X microcontro.pdf37. Control System of Stepp ingMot.pdf38. 68HC05K0 Infra-red Remote Cont.pdf39. 87C576微控制器的在线编程.pdf40. CAN与RS232转换节点的设计与实现.pdf41. 68HC05K0实现红外远程控制键盘的应用.pdf42. 单片机外围线路设计.rar43. 单片机常用芯片和器件手册.rar44. IO口状态切换说明.pdf45. 中断技术.ppt.ppt46. 并行接口.ppt47. DMA技术 -ppt.ppt48. 结构紧凑的Li+电池充电器.pdf49. 定时与计数技术.ppt50. 微机总线与接口标准.ppt51. 中断的概念及51单片机的中断系统.ppt52. 输入输出与接口技术.ppt53. 单片机应用概述.ppt54. 现代微机原理与接口技术.rar55. 单片机应用系统设计的基本方法.ppt56. PCB可测性设计布线规则之建议―从源头改善可测率.pdf57. 单片机A/D和D/A应用接口技术.ppt58. 汇编语言上机过程.ppt.ppt59. PWM的调速原理与应用—小车调速.ppt60. 汇编语言在数据处理中的应用.ppt61. 定时器/计数器基础.ppt62. 驱动程序与应用程序的接口.doc63. 外部中断应用程序设计范例.ppt64. 实验指导书 (TPC-H实验台C语言版).pdf65. 汇编语言程序设计案例—动态显示/障碍物检测/障碍物方位检测.rar66. 指令功能及汇编语言程序设计.rar67. ispdown V2.3 最新版 (可用Altera下载线进.rar68. MCS-51单片机的编程应用范例.pdf69. 51编程指南--MCSÉ-51 Program.rar70. 多运动目标跟踪及连通域标记方法.pdf71. 很经典的仿真器自制资料.rar72. mcs-51指令集.rar73. 自制51单片机编程器.rar74. CAN总线与USB的转接技术.pdf75. 自制ATMEL 89系列FLASH单片机编程器.rar76. 基于ARM处理器LPC2142的高速数据采集卡设计.pdf77. 微机测量系统中的抗干扰措施.pdf78. PGM89 51Flash单片机编程器V3.0.rar79. 改善基于微控制器的应用的瞬态免疫性能.rar80. KEIL C51开发软件操作使用视频教程.rar81. 自制微型51/AVR通用编程器.rar82. C51单片机视频教程.RAR83. 自制51编程器资料.rar84. 基于单片机89C51和89C2051点阵LED图文显示.pdf85. 全遥控6声道AV机的汇编程序.rar86. keil c51中文说明.pdf87. 基于AT89C2051的红外遥控学习器源程序.rar88. 微型计算机课程设计论文—通用微机发声程序的汇编设计.rar89. 从PCI总线的-12V电源获得3.3V电压.pdf90. DS1302+AT89S52+LED时钟程序(C语言源代码+.rar91. 乐曲发声及动画程序.rar92. 单片开关电源的设计和应用.rar93. 51单片机试验板电路图-原理图.rar94. DS1820 C51 子程序 (一线数据传输).doc95. 模拟串口通讯程序(51汇编代码编写).doc96. 8051单片机教程 (word版).rar97. 串行编程器源程序(Keil C语言).rar98. 用C51写的普通拼音输入法源程序代码.zip99. EasyIsp下载线电路图.rar100. 采用18b20芯片的温度测量C51源程序.rar

    标签: 传感器 检测技术

    上传时间: 2013-06-02

    上传用户:eeworm

  • VIP专区-嵌入式/单片机编程源码精选合集系列(3)

    VIP专区-嵌入式/单片机编程源码精选合集系列(3)资源包含以下内容:1. 周立功dp1581usb2.0实验仪.2. 周立功dp1581usb2.0实验仪.3. HT1380驱动程序.4. T6963控制器的液晶驱动程序.5. 建立在组态环境TRACEMODE基础下.6. GA仿真软件的说明书.7. lcd1602驱动 iic驱动 spi驱动 ir驱动.8. lcd1602驱动.9. iic驱动源程序.10. ir发射子程序源码.11. ir驱动源码cyuyan.12. spi源程序c语言的.13. 费很多力才找到的PIC C18编译器.14. 文件系统管理 在内存中为文件开辟存储空间 可以创建文件和文件夹 (至少有两级目录 :模拟DOS文件系统的操作 可以存储文件的内容 可以查看删除和修改文件(15 2.15. 十字路口交通灯管理 现对交通信号灯进行管理.16. 本设计的基本要求是以复杂可编程逻辑器件CPLD为基础.17. 通过对计算机的组织与结构的分析.18. 家电控制器代码.19. AM29lv160的编程代码.20. eeprom连续页写模式.21. sle4442 I2C 逻辑加密卡驱动程序.22. 怎样在CodeVision中使用结构型数组的用法实例1.23. AVR下载电路图.24. PING实现嵌入式原程序.25. TCP实现嵌入式原程序.26. UDP实现嵌入式原程序.27. TELNET实现嵌入式原程序.28. WEBSERVER实现嵌入式原程序.29. 用SAM72N9写的电子秤文档.30. ZLG USB 套件.31. ZLG USB 套件.32. ZLG USB 套件.33. rtlinux-3.1源代码.34. rtai-3.1-test3的源代码(Real-Time Application Interface ).35. 可重用的GDB Stub源代码,支持多种嵌入式平台和体系结构..36. 用C语言实现PIC的LCD显示.37. 红外编程.38. IO口模拟串口通讯C源程序.39. I/O board control program for U.C.W./Sirael Dana robot..40. PCI接口的Verilog源代码.

    标签: 微型计算机 汇编语言 程序设计

    上传时间: 2013-07-16

    上传用户:eeworm