📄 cpuser_h.html
字号:
Cp_EXPORT _U08 Cp_PREFIX CpUserFilterAll ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b>_BIT <em>enable</em> ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Set global filter.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>enable</em> </td><td>TRUE for accepting all identifiers, FALSE for rejecting all identifiers<p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>Error code taken from the CpErr enumeration. If no error occured, the function will return CpErr_OK.<p></dl>This function enables or disables the reception of CAN messages. If the flag <b>enable</b> is set to TRUE, all incoming CAN messages are accepted. If the flag <b>enable</b> is set to FALSE, all CAN messages are rejected. Please notice that this function only works for standard messages (2.0A, 11 bit identifier). This function is only available, if the member <b>SupportSWFilter</b> of the HDI structure (<a class="el" href="struct_CpStruct_HDI.html">CpStruct_HDI</a>) is set to TRUE. </td> </tr></table><a name="a5" doxytag="cpuser.h::CpUserFilterMsg"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> Cp_EXPORT _U08 Cp_PREFIX CpUserFilterMsg ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b>_U16 <em>id</em>, </b></td> </tr> <tr> <td></td> <td><b>_BIT <em>enable</em> ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Set filter for single message.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>id</em> </td><td>value of the identifier </td></tr><tr><td valign=top><em>enable</em> </td><td>TRUE for accepting an identifier, FALSE for rejecting an identifier<p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>Error code taken from the CpErr enumeration. If no error occured, the function will return CpErr_OK.<p></dl>This function sets a filter for CAN messages. If the flag <b>enable</b> is set to TRUE, the CAN identifier <b>id</b> is accepted. If the flag <b>enable</b> is set to FALSE, the reception of messages with the identifier <b>id</b> is not possible. Please notice that this function only works for standard messages (2.0A, 11 bit identifier). This function is only available, if the member <b>SupportSWFilter</b> of the HDI structure (<a class="el" href="struct_CpStruct_HDI.html">CpStruct_HDI</a>) is set to TRUE. </td> </tr></table><a name="a6" doxytag="cpuser.h::CpUserIntFunctions"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> Cp_EXPORT _U08 Cp_PREFIX CpUserIntFunctions ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b>_U08(* <em>rx_handler</em>)(<a class="el" href="struct_CpStruct_CAN.html">CpStruct_CAN</a> *), </b></td> </tr> <tr> <td></td> <td><b>_U08(* <em>tx_handler</em>)(<a class="el" href="struct_CpStruct_CAN.html">CpStruct_CAN</a> *), </b></td> </tr> <tr> <td></td> <td><b>_U08(* <em>err_handler</em>)(_U08) ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Install callback functions.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>rx_handler</em> </td><td>Pointer to callback function which handles the receive interrupt of the CAN controller </td></tr><tr><td valign=top><em>tx_handler</em> </td><td>Pointer to callback function which handles the transmit interrupt of the CAN controller </td></tr><tr><td valign=top><em>err_handler</em> </td><td>Pointer to callback function which handles the error interrupt of the CAN controller<p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>Error code taken from the CpErr enumeration. If no error occured, the function will return CpErr_OK.<p></dl>This function will install three different callback routines in the interrupt handler. If you do not want to install a callback for a certain interrupt condition or disable the callback, the parameter must be set to NULL. </td> </tr></table><a name="a7" doxytag="cpuser.h::CpUserMsgRead"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> Cp_EXPORT _U08 Cp_PREFIX CpUserMsgRead ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b><a class="el" href="struct_CpStruct_CAN.html">CpStruct_CAN</a> * <em>msgPtr</em> ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read CAN message from Receive FIFO.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>msgPtr</em> </td><td>Pointer to a structure of type <a class="el" href="struct_CpStruct_CAN.html">CpStruct_CAN</a><p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>Error code taken from the CpErr enumeration. If no error occured, the function will return CpErr_OK. </dl> </td> </tr></table><a name="a8" doxytag="cpuser.h::CpUserMsgWrite"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> Cp_EXPORT _U08 Cp_PREFIX CpUserMsgWrite ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b><a class="el" href="struct_CpStruct_CAN.html">CpStruct_CAN</a> * <em>msgPtr</em> ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Write CAN message to transmit FIFO.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>msgPtr</em> </td><td>Pointer to a structure of type <a class="el" href="struct_CpStruct_CAN.html">CpStruct_CAN</a><p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>Error code taken from the CpErr enumeration. If no error occured, the function will return CpErr_OK. </dl> </td> </tr></table></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 + -