board.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #ifndef _DEV_BOARD_H_
  2. #define _DEV_BOARD_H_
  3. /*
  4. * Copyright (C) 2001-2005 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  23. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*
  35. * $Log: board.h,v $
  36. * Revision 1.7 2006/10/05 17:18:49 haraldkipp
  37. * Hardware independant RTC layer added.
  38. *
  39. * Revision 1.6 2006/08/31 19:01:08 haraldkipp
  40. * Using devDebug2 for the DBGU output was a bad idea. Some AT91 chips
  41. * provide more than two UARTs. We now use devDebug to specify the DBGU
  42. * device. Baudrate calculations failed on CPUs running on a processor
  43. * clock, which differs from a futher divided main clock. This had been
  44. * fixed.
  45. *
  46. * Revision 1.5 2006/07/05 07:45:29 haraldkipp
  47. * Split on-chip interface definitions.
  48. *
  49. * Revision 1.4 2006/06/28 17:17:50 haraldkipp
  50. * Added initial support for Atmel's AT91SAM7X-EK.
  51. *
  52. * Revision 1.3 2006/02/23 15:34:00 haraldkipp
  53. * Support for Philips LPC2xxx Family and LPC-E2294 Board from Olimex added.
  54. * Many thanks to Michael Fischer for this port.
  55. *
  56. * Revision 1.2 2005/11/22 09:19:03 haraldkipp
  57. * Include condition corrected.
  58. *
  59. * Revision 1.1 2005/11/20 14:43:38 haraldkipp
  60. * First check-in
  61. *
  62. */
  63. /*
  64. * Debug device.
  65. */
  66. #include <dev/debug.h>
  67. #if defined(GBA)
  68. #define DEV_DEBUG_NAME "con"
  69. #endif
  70. #if defined(OLIMEX_LPCE2294)
  71. #define DEV_DEBUG devDebug1
  72. #define DEV_DEBUG_NAME "uart1"
  73. #endif
  74. #if defined(DBGU_BASE)
  75. #define DEV_DEBUG devDebug
  76. #define DEV_DEBUG_NAME "dbgu"
  77. #endif
  78. #ifndef DEV_DEBUG
  79. #define DEV_DEBUG devDebug0
  80. #endif
  81. #ifndef DEV_DEBUG_NAME
  82. #define DEV_DEBUG_NAME "uart0"
  83. #endif
  84. /*
  85. * UART device.
  86. */
  87. #if defined(__AVR__) || defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__)
  88. #include <dev/usartavr.h>
  89. #define DEV_UART0 devUsartAvr0
  90. #define DEV_UART1 devUsartAvr1
  91. #define DEV_UART1_NAME "uart1"
  92. #elif defined(ETHERNUT3) || defined(WOLF) || defined(AT91SAM7X_EK) || defined(AT91SAM9260_EK)
  93. #include <dev/usartat91.h>
  94. #define DEV_UART0 devUsartAt910
  95. #define DEV_UART1 devUsartAt911
  96. #define DEV_UART1_NAME "uart1"
  97. #endif
  98. #ifndef DEV_UART0
  99. #define DEV_UART0 devUart0
  100. #endif
  101. #ifndef DEV_UART0_NAME
  102. #define DEV_UART0_NAME "uart0"
  103. #endif
  104. #ifndef DEV_UART
  105. #define DEV_UART DEV_UART0
  106. #endif
  107. #ifndef DEV_UART_NAME
  108. #define DEV_UART_NAME DEV_UART0_NAME
  109. #endif
  110. /*
  111. * Ethernet device.
  112. */
  113. #if defined(ETHERNUT1) || defined(CHARON2) || defined(XNUT_100) || defined(XNUT_105)
  114. #include <dev/nicrtl.h>
  115. #elif defined(ETHERNUT2)
  116. #include <dev/lanc111.h>
  117. #elif defined(ETHERNUT3)
  118. #include <dev/dm9000e.h>
  119. #elif defined(WOLF)
  120. #include <dev/ax88796.h>
  121. #elif defined(OLIMEX_LPCE2294)
  122. #include <dev/cs8900a.h>
  123. #elif defined(AT91SAM7X_EK) || defined(AT91SAM9260_EK)
  124. #include <dev/at91sam7x_emac.h>
  125. #endif
  126. #ifndef DEV_ETHER
  127. #define DEV_ETHER devEth0
  128. #endif
  129. #ifndef DEV_ETHER_NAME
  130. #define DEV_ETHER_NAME "eth0"
  131. #endif
  132. /*
  133. * RTC chip.
  134. */
  135. #define RTC_CHIP rtcX12x6
  136. #include <dev/x12rtc.h>
  137. #endif