Introduction Sometimes you may collide with the following problem: a third-party binary component or control embedded into your application DISPLAYs windows (usually message boxes) that hang your code until they are closed. If you do not have the source code of this binary and one does not have a good API to change one’s bad behaviour programmatically, it can be a real headache using the one. A famous example of such a binary is the WebBrowser control in .NET.
標(biāo)簽: Introduction third-party Sometimes following
上傳時(shí)間: 2013-12-31
上傳用戶(hù):pinksun9
program which uses hashing techniques for storing and retrieving the data. Input to the program: Some random numbers. Input will be from a file. Output: First the program reads all the input and store it properly using some hash techniques. Once your program reads the complete input,it waits for the user input (prompt to the user). User now enters some number.program DISPLAYs if this number exists in the list or not. it also display the time taken in the search operation.
標(biāo)簽: program techniques retrieving the
上傳時(shí)間: 2017-04-27
上傳用戶(hù):shus521
Video-DVM is a very cheap DVM that shows how an output as complex as a videocomposite signal can be generated entirely in software: two I/O pins and three resistors are all the hardware required. Connected to any TV set it DISPLAYs voltages, included max and min peaks, using both giant digits and an analog bar-display . A serial data output for computer data logging is provided, too.
標(biāo)簽: videocomposite Video-DVM complex output
上傳時(shí)間: 2014-12-09
上傳用戶(hù):xuan‘nian
The i-mode service by NTT DoCoMo is a mobile phone service in Japan that provides its customers with both voice and comprehensive data services. With an i-mode phone, users can exchange i-mode e-mail and obtain information from i-mode menu sites and i-mode compatible Internet sites. The i-mode phone contains a browser that DISPLAYs i-mode compatible HTML web pages. Beginning with the 505i phones, you can view Macromedia Flash Lite movies from the i-mode browser. You can also use the phones’ My Picture and Standby Screen applications to view Flash Lite movies. Although a number of manufacturers produce 505i phones, all of them support the same Flash Lite functionality.
標(biāo)簽: service customers provides DoCoMo
上傳時(shí)間: 2014-10-25
上傳用戶(hù):xmsmh
A design about 8051 (running at 12MHz) based system with 3 7-Seg DISPLAYs and two buttons to implement the following functions. 1. When press the + button, the display C = A+B. 2. When press the button, the display C = A - B. “A” and “B” are 8-bit inputs when “C” is 9-bit output.
上傳時(shí)間: 2015-05-05
上傳用戶(hù):guoxiy
/* ********************************************************************************************************* * 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 **************
上傳時(shí)間: 2015-11-22
上傳用戶(hù):the same kong
設(shè)計(jì)了農(nóng)業(yè)溫濕度智能控制系統(tǒng),該系統(tǒng)采用DHT11溫濕度傳感器作為溫濕度采集模塊,單片機(jī)選用AT89C52代替并調(diào)用Virtual terminal模擬串口通信,LCD1604液晶顯示器實(shí)時(shí)顯示溫濕度,實(shí)現(xiàn)了溫濕度的測(cè)量、顯示,可自動(dòng)控制加熱、降溫、加濕、通風(fēng),實(shí)現(xiàn)溫濕度控制以及超限報(bào)警處理,并利用Proteus與Keil進(jìn)行實(shí)際電路的仿真。試驗(yàn)表明,該系統(tǒng)實(shí)現(xiàn)了可靠的溫濕度監(jiān)控。We described the design of an intelligent control system of agriculture temperature and humidity.The system uses DHT11 temperature and humidity sensor as the temperature and humidity acquisition module.The SCM adopts AT89C52 to replace and call the virtual terminal for simulating serial communication.LCD1604 DISPLAYs temperature and humidity in real time,which implements the measurement and display of temperature and humidity.The system is able to automatically control heating,cooling,humidification and ventilation,to achieve temperature and humidity control and over-limit alarm processing.The system also uses Proteus and Keil for actual circuit simulation.The experiment shows that the system is capable of reliable temperature and humidity monitoring.
標(biāo)簽: at89c52 溫濕度智能控制系統(tǒng)
上傳時(shí)間: 2022-03-26
上傳用戶(hù):aben
LED 線(xiàn)陣顯示裝置, 分為 LED 線(xiàn)性旋轉(zhuǎn)顯示主機(jī)和圖文錄入器兩部分。主機(jī)用直流電機(jī)帶動(dòng)由紅綠 LED 組成的線(xiàn)陣旋轉(zhuǎn), 同時(shí)線(xiàn)陣按照時(shí)序依次切換顯示狀態(tài), 在固定區(qū)域利用視覺(jué)暫留效果形成 16×16 點(diǎn)陣, 用以顯示圖文;圖文錄入器用 HMI 觸控屏作為人機(jī)交互界面, 實(shí)現(xiàn)圖文錄入和回放功能。主機(jī)與圖文錄入器通過(guò)無(wú)線(xiàn)通信方式進(jìn)行信息交互,可由圖文錄入器控制主機(jī)切換不同工作任務(wù), 以及改變線(xiàn)陣顯示內(nèi)容。The LED linear array display device is divided into two parts:the one is the main unit used to display content,and the other one is used to input the contents.The main unit is driven by a DC motor to rotate the linear array composed by red and green light emitting diodes.At the same time,the 16×16 dot matrix that switching the display state according to the time sequence on the main unit DISPLAYs pictures and texts in the fixed area,by using the visual temporary effect.The HMI touch screen is used as human machine interface to realize the function that input and playback pictures and texts.The two parts of the device communicate with each other through wireless communication.The image and text input controller can control the main unit to switch different tasks and change the content of linear array displayed.
標(biāo)簽: stc12c5a60s2 單片機(jī) led
上傳時(shí)間: 2022-03-28
上傳用戶(hù):jiabin
本設(shè)計(jì)介紹了一種基于STM32單片機(jī)控制的智能水杯,可利用插口式電源或無(wú)線(xiàn)充電底座為加熱器提供能量,并在達(dá)到某種飲品所需溫度時(shí)進(jìn)行保溫。水杯內(nèi)置充電電池,可選用USB接口或無(wú)線(xiàn)充電。在水杯內(nèi)部設(shè)置無(wú)線(xiàn)模塊,用戶(hù)利用手機(jī)App與水杯進(jìn)行匹配進(jìn)行加熱操作,加熱完后水杯會(huì)通過(guò)手機(jī)App和液晶顯示屏實(shí)時(shí)反饋液體溫度,通過(guò)指示燈顯示電量情況等,給用戶(hù)進(jìn)行提醒。該智能水杯設(shè)計(jì)創(chuàng)新,實(shí)用價(jià)值較高。This paper introduces an intelligent water cup based by STM32 microcontroller,it can provide energy for the heater by socket type power supply or wireless charging base,and hold temperature needed for some kind of drink.Builtedin rechargeable battery,water cup can use USB or wireless charging.The wireless module is set up inside it,and customers can use mobile App to match and heat.After heating,water cup feeds back liquid temperature through the mobile App,and then DISPLAYs on LCD,reminds users through the indicator light.The intelligent water cup is designed innovatively and has high practical value.
上傳時(shí)間: 2022-03-28
上傳用戶(hù):
VIP專(zhuān)區(qū)-嵌入式/單片機(jī)編程源碼精選合集系列(65)資源包含以下內(nèi)容:1. DM9161應(yīng)用電路原理圖來(lái)自DAVICOM網(wǎng)站。需要的可以自由下載.2. ALTERA CPLD器件的配置與下載,貢獻(xiàn)給初學(xué)習(xí)者,非長(zhǎng)有用.3. This design package includes reference materials for creating a USB - PS/2 combination mouse that a.4. 字符表示的十六進(jìn)制數(shù)轉(zhuǎn)化為相應(yīng)的整數(shù)    錯(cuò)誤則返回    -1   .5. C51的12864m.6. 8個(gè)字LED點(diǎn)陣的顯示程序.7. 51+ch375超級(jí)經(jīng)典的U盤(pán)讀寫(xiě)程序嘿嘿趕快下載把.8. PWM控制電機(jī)C程序-已通過(guò)實(shí)驗(yàn)測(cè)試 PWM控制精確控制電機(jī)的轉(zhuǎn)動(dòng)..9. C51串口單工通訊程序一成功通過(guò)測(cè)試,請(qǐng)放心下載.10. 來(lái)自網(wǎng)上好心人的好東東,關(guān)于SD卡讀寫(xiě)的,內(nèi)附protel原理圖.11. 設(shè)計(jì)輸入 ! 多種設(shè)計(jì)輸入方法 – Quartus II • 原理圖式圖形設(shè)計(jì)輸入 • 文本編輯 – AHDL, VHDL, Verilog • 內(nèi)存編輯 .12. 全是FPGA的例子 對(duì)大家應(yīng)該有好處 大家趕快下把 知識(shí)不等人.13. 此為編程代碼示例.14. 此為編程代碼示例.15. 我在spartan-3e starter kit 的板上實(shí)現(xiàn)了mc8051.16. 完成MP3播放功能.17. 一個(gè)關(guān)于實(shí)時(shí)時(shí)鐘驅(qū)動(dòng)方面的程序(ARM7).18. 遍歷二叉樹(shù)的4個(gè)非遞歸算法 vc編程基礎(chǔ).19. 快速排序的非遞歸算法 vc編程練習(xí).20. 雷達(dá)高頻接收機(jī).21. 我的開(kāi)發(fā)板的所有測(cè)試程序.22. ps2的驅(qū)動(dòng).23. 密度測(cè)試儀的源碼.24. 本程序主要內(nèi)容18b20+s52+uart單點(diǎn)測(cè)溫詳細(xì)c51程序.25. CPLD 9536 程序 我自己用的代碼. VHDL語(yǔ)言.26. AMD嵌入式處理器AU1200開(kāi)發(fā)板原理圖.27. cpld3128開(kāi)發(fā)板的原理圖 很有用,已經(jīng)做成PCB,需要的話(huà)可以聯(lián)系我.28. ertfs文件系統(tǒng)里面既有完整ucos程序.29. 基于atmega128的交通信號(hào)燈控制程序.30. 利用軟件編寫(xiě)的I2C傳輸界面程序,適用于現(xiàn)有4位機(jī)等匯編語(yǔ)言中!.31. I2C控制程序,供大家學(xué)習(xí)參考,使用時(shí)根據(jù)自己的系統(tǒng)修改..32. This designs uses a Nios II system to demonstrate how to read from the SD card. The software reads W.33. his design is the initial design when the board is powered-up. It increments a counter and DISPLAYs.34. 用于多于9個(gè)串口的ce驅(qū)動(dòng)程序。時(shí)間倉(cāng)促。可以參考.35. CSD卡的dos驅(qū)動(dòng)程序源碼.36. ADT700的小程序.37. 嵌入式的小程序.38. 基于cpld的hdb3編碼器 基于cpld的hdb3編碼器.39. 基于cpld的交通燈設(shè)計(jì) ?赾pld的交通燈設(shè)計(jì).40. 用于ARM9系列的S3C2440A的bootloader,Linux平臺(tái).
標(biāo)簽: 固件
上傳時(shí)間: 2013-04-15
上傳用戶(hù):eeworm
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1