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

📄 cpfifo_h-source.html

📁 Controller Area Network Programming Interface Environment Ver0.8。 CanPie版本0.8. CAN总线通讯编程接口源代码。
💻 HTML
字号:
<HTML><HEAD><TITLE>cpfifo.h Source File</TITLE><LINK HREF="micro.css" REL="stylesheet" TYPE="text/css"></HEAD><BODY BGCOLOR="#FFFFFF"><a name="PageTop"></a><!------ Document Header -------------------------------------------><table border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><img src="pictures/maphead.gif" vspace="0" border="0" height="20"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><a href="index.html"><img src="pictures/button_index.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom"><a href="files.html"><img src="pictures/button_files.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom"><a href="globals.html"><img src="pictures/button_funcs.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom" width="80">&nbsp;</td><td valign="bottom"><a href="annotated.html"><img src="pictures/button_structs.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom"><a href="functions.html"><img src="pictures/button_members.gif" vspace="0" border="0" height="25"></a></td></tr></table><hr noshade width=680 size=1 align=left><!------ Document Start --------------------------------------------><table width=680><tr><td><!-- Generated by Doxygen 1.2.6 --><h1>cpfifo.h</h1><a href="cpfifo_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*****************************************************************************\</font>00002 <font class="comment">*  CANpie                                                                     *</font>00003 <font class="comment">*                                                                             *</font>00004 <font class="comment">*  File        : cpfifo.h                                                     *</font>00005 <font class="comment">*  Description :                                                              *</font>00006 <font class="comment">*  Author      : Uwe Koppe                                                    *</font>00007 <font class="comment">*  e-mail      : koppe@microcontrol.net                                       *</font>00008 <font class="comment">*                                                                             *</font>00009 <font class="comment">* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *</font>00010 <font class="comment">*                                                                             *</font>00011 <font class="comment">*   This program is free software; you can redistribute it and/or modify      *</font>00012 <font class="comment">*   it under the terms of the GNU General Public License as published by      *</font>00013 <font class="comment">*   the Free Software Foundation; either version 2 of the License, or         *</font>00014 <font class="comment">*   (at your option) any later version.                                       *</font>00015 <font class="comment">*                                                                             *</font>00016 <font class="comment">* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *</font>00017 <font class="comment">*                                                                             *</font>00018 <font class="comment">*  History                                                                    *</font>00019 <font class="comment">*  Vers.    Date        Comment                                         Aut.  *</font>00020 <font class="comment">*  -----    ----------  ---------------------------------------------   ----  *</font>00021 <font class="comment">*  0.1      04.09.1999  Initial version                                 UK    *</font>00022 <font class="comment">*  0.2      18.01.2000  Fixed bug in pointer calculation                UK    *</font>00023 <font class="comment">*  0.3                  - no changes -                                        *</font>00024 <font class="comment">*  0.4                  - no changes -                                        *</font>00025 <font class="comment">*  0.5                  - no changes -                                        *</font>00026 <font class="comment">*  0.6      15.06.2000  added fixed FIFO size support                   UK    *</font>00027 <font class="comment">*                       set to CANpie release 0.6                             *</font>00028 <font class="comment">*  0.7      30.11.2000  Bugfix for static FIFO (overflow)               UK    *</font>00029 <font class="comment">*  0.8      14.02.2001  complete rewrite, check FIFO status             UK    *</font>00030 <font class="comment">*                                                                             *</font>00031 <font class="comment">\*****************************************************************************/</font>00032 00033 00034 <font class="preprocessor">#ifndef  _CANpie_Fifo_</font>00035 <font class="preprocessor"></font><font class="preprocessor">#define  _CANpie_Fifo_</font>00036 <font class="preprocessor"></font>00037 00038 <font class="preprocessor">#include "<a class="code" href="cpconst_h.html">cpconst.h</a>"</font>00039 00040 <font class="comment">/*-----------------------------------------------------------------------------</font>00041 <font class="comment">**    Online documentation for Doxygen</font>00042 <font class="comment">*/</font>00043 00060 <font class="comment">/*-------------------------------------------------------------------------</font>00061 <font class="comment">** A driver with only one channel and small memory resources does not need</font>00062 <font class="comment">** the 'channel' parameter.</font>00063 <font class="comment">** The definition CP_SMALL_CODE is checked for the value '1' and the</font>00064 <font class="comment">** function prototypes are converted then. The function call in the</font>00065 <font class="comment">** application stays the same (with 'channel' parameter).</font>00066 <font class="comment">**</font>00067 <font class="comment">*/</font>00068 <font class="preprocessor">#if   CP_SMALL_CODE == 1</font>00069 <font class="preprocessor"></font>00070 <font class="preprocessor">#define  channel  0</font>00071 <font class="preprocessor"></font>00072 <font class="preprocessor">#if   CP_FIFO_TYPE == 1</font>00073 <font class="preprocessor"></font><font class="preprocessor">#define  CpFifoSetup(CH, A, B)               CpFifoSetup(A)</font>00074 <font class="preprocessor"></font><font class="preprocessor">#else</font>00075 <font class="preprocessor"></font><font class="preprocessor">#define  CpFifoSetup(CH, A, B)               CpFifoSetup(A, B)</font>00076 <font class="preprocessor"></font><font class="preprocessor">#endif</font>00077 <font class="preprocessor"></font>00078 <font class="preprocessor">#define  CpFifoRemove(CH, A)                 CpFifoRemove(A)</font>00079 <font class="preprocessor"></font><font class="preprocessor">#define  CpFifoClear(CH, A)                  CpFifoClear(A)</font>00080 <font class="preprocessor"></font><font class="preprocessor">#define  CpFifoPush(CH, A, B)                CpFifoPush(A, B)</font>00081 <font class="preprocessor"></font><font class="preprocessor">#define  CpFifoPop(CH, A, B)                 CpFifoPop(A, B)</font>00082 <font class="preprocessor"></font>00083 <font class="preprocessor">#endif</font>00084 <font class="preprocessor"></font>00085 00086 <font class="comment">/*-------------------------------------------------------------------------</font>00087 <font class="comment">** Definitions for static size of FIFOs</font>00088 <font class="comment">** size is given in number of messages</font>00089 <font class="comment">**</font>00090 <font class="comment">*/</font>00091 <font class="preprocessor">#define  CP_FIFO_RCV_SIZE     2</font>00092 <font class="preprocessor"></font><font class="preprocessor">#define  CP_FIFO_TRM_SIZE     8</font>00093 <font class="preprocessor"></font>00094 00095 00096 <font class="comment">/*-------------------------------------------------------------------------</font>00097 <font class="comment">** Function prototypes</font>00098 <font class="comment">**</font>00099 <font class="comment">*/</font>00100 00101 00120 _U08 Cp_PREFIX <a class="code" href="cpfifo_h.html#a2">CpFifoSetup</a>(_U08 channel, _U08 buffer, _U16 size);00121 00122 00140 _U08 Cp_PREFIX <a class="code" href="cpfifo_h.html#a3">CpFifoRemove</a>(_U08 channel, _U08 buffer);00141 00142 00159 _U08 Cp_PREFIX <a class="code" href="cpfifo_h.html#a4">CpFifoClear</a>(_U08 channel, _U08 buffer);00160 00161 00179 _U08 Cp_PREFIX <a class="code" href="cpfifo_h.html#a5">CpFifoPush</a>(_U08 channel, _U08 buffer, <a class="code" href="struct_CpStruct_CAN.html">CpStruct_CAN</a> * msgPtr);00180 00181 00200 _U08 Cp_PREFIX <a class="code" href="cpfifo_h.html#a6">CpFifoPop</a>(_U08 channel, _U08 buffer, <a class="code" href="struct_CpStruct_CAN.html">CpStruct_CAN</a> * msg);00201 00202 00203 <font class="preprocessor">#endif   </font><font class="comment">/* _CANpie_Fifo_ */</font></pre></div></td></tr></table><!------ Document footer -------------------------------------------><p><br><map name="FooterMap"><area shape=rect coords="  1, 1, 100, 20" href="#PageTop"><area shape=rect coords="400, 1, 500, 20" href="mailto:koppe@microcontrol.net?Subject=CANpie"></map><table width="600" border="0" bgcolor="#FFFFFF" cellspacing="0"><tr><td><IMG src="pictures/mapfoot.gif" border="0" usemap="#FooterMap"></td></tr><!------ print modification date -----------------------------------><tr><td align="right"><h4>Last modified: 10 Jul 2001</h4></td></tr></table>	</body></html>

⌨️ 快捷键说明

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