?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{BLAME START}

library

?curdirlinks? -

Blame information for rev 6

Line No. Rev Author Line
1 6 kaklik <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>Procyon AVRlib: net/nic.h Source File</title>
4 <link href="dox.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.4.2 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
8 <div class="nav">
9 <a class="el" href="dir_000001.html">net</a></div>
10 <h1>nic.h</h1><a href="nic_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file nic.h \brief Network Interface Card (NIC) software definition. */</span>
11 00002 <span class="comment">//*****************************************************************************</span>
12 00003 <span class="comment">//</span>
13 00004 <span class="comment">// File Name : 'nic.h'</span>
14 00005 <span class="comment">// Title : Network Interface Card (NIC) software definition</span>
15 00006 <span class="comment">// Author : Pascal Stang</span>
16 00007 <span class="comment">// Created : 8/22/2004</span>
17 00008 <span class="comment">// Revised : 7/3/2005</span>
18 00009 <span class="comment">// Version : 0.1</span>
19 00010 <span class="comment">// Target MCU : Atmel AVR series</span>
20 00011 <span class="comment">// Editor Tabs : 4</span>
21 00012 <span class="comment">//</span><span class="comment"></span>
22 00013 <span class="comment">/// \ingroup network</span>
23 00014 <span class="comment">/// \defgroup nic Network Interface Card (NIC) software definition (nic.h)</span>
24 00015 <span class="comment">/// \code #include "net/nic.h" \endcode</span>
25 00016 <span class="comment">/// \par Description</span>
26 00017 <span class="comment">/// This is the software interface standard for network interface hardware</span>
27 00018 <span class="comment">/// as used by AVRlib. Drivers for network hardware must implement these</span>
28 00019 <span class="comment">/// functions to allow upper network layers to initialize the interface,</span>
29 00020 <span class="comment">/// and send and receive net traffic.</span>
30 00021 <span class="comment"></span><span class="comment">//</span>
31 00022 <span class="comment">// This code is distributed under the GNU Public License</span>
32 00023 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span>
33 00024 <span class="comment">//*****************************************************************************</span><span class="comment"></span>
34 00025 <span class="comment">//@{</span>
35 00026 <span class="comment"></span>
36 00027 <span class="preprocessor">#ifndef NIC_H</span>
37 00028 <span class="preprocessor"></span><span class="preprocessor">#define NIC_H</span>
38 00029 <span class="preprocessor"></span>
39 00030 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
40 00031 <span class="comment"></span>
41 00032 <span class="comment">//! Initialize network interface hardware.</span>
42 00033 <span class="comment">/// Reset and bring up network interface hardware. This function should leave</span>
43 00034 <span class="comment">/// the network interface ready to handle \c nicSend() and \c nicPoll() requests.</span>
44 00035 <span class="comment">/// \note For some hardware, this command will take a non-negligible amount of</span>
45 00036 <span class="comment">/// time (1-2 seconds).</span>
46 00037 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group__nic.html#ga0">nicInit</a>(<span class="keywordtype">void</span>);
47 00038 <span class="comment"></span>
48 00039 <span class="comment">//! Send packet on network interface.</span>
49 00040 <span class="comment">/// Function accepts the length (in bytes) of the data to be sent, and a pointer</span>
50 00041 <span class="comment">/// to the data. This send command may assume an ethernet-like 802.3 header is at the</span>
51 00042 <span class="comment">/// beginning of the packet, and contains the packet addressing information.</span>
52 00043 <span class="comment">/// See net.h documentation for ethernet header format.</span>
53 00044 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group__nic.html#ga1">nicSend</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* packet);
54 00045 <span class="comment"></span>
55 00046 <span class="comment">//! Check network interface; return next received packet if avaialable.</span>
56 00047 <span class="comment">/// Function accepts the maximum allowable packet length (in bytes), and a</span>
57 00048 <span class="comment">/// pointer to the received packet buffer. Return value is the length</span>
58 00049 <span class="comment">/// (in bytes) of the packet recevied, or zero if no packet is available.</span>
59 00050 <span class="comment">/// Upper network layers may assume that an ethernet-like 802.3 header is at</span>
60 00051 <span class="comment">/// the beginning of the packet, and contains the packet addressing information.</span>
61 00052 <span class="comment">/// See net.h documentation for ethernet header format.</span>
62 00053 <span class="comment"></span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="group__nic.html#ga2">nicPoll</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> maxlen, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* packet);
63 00054 <span class="comment"></span>
64 00055 <span class="comment">//! Return the 48-bit hardware node (MAC) address of this network interface.</span>
65 00056 <span class="comment">/// This function can return a MAC address read from the NIC hardware, if available.</span>
66 00057 <span class="comment">/// If the hardware does not provide a MAC address, a software-defined address may be</span>
67 00058 <span class="comment">/// returned. It may be acceptable to return an address that is less than 48-bits.</span>
68 00059 <span class="comment"></span><span class="keywordtype">void</span> nicGetMacAddress(uint8_t* macaddr);
69 00060 <span class="comment"></span>
70 00061 <span class="comment">//! Set the 48-bit hardware node (MAC) address of this network interface.</span>
71 00062 <span class="comment">/// This function may not be supported on all hardware.</span>
72 00063 <span class="comment"></span><span class="keywordtype">void</span> nicSetMacAddress(uint8_t* macaddr);
73 00064 <span class="comment"></span>
74 00065 <span class="comment">//! Print network interface hardware registers.</span>
75 00066 <span class="comment">/// Prints a formatted list of names and values of NIC registers for debugging</span>
76 00067 <span class="comment">/// purposes.</span>
77 00068 <span class="comment"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__nic.html#ga5">nicRegDump</a>(<span class="keywordtype">void</span>);
78 00069
79 00070 <span class="preprocessor">#endif</span>
80 00071 <span class="preprocessor"></span><span class="comment">//@}</span>
81 </span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:07 2006 for Procyon AVRlib by&nbsp;
82 <a href="http://www.doxygen.org/index.html">
83 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
84 </body>
85 </html>
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3