?lang_form?
?lang_select?
?lang_submit?
?lang_endform?
{HEADER END}
{FILE START}
library
?curdirlinks? - Rev 6
?prevdifflink? - Blame - ?getfile?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Procyon AVRlib: net/conf/cs8900conf.h Source File</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<div class="nav">
<a class="el" href="dir_000001.html">net</a> / <a class="el" href="dir_000002.html">conf</a></div>
<h1>cs8900conf.h</h1><a href="cs8900conf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file cs8900conf.h \brief Crystal CS8900 Ethernet Interface Driver Configuration. */</span>
00002 <span class="comment">//*****************************************************************************</span>
00003 <span class="comment">//</span>
00004 <span class="comment">// File Name : 'cs8900conf.h'</span>
00005 <span class="comment">// Title : Crystal CS8900 Ethernet Interface Driver Configuration</span>
00006 <span class="comment">// Author : Pascal Stang</span>
00007 <span class="comment">// Created : 11/7/2004</span>
00008 <span class="comment">// Revised : 8/22/2005</span>
00009 <span class="comment">// Version : 0.1</span>
00010 <span class="comment">// Target MCU : Atmel AVR series</span>
00011 <span class="comment">// Editor Tabs : 4</span>
00012 <span class="comment">//</span><span class="comment"></span>
00013 <span class="comment">/// \ingroup network</span>
00014 <span class="comment"></span><span class="comment">//</span>
00015 <span class="comment">// Description : This driver provides initialization and transmit/receive</span>
00016 <span class="comment">// functions for the Crystal CS8900 10Mb Ethernet Controller and PHY.</span>
00017 <span class="comment">//</span>
00018 <span class="comment">//*****************************************************************************</span>
00019
00020 <span class="preprocessor">#ifndef CS8900CONF_H</span>
00021 <span class="preprocessor"></span><span class="preprocessor">#define CS8900CONF_H</span>
00022 <span class="preprocessor"></span>
00023 <span class="comment">// This driver supports a CS8900 connected in memory-mapped or direct I/O mode.</span>
00024 <span class="comment">//</span>
00025 <span class="preprocessor">#define GENERAL_IO 0</span>
00026 <span class="preprocessor"></span><span class="comment">// Direct I/O mode assumes the NIC address, data, and control lines are</span>
00027 <span class="comment">// connected directly to processor I/O pins. The memory-bus accesses are</span>
00028 <span class="comment">// software emulated.</span>
00029 <span class="comment">//</span>
00030 <span class="comment">//#define MEMORY_MAPPED 1 (*** MEMORY-MAPPED NOT YET IMPLEMENTED ***)</span>
00031 <span class="comment">// Memory-mapped mode assumes that the NIC is connected the processor via</span>
00032 <span class="comment">// the external memory bus, and that the NIC address space starts at the</span>
00033 <span class="comment">// memory location CS8900_MEMORY_MAPPED_OFFSET.</span>
00034 <span class="comment">//</span>
00035 <span class="comment">// In either mode, a seperate I/O pins is required for control of the NIC's</span>
00036 <span class="comment">// hardware RESET line.</span>
00037
00038
00039 <span class="comment">// set the connection type used to communicate with the NIC</span>
00040 <span class="preprocessor">#define NIC_CONNECTION GENERAL_IO</span>
00041 <span class="preprocessor"></span>
00042 <span class="preprocessor">#if NIC_CONNECTION != GENERAL_IO</span>
00043 <span class="preprocessor"></span> <span class="comment">// NIC is memory-mapped starting at this address</span>
00044 <span class="preprocessor"> #define CS8900_MEMORY_MAPPED_OFFSET 0x8000</span>
00045 <span class="preprocessor"></span><span class="preprocessor">#else // NIC Interface through General I/O</span>
00046 <span class="preprocessor"></span> <span class="comment">// CS8900 address port</span>
00047 <span class="preprocessor"> #define CS8900_ADDRESS_PORT PORTF</span>
00048 <span class="preprocessor"></span><span class="preprocessor"> #define CS8900_ADDRESS_DDR DDRF</span>
00049 <span class="preprocessor"></span><span class="preprocessor"> #define CS8900_ADDRESS_MASK 0x0F</span>
00050 <span class="preprocessor"></span> <span class="comment">// CS8900 data port</span>
00051 <span class="preprocessor"> #define CS8900_DATA_PORT PORTA</span>
00052 <span class="preprocessor"></span><span class="preprocessor"> #define CS8900_DATA_DDR DDRA</span>
00053 <span class="preprocessor"></span><span class="preprocessor"> #define CS8900_DATA_PIN PINA</span>
00054 <span class="preprocessor"></span> <span class="comment">// CS8900 control port</span>
00055 <span class="preprocessor"> #define CS8900_CONTROL_PORT PORTB</span>
00056 <span class="preprocessor"></span><span class="preprocessor"> #define CS8900_CONTROL_DDR DDRB</span>
00057 <span class="preprocessor"></span><span class="preprocessor"> #define CS8900_CONTROL_READPIN 4</span>
00058 <span class="preprocessor"></span><span class="preprocessor"> #define CS8900_CONTROL_WRITEPIN 3</span>
00059 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00060 <span class="preprocessor"></span>
00061 <span class="comment">// CS8900 RESET pin</span>
00062 <span class="preprocessor">#define CS8900_RESET_PORT PORTB</span>
00063 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_RESET_DDR DDRB</span>
00064 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_RESET_PIN 1</span>
00065 <span class="preprocessor"></span>
00066 <span class="comment">// MAC address for this interface</span>
00067 <span class="preprocessor">#ifdef ETHADDR0</span>
00068 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC0 ETHADDR0</span>
00069 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC1 ETHADDR1</span>
00070 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC2 ETHADDR2</span>
00071 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC3 ETHADDR3</span>
00072 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC4 ETHADDR4</span>
00073 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC5 ETHADDR5</span>
00074 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00075 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC0 '0'</span>
00076 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC1 'F'</span>
00077 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC2 'F'</span>
00078 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC3 'I'</span>
00079 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC4 'C'</span>
00080 <span class="preprocessor"></span><span class="preprocessor">#define CS8900_MAC5 'E'</span>
00081 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00082 <span class="preprocessor"></span>
00083 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:07 2006 for Procyon AVRlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
|
{FILE END}
{FOOTER START}
Powered by WebSVN v2.8.3