debug.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #ifndef _DEV_DEBUG_H_
  2. #define _DEV_DEBUG_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: debug.h,v $
  36. * Revision 1.11 2006/08/31 19:01:08 haraldkipp
  37. * Using devDebug2 for the DBGU output was a bad idea. Some AT91 chips
  38. * provide more than two UARTs. We now use devDebug to specify the DBGU
  39. * device. Baudrate calculations failed on CPUs running on a processor
  40. * clock, which differs from a futher divided main clock. This had been
  41. * fixed.
  42. *
  43. * Revision 1.10 2006/07/05 07:45:29 haraldkipp
  44. * Split on-chip interface definitions.
  45. *
  46. * Revision 1.9 2006/02/23 15:34:00 haraldkipp
  47. * Support for Philips LPC2xxx Family and LPC-E2294 Board from Olimex added.
  48. * Many thanks to Michael Fischer for this port.
  49. *
  50. * Revision 1.8 2005/07/26 15:49:59 haraldkipp
  51. * Cygwin support added.
  52. *
  53. * Revision 1.7 2005/04/05 17:49:06 haraldkipp
  54. * Make it work on Wolf, but breaks AT91EB40A.
  55. *
  56. * Revision 1.6 2005/02/10 07:06:50 hwmaier
  57. * Changes to incorporate support for AT90CAN128 CPU
  58. *
  59. * Revision 1.5 2004/10/03 18:39:12 haraldkipp
  60. * GBA debug output on screen
  61. *
  62. * Revision 1.4 2004/09/08 10:53:14 haraldkipp
  63. * Our first device for the EB40A
  64. *
  65. * Revision 1.3 2004/04/07 12:13:57 haraldkipp
  66. * Matthias Ringwald's *nix emulation added
  67. *
  68. * Revision 1.2 2004/03/16 16:48:28 haraldkipp
  69. * Added Jan Dubiec's H8/300 port.
  70. *
  71. * Revision 1.1.1.1 2003/05/09 14:41:05 haraldkipp
  72. * Initial using 3.2.1
  73. *
  74. * Revision 1.1 2003/04/21 16:57:05 harald
  75. * First check in
  76. *
  77. */
  78. #include <cfg/arch.h>
  79. #include <sys/device.h>
  80. #include <dev/uart.h>
  81. /*!
  82. * \file dev/debug.h
  83. * \brief Debug device definitions.
  84. */
  85. /*
  86. * Available devices.
  87. */
  88. #if defined(__AVR__)
  89. extern NUTDEVICE devDebug0;
  90. #ifdef __AVR_ENHANCED__
  91. extern NUTDEVICE devDebug1;
  92. #endif
  93. #elif defined(__H8300H__) || defined(__H8300S__)
  94. /* SCIs (USARTs) in the H8/3068F; it should be adjusted for other H8 devices */
  95. extern NUTDEVICE devDebug0;
  96. extern NUTDEVICE devDebug1;
  97. extern NUTDEVICE devDebug2;
  98. #elif defined(__arm__)
  99. #ifdef MCU_AT91R40008
  100. extern NUTDEVICE devDebug0;
  101. extern NUTDEVICE devDebug1;
  102. #elif defined(MCU_AT91SAM7X256) || defined(MCU_AT91SAM9260)
  103. extern NUTDEVICE devDebug;
  104. #elif defined(MCU_GBA)
  105. extern NUTDEVICE devDebug0;
  106. #elif defined(MCU_LPC2XXX)
  107. extern NUTDEVICE devDebug0;
  108. extern NUTDEVICE devDebug1;
  109. #endif
  110. #elif defined(__m68k__)
  111. #endif
  112. #if defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__)
  113. extern NUTDEVICE devDebug0;
  114. extern NUTDEVICE devDebug1;
  115. #endif
  116. #endif /* #ifndef _DEV_DEBUG_H_ */