📄 ethernet_8h.html
字号:
<p>Use <a class="el" href="system_8h.html#a11">SEND_NETWORK_B()</a> macro instead of invoking this function directly. <p>Definition at line <a class="el" href="ethernet_8c-source.html#l00148">148</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="config_8h-source.html#l00091">DATABUS</a>, <a class="el" href="config_8h-source.html#l00102">IOCHRDY</a>, and <a class="el" href="config_8h-source.html#l00100">IOW</a>.<p>Referenced by <a class="el" href="ethernet_8c-source.html#l00725">NE2000SendFrame()</a>, and <a class="el" href="ethernet_8c-source.html#l00608">NE2000WriteEthernetHeader()</a>. </td> </tr></table><a name="a41" doxytag="ethernet.h::inNE2000"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT8 inNE2000 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">UINT8 </td> <td class="mdname1" valign="top" nowrap> <em>reg</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>19.02.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>reg</em> </td><td>NE2000 register address </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>Register content</dl>Invoke this function to read contents of a NE2000 register. <p>Definition at line <a class="el" href="ethernet_8c-source.html#l00198">198</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="config_8h-source.html#l00097">ADRBUS</a>, <a class="el" href="config_8h-source.html#l00091">DATABUS</a>, <a class="el" href="config_8h-source.html#l00094">DATADIR</a>, <a class="el" href="config_8h-source.html#l00085">DDR_IN</a>, <a class="el" href="config_8h-source.html#l00102">IOCHRDY</a>, and <a class="el" href="config_8h-source.html#l00101">IOR</a>.<p>Referenced by <a class="el" href="ethernet_8c-source.html#l00570">InitTransmission()</a>, <a class="el" href="ethernet_8c-source.html#l00393">NE2000CheckOverFlow()</a>, <a class="el" href="ethernet_8c-source.html#l00274">NE2000CheckRxFrame()</a>, and <a class="el" href="ethernet_8c-source.html#l00482">NE2000ReceiveFrame()</a>. </td> </tr></table><a name="a42" doxytag="ethernet.h::inNE2000again"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT8 inNE2000again </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>19.02.2002 </dl><dl compact><dt><b>Returns: </b></dt><dd>Register content</dl>Invoke this function to continue reading contents of a NE2000 register, usefull when reading a sequence of bytes from Ethernet controller.<p>Use <a class="el" href="system_8h.html#a9">RECEIVE_NETWORK_B()</a> macro instead of directly invoking this function for easier driver change. <p>Definition at line <a class="el" href="ethernet_8c-source.html#l00226">226</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="config_8h-source.html#l00091">DATABUS</a>, <a class="el" href="config_8h-source.html#l00102">IOCHRDY</a>, and <a class="el" href="config_8h-source.html#l00101">IOR</a>.<p>Referenced by <a class="el" href="ethernet_8c-source.html#l00482">NE2000ReceiveFrame()</a>. </td> </tr></table><a name="a43" doxytag="ethernet.h::NE2000CheckRxFrame"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT8 NE2000CheckRxFrame </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>19.02.2002 </dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> <a class="el" href="system_8h.html#a1">TRUE</a> - if there is a new packet waiting <li> <a class="el" href="system_8h.html#a2">FALSE</a> - if there is no new packet waiting</ul></dl>Invoke this function to check if there is a new Ethernet frame in the NIC's buffer waiting to be processed. <p>Definition at line <a class="el" href="ethernet_8c-source.html#l00274">274</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="ethernet_8h-source.html#l00088">BOUNDARY</a>, <a class="el" href="ethernet_8h-source.html#l00085">CR</a>, <a class="el" href="ethernet_8h-source.html#l00113">CURR</a>, <a class="el" href="ethernet_8c-source.html#l00198">inNE2000()</a>, <a class="el" href="ethernet_8c-source.html#l00118">outNE2000()</a>, and <a class="el" href="ethernet_8h-source.html#l00100">RCR</a>.<p>Referenced by <a class="el" href="ethernet_8c-source.html#l00482">NE2000ReceiveFrame()</a>. </td> </tr></table><a name="a44" doxytag="ethernet.h::NE2000DumpRxFrame"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void NE2000DumpRxFrame </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>19.02.2002</dl>Discard the current received frame by advancing the receive circular buffer tail pointer. <p>Definition at line <a class="el" href="ethernet_8c-source.html#l00304">304</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="ethernet_8h-source.html#l00088">BOUNDARY</a>, <a class="el" href="ethernet_8h-source.html#l00085">CR</a>, <a class="el" href="ethernet_8c-source.html#l00079">NE2000NextPktPtr</a>, and <a class="el" href="ethernet_8c-source.html#l00118">outNE2000()</a>. </td> </tr></table><a name="a45" doxytag="ethernet.h::NE2000Init"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void NE2000Init </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">UINT8 * </td> <td class="mdname1" valign="top" nowrap> <em>mac</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>19.02.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>mac</em> </td><td>Pointer to NIC's hardware address</td></tr></table></dl>Invoke this function at startup to properly initialize NIC's registers, HW address and operation. <p>Definition at line <a class="el" href="ethernet_8c-source.html#l00327">327</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="ethernet_8h-source.html#l00088">BOUNDARY</a>, <a class="el" href="ethernet_8h-source.html#l00085">CR</a>, <a class="el" href="ethernet_8h-source.html#l00113">CURR</a>, <a class="el" href="ethernet_8h-source.html#l00102">DCR</a>, <a class="el" href="ethernet_8h-source.html#l00095">ISR</a>, <a class="el" href="ethernet_8c-source.html#l00080">NE2000CurrPktPtr</a>, <a class="el" href="ethernet_8c-source.html#l00079">NE2000NextPktPtr</a>, <a class="el" href="ethernet_8c-source.html#l00118">outNE2000()</a>, <a class="el" href="ethernet_8h-source.html#l00107">PAR0</a>, <a class="el" href="ethernet_8h-source.html#l00086">PSTART</a>, <a class="el" href="ethernet_8h-source.html#l00087">PSTOP</a>, <a class="el" href="ethernet_8h-source.html#l00100">RCR</a>, <a class="el" href="config_8h-source.html#l00104">RESETPIN_NE2000</a>, <a class="el" href="ethernet_8h-source.html#l00124">RXBUF_END</a>, <a class="el" href="ethernet_8h-source.html#l00123">RXBUF_START</a>, and <a class="el" href="ethernet_8h-source.html#l00101">TCR</a>. </td> </tr></table><a name="a46" doxytag="ethernet.h::NE2000CheckOverFlow"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void NE2000CheckOverFlow </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>19.02.2002</dl>This function checks if receive-buffer overflow has happened. If it did, NIC is reinitialized to ensure proper operation.<p>Invoke this function periodically to ensure proper operation under heavy load. <p>Definition at line <a class="el" href="ethernet_8c-source.html#l00393">393</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="ethernet_8h-source.html#l00088">BOUNDARY</a>, <a class="el" href="ethernet_8h-source.html#l00085">CR</a>, <a class="el" href="ethernet_8h-source.html#l00113">CURR</a>, <a class="el" href="ethernet_8c-source.html#l00198">inNE2000()</a>, <a class="el" href="ethernet_8h-source.html#l00095">ISR</a>, <a class="el" href="ethernet_8c-source.html#l00080">NE2000CurrPktPtr</a>, <a class="el" href="ethernet_8c-source.html#l00079">NE2000NextPktPtr</a>, <a class="el" href="ethernet_8c-source.html#l00118">outNE2000()</a>, <a class="el" href="ethernet_8h-source.html#l00098">RBCR0</a>, and <a class="el" href="ethernet_8h-source.html#l00101">TCR</a>. </td> </tr></table><a name="a47" doxytag="ethernet.h::NE2000ReceiveFrame"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT8 NE2000ReceiveFrame </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasytems.com">jari.lahti@violasytems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>19.02.2002 </dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> <a class="el" href="system_8h.html#a1">TRUE</a> - new frame exists, variables initialized so further processing may start <li> <a class="el" href="system_8h.html#a2">FALSE</a> - no new Ethernet frame detected</ul></dl>Invoke this function periodically (better not directly but by invoking <a class="el" href="group__periodic__functions.html#a7">NETWORK_CHECK_IF_RECEIVED()</a> macro) to test for newly-arrived Ethernet packets.<p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -