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

📄 system_8h-source.html

📁 Freescale mcu OpenTCP-1.0.4.doc.html.zip 文档
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>/opentcp/include/inet/system.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindex" href="examples.html">Examples</a> &nbsp; </center><hr><h1>/opentcp/include/inet/system.h</h1><a href="system_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> *Copyright (c) 2000-2002 Viola Systems Ltd.</span>00003 <span class="comment"> *All rights reserved.</span>00004 <span class="comment"> *</span>00005 <span class="comment"> *Redistribution and use in source and binary forms, with or without </span>00006 <span class="comment"> *modification, are permitted provided that the following conditions </span>00007 <span class="comment"> *are met:</span>00008 <span class="comment"> *</span>00009 <span class="comment"> *1. Redistributions of source code must retain the above copyright </span>00010 <span class="comment"> *notice, this list of conditions and the following disclaimer.</span>00011 <span class="comment"> *</span>00012 <span class="comment"> *2. Redistributions in binary form must reproduce the above copyright </span>00013 <span class="comment"> *notice, this list of conditions and the following disclaimer in the </span>00014 <span class="comment"> *documentation and/or other materials provided with the distribution.</span>00015 <span class="comment"> *</span>00016 <span class="comment"> *3. The end-user documentation included with the redistribution, if </span>00017 <span class="comment"> *any, must include the following acknowledgment:</span>00018 <span class="comment"> *      "This product includes software developed by Viola </span>00019 <span class="comment"> *      Systems (http://www.violasystems.com/)."</span>00020 <span class="comment"> *</span>00021 <span class="comment"> *Alternately, this acknowledgment may appear in the software itself, </span>00022 <span class="comment"> *if and wherever such third-party acknowledgments normally appear.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> *4. The names "OpenTCP" and "Viola Systems" must not be used to </span>00025 <span class="comment"> *endorse or promote products derived from this software without prior </span>00026 <span class="comment"> *written permission. For written permission, please contact </span>00027 <span class="comment"> *opentcp@opentcp.org.</span>00028 <span class="comment"> *</span>00029 <span class="comment"> *5. Products derived from this software may not be called "OpenTCP", </span>00030 <span class="comment"> *nor may "OpenTCP" appear in their name, without prior written </span>00031 <span class="comment"> *permission of the Viola Systems Ltd.</span>00032 <span class="comment"> *</span>00033 <span class="comment"> *THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED </span>00034 <span class="comment"> *WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF </span>00035 <span class="comment"> *MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. </span>00036 <span class="comment"> *IN NO EVENT SHALL VIOLA SYSTEMS LTD. OR ITS CONTRIBUTORS BE LIABLE </span>00037 <span class="comment"> *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR </span>00038 <span class="comment"> *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF </span>00039 <span class="comment"> *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR </span>00040 <span class="comment"> *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, </span>00041 <span class="comment"> *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE </span>00042 <span class="comment"> *OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, </span>00043 <span class="comment"> *EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>00044 <span class="comment"> *====================================================================</span>00045 <span class="comment"> *</span>00046 <span class="comment"> *OpenTCP is the unified open source TCP/IP stack available on a series </span>00047 <span class="comment"> *of 8/16-bit microcontrollers, please see &lt;http://www.opentcp.org&gt;.</span>00048 <span class="comment"> *</span>00049 <span class="comment"> *For more information on how to network-enable your devices, or how to </span>00050 <span class="comment"> *obtain commercial technical support for OpenTCP, please see </span>00051 <span class="comment"> *&lt;http://www.violasystems.com/&gt;.</span>00052 <span class="comment"> */</span>00053 00064 <span class="preprocessor">#ifndef SYSTEM_H_INCLUDE</span>00065 <span class="preprocessor"></span><span class="preprocessor">#define SYSTEM_H_INCLUDE</span>00066 <span class="preprocessor"></span>00067 <span class="preprocessor">#include &lt;<a class="code" href="datatypes_8h.html">inet/datatypes.h</a>&gt;</span>00068 <span class="preprocessor">#include &lt;<a class="code" href="globalvariables_8h.html">inet/globalvariables.h</a>&gt;</span><a name="l00075"></a><a class="code" href="system_8h.html#a0">00075</a> <span class="preprocessor">#define OPENTCP_VERSION "1.0.4"</span>00076 <span class="preprocessor"></span>00077 <span class="comment">/* Boolean      values*/</span><a name="l00078"></a><a class="code" href="system_8h.html#a1">00078</a> <span class="preprocessor">#define TRUE  1 </span><a name="l00079"></a><a class="code" href="system_8h.html#a2">00079</a> <span class="preprocessor">#define FALSE 0 </span><a name="l00091"></a><a class="code" href="group__opentcp__config.html#a4">00091</a> <span class="preprocessor">#define NETWORK_TX_BUFFER_SIZE  1024                    </span>00092 <span class="preprocessor"></span><a name="l00100"></a><a class="code" href="structnetif.html">00100</a> <span class="keyword">struct </span><a class="code" href="structnetif.html">netif</a>{<a name="l00119"></a><a class="code" href="structnetif.html#m0">00119</a>         LWORD   <a class="code" href="structnetif.html#m0">localip</a>;00120         <a name="l00128"></a><a class="code" href="structnetif.html#m1">00128</a>         BYTE    <a class="code" href="structnetif.html#m1">localHW</a>[6];00129         <a name="l00136"></a><a class="code" href="structnetif.html#m2">00136</a>         LWORD   <a class="code" href="structnetif.html#m2">defgw</a>;00137         <a name="l00145"></a><a class="code" href="structnetif.html#m3">00145</a>         LWORD   <a class="code" href="structnetif.html#m3">netmask</a>;00146 };00147 00148 <span class="comment">/* System variable definitions  */</span>00149 <a name="l00150"></a><a class="code" href="system_8h.html#a4">00150</a> <span class="preprocessor">#define MASTER_MS_CLOCK         base_timer              </span><a name="l00151"></a><a class="code" href="system_8h.html#a5">00151</a> <span class="preprocessor">#define TXBUF   net_buf         </span>00153 <span class="preprocessor"></span><span class="comment">/*      System macros           */</span>00154 <a name="l00163"></a><a class="code" href="system_8h.html#a6">00163</a> <span class="preprocessor">#define RESET_SYSTEM()  while(1)                </span><span class="comment">/* Let the watchdog bite        */</span>00164 <a name="l00176"></a><a class="code" href="system_8h.html#a7">00176</a> <span class="preprocessor">#define OS_EnterCritical        __DI</span>00177 <span class="preprocessor"></span><a name="l00189"></a><a class="code" href="system_8h.html#a8">00189</a> <span class="preprocessor">#define OS_ExitCritical         __EI</span>00190 <span class="preprocessor"></span><a name="l00210"></a><a class="code" href="system_8h.html#a9">00210</a> <span class="preprocessor">#define RECEIVE_NETWORK_B()                             inNE2000again()</span>00211 <span class="preprocessor"></span><a name="l00220"></a><a class="code" href="system_8h.html#a10">00220</a> <span class="preprocessor">#define RECEIVE_NETWORK_BUF(c,d)                inNE2000againbuf(c,d)</span>00221 <span class="preprocessor"></span><a name="l00240"></a><a class="code" href="system_8h.html#a11">00240</a> <span class="preprocessor">#define SEND_NETWORK_B(c)                               outNE2000again(c)</span>00241 <span class="preprocessor"></span><a name="l00248"></a><a class="code" href="system_8h.html#a12">00248</a> <span class="preprocessor">#define SEND_NETWORK_BUF(c,d)                   outNE2000againbuf(c,d)</span>00249 <span class="preprocessor"></span><a name="l00262"></a><a class="code" href="group__periodic__functions.html#a7">00262</a> <span class="preprocessor">#define NETWORK_CHECK_IF_RECEIVED()     NE2000ReceiveFrame()</span>00263 <span class="preprocessor"></span><a name="l00270"></a><a class="code" href="system_8h.html#a14">00270</a> <span class="preprocessor">#define NETWORK_RECEIVE_INITIALIZE(c)   NE2000DMAInit_position(c)</span>00271 <span class="preprocessor"></span><a name="l00279"></a><a class="code" href="group__periodic__functions.html#a8">00279</a> <span class="preprocessor">#define NETWORK_RECEIVE_END()                   NE2000DumpRxFrame()</span>00280 <span class="preprocessor"></span><a name="l00288"></a><a class="code" href="system_8h.html#a16">00288</a> <span class="preprocessor">#define NETWORK_COMPLETE_SEND(c)                NE2000SendFrame(c)</span>00289 <span class="preprocessor"></span><a name="l00296"></a><a class="code" href="system_8h.html#a17">00296</a> <span class="preprocessor">#define NETWORK_SEND_INITIALIZE(c)              InitTransmission(c)</span>00297 <span class="preprocessor"></span><a name="l00306"></a><a class="code" href="system_8h.html#a18">00306</a> <span class="preprocessor">#define NETWORK_ADD_DATALINK(c)                 NE2000WriteEthernetHeader(c)</span>00307 <span class="preprocessor"></span>00308 00309 <span class="comment">/* System functions     */</span>00310 00311 <span class="keyword">extern</span> <span class="keywordtype">void</span> kick_WD(<span class="keywordtype">void</span>);00312 <span class="keyword">extern</span> <span class="keywordtype">void</span> wait(INT16);00313 <span class="keyword">extern</span> <span class="keywordtype">void</span> enter_power_save(<span class="keywordtype">void</span>);00314 <span class="keyword">extern</span> <span class="keywordtype">void</span> exit_power_save(<span class="keywordtype">void</span>);00315 <span class="keyword">extern</span> INT16 strlen(UINT8*, UINT16);00316 <span class="keyword">extern</span> INT16 bufsearch(UINT8*, UINT16, UINT8*);00317 <span class="keyword">extern</span> UINT16 hextoascii(UINT8);00318 <span class="keyword">extern</span> <span class="keywordtype">void</span> itoa(UINT16, UINT8*);00319 <span class="keyword">extern</span> <span class="keywordtype">void</span> ltoa(UINT32, UINT8*);00320 <span class="keyword">extern</span> INT16 atoi(UINT8*, UINT8);00321 <span class="keyword">extern</span> UINT8 asciitohex(UINT8);00322 <span class="keyword">extern</span> UINT8 isnumeric(UINT8);00323 <span class="keyword">extern</span> <span class="keywordtype">void</span> mputs(UINT8*);00324 <span class="keywordtype">void</span> mputhex(UINT8 );00325 <span class="keyword">extern</span> UINT32 random(<span class="keywordtype">void</span>);00326 <span class="keyword">extern</span> <span class="keywordtype">void</span> dummy(<span class="keywordtype">void</span>);00327 00328 <span class="comment">/*      External functions      */</span>00329 00330 <span class="keyword">extern</span> <span class="keywordtype">void</span> init(<span class="keywordtype">void</span>);00331 00332 00333 <span class="preprocessor">#endif</span>00334 <span class="preprocessor"></span>00335 00336 00337 00338 </pre></div><hr><address style="align: right;"><small>Generated on Sun Aug 3 20:32:59 2003 for OpenTCP by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

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