board.h

Go to the documentation of this file.
00001 #ifndef _DEV_BOARD_H_
00002 #define _DEV_BOARD_H_
00003 
00004 /*
00005  * Copyright (C) 2001-2007 by egnite Software GmbH. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. Neither the name of the copyright holders nor the names of
00017  *    contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00021  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00023  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00024  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00025  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00026  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00027  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00028  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00030  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  */
00035 
00036 /*
00037  * $Log: board.h,v $
00038  * Revision 1.17  2009/01/09 17:54:28  haraldkipp
00039  * Added SPI bus controller for AVR and AT91.
00040  *
00041  * Revision 1.16  2008/10/23 08:56:56  haraldkipp
00042  * Added default MMC interfaces.
00043  *
00044  * Revision 1.15  2008/08/27 07:01:10  thornen
00045  * Added:
00046  *  - RTL          support for MMnet01..04
00047  *  - LANC111 support for MMnet101..104
00048  *  - RTC         support for MMnet02..04 and MMnet102..104
00049  *
00050  * Revision 1.14  2008/08/26 17:36:45  haraldkipp
00051  * Revoked changes 2008/08/26 by thornen.
00052  *
00053  * Revision 1.12  2008/08/06 12:51:12  haraldkipp
00054  * Added support for Ethernut 5 (AT91SAM9XE reference design).
00055  *
00056  * Revision 1.11  2008/02/15 17:09:44  haraldkipp
00057  * Added support for the Elektor Internet Radio.
00058  *
00059  * Revision 1.10  2007/10/08 06:37:51  hwmaier
00060  * Added RTC DS1307 for XNUT-100 and XNUT-105 units
00061  *
00062  * Revision 1.9  2007/10/04 20:32:24  olereinhardt
00063  * Support for SAM7S256 added
00064  *
00065  * Revision 1.8  2007/06/03 08:51:30  haraldkipp
00066  * RTC_CHIP definition now visible for ETHERNUT3 and MMNET02 only.
00067  *
00068  * Revision 1.7  2006/10/05 17:18:49  haraldkipp
00069  * Hardware independant RTC layer added.
00070  *
00071  * Revision 1.6  2006/08/31 19:01:08  haraldkipp
00072  * Using devDebug2 for the DBGU output was a bad idea. Some AT91 chips
00073  * provide more than two UARTs. We now use devDebug to specify the DBGU
00074  * device. Baudrate calculations failed on CPUs running on a processor
00075  * clock, which differs from a futher divided main clock. This had been
00076  * fixed.
00077  *
00078  * Revision 1.5  2006/07/05 07:45:29  haraldkipp
00079  * Split on-chip interface definitions.
00080  *
00081  * Revision 1.4  2006/06/28 17:17:50  haraldkipp
00082  * Added initial support for Atmel's AT91SAM7X-EK.
00083  *
00084  * Revision 1.3  2006/02/23 15:34:00  haraldkipp
00085  * Support for Philips LPC2xxx Family and LPC-E2294 Board from Olimex added.
00086  * Many thanks to Michael Fischer for this port.
00087  *
00088  * Revision 1.2  2005/11/22 09:19:03  haraldkipp
00089  * Include condition corrected.
00090  *
00091  * Revision 1.1  2005/11/20 14:43:38  haraldkipp
00092  * First check-in
00093  *
00094  */
00095 
00096 /*
00097  * Debug device.
00098  */
00099 #include <dev/debug.h>
00100 
00101 #if defined(GBA)
00102 #define DEV_DEBUG_NAME  "con"
00103 #endif
00104 
00105 #if defined(OLIMEX_LPCE2294)
00106 #define DEV_DEBUG       devDebug1
00107 #define DEV_DEBUG_NAME  "uart1"
00108 #endif
00109 
00110 #if defined(DBGU_BASE)
00111 #define DEV_DEBUG       devDebug
00112 #define DEV_DEBUG_NAME  "dbgu"
00113 #endif
00114 
00115 #ifndef DEV_DEBUG
00116 #define DEV_DEBUG       devDebug0
00117 #endif
00118 #ifndef DEV_DEBUG_NAME
00119 #define DEV_DEBUG_NAME  "uart0"
00120 #endif
00121 
00122 /*
00123  * UART device.
00124  */
00125 #if defined(__AVR__) || defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__)
00126 
00127 #include <dev/usartavr.h>
00128 #define DEV_UART0       devUsartAvr0
00129 #define DEV_UART1       devUsartAvr1
00130 #define DEV_UART1_NAME  "uart1"
00131 
00132 #elif defined(ETHERNUT3) || defined(WOLF) || defined(AT91SAM7X_EK) || defined(AT91SAM9260_EK) || defined(AT91SAM7S) || defined(AT91SAM7SE) || defined(ELEKTOR_IR1) || defined(MCU_AT91SAM9XE512)
00133 
00134 #include <dev/usartat91.h>
00135 #define DEV_UART0       devUsartAt910
00136 #define DEV_UART1       devUsartAt911
00137 #define DEV_UART1_NAME  "uart1"
00138 
00139 #endif
00140 
00141 #ifndef DEV_UART0
00142 #define DEV_UART0       devUart0
00143 #endif
00144 #ifndef DEV_UART0_NAME
00145 #define DEV_UART0_NAME  "uart0"
00146 #endif
00147 
00148 #ifndef DEV_UART
00149 #define DEV_UART        DEV_UART0
00150 #endif
00151 #ifndef DEV_UART_NAME
00152 #define DEV_UART_NAME   DEV_UART0_NAME
00153 #endif
00154 
00155 /*
00156  * Ethernet device.
00157  */
00158 #if defined(ETHERNUT1) || defined(CHARON2) || defined(XNUT_100) || defined(XNUT_105) ||\
00159     defined(MMNET01) || defined(MMNET02) || defined(MMNET03) || defined(MMNET04) 
00160 #include <dev/nicrtl.h>
00161 #elif defined(ETHERNUT2)||\
00162       defined(MMNET101) || defined(MMNET102) || defined(MMNET103) || defined(MMNET104)
00163 #include <dev/lanc111.h>
00164 #elif defined(ETHERNUT3) || defined(ELEKTOR_IR1)
00165 #include <dev/dm9000e.h>
00166 #elif defined(WOLF)
00167 #include <dev/ax88796.h>
00168 #elif defined(OLIMEX_LPCE2294)
00169 #include <dev/cs8900a.h>
00170 #elif defined(AT91SAM7X_EK) || defined(AT91SAM9260_EK) || defined(ETHERNUT5)
00171 #include <dev/at91sam7x_emac.h>
00172 #endif
00173 
00174 #ifndef DEV_ETHER
00175 #define DEV_ETHER       devEth0
00176 #endif
00177 #ifndef DEV_ETHER_NAME
00178 #define DEV_ETHER_NAME  "eth0"
00179 #endif
00180 
00181 /*
00182  * SPI bus.
00183  */
00184 #ifndef DEV_SPIBUS
00185 #if defined(__AVR__)
00186 #include <dev/spibus_avr.h>
00187 #define DEV_SPIBUS      spiBus0Avr
00188 #elif defined(MCU_AT91) && defined(SPI0_BASE)
00189 #include <dev/spibus_at91.h>
00190 #define DEV_SPIBUS      spiBus0At91
00191 #endif
00192 #endif /* DEV_SPIBUS */
00193 
00194 /*
00195  * RTC chip.
00196  */
00197 #if defined(ETHERNUT3)
00198 #define RTC_CHIP rtcX12x6
00199 #include <dev/x12rtc.h>
00200 #elif defined(XNUT_100) || defined(XNUT_105) ||\
00201       defined(MMNET102) || defined(MMNET103) || defined(MMNET104) ||\
00202       defined(MMNET02)  || defined(MMNET03)  || defined(MMNET04) 
00203 #define RTC_CHIP rtcDs1307
00204 #include <dev/ds1307rtc.h>
00205 #elif defined(ELEKTOR_IR1)
00206 #define RTC_CHIP rtcPcf8563
00207 #include <dev/pcf8563.h>
00208 #endif
00209 
00210 /*
00211  * MultiMedia Card.
00212  */
00213 #if defined(ETHERNUT3)
00214 #define DEV_MMCARD0         devNplMmc0
00215 #include <dev/nplmmc.h>
00216 #elif defined(AT91SAM7X_EK)
00217 #define DEV_MMCARD0         devAt91SpiMmc0
00218 #include <dev/spimmc_at91.h>
00219 #elif defined(AT91SAM9260_EK)
00220 #define DEV_MMCARD0         devAt91Mci0
00221 #define DEV_MMCARD0_NAME    "MCI0"
00222 #include <dev/at91_mci.h>
00223 #elif defined(ELEKTOR_IR1)
00224 #define DEV_MMCARD0         devSbi0MmCard0
00225 #include <dev/sbi_mmc.h>
00226 #endif
00227 
00228 #if defined(DEV_MMCARD0)
00229 #ifndef DEV_MMCARD
00230 #define DEV_MMCARD          DEV_MMCARD0
00231 #endif
00232 #ifndef DEV_MMCARD0_NAME
00233 #define DEV_MMCARD0_NAME    "MMC0"
00234 #endif
00235 #ifndef DEV_MMCARD_NAME
00236 #define DEV_MMCARD_NAME     DEV_MMCARD0_NAME
00237 #endif
00238 #endif
00239 
00240 #endif
00241 

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/