at91x40.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #ifndef _ARCH_ARM_AT91X40_H_
  2. #define _ARCH_ARM_AT91X40_H_
  3. /*
  4. * Copyright (C) 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. * \file arch/arm/at91x40.h
  36. * \brief AT91 peripherals.
  37. *
  38. * \verbatim
  39. *
  40. * $Log: at91x40.h,v $
  41. * Revision 1.4 2006/10/08 16:48:09 haraldkipp
  42. * Documentation fixed
  43. *
  44. * Revision 1.3 2006/08/05 11:56:29 haraldkipp
  45. * Old SAM7X leftovers finally removed.
  46. * PDC register configuration added.
  47. *
  48. * Revision 1.2 2006/08/01 07:35:59 haraldkipp
  49. * Exclude function prototypes when included by assembler.
  50. *
  51. * Revision 1.1 2006/07/05 07:45:28 haraldkipp
  52. * Split on-chip interface definitions.
  53. *
  54. * Revision 1.7 2006/06/28 17:22:34 haraldkipp
  55. * Make it compile for AT91SAM7X256.
  56. *
  57. * Revision 1.6 2006/05/25 09:09:57 haraldkipp
  58. * API documentation updated and corrected.
  59. *
  60. * Revision 1.5 2006/04/07 12:57:00 haraldkipp
  61. * Fast interrupt doesn't require to store R8-R12.
  62. *
  63. * Revision 1.4 2006/03/02 20:02:56 haraldkipp
  64. * Added ICCARM interrupt entry code. Probably not working, because I
  65. * excluded an immediate load.
  66. *
  67. * Revision 1.3 2006/01/05 16:52:49 haraldkipp
  68. * Baudrate calculation is now based on NutGetCpuClock().
  69. * The AT91_US_BAUD macro had been marked deprecated.
  70. *
  71. * Revision 1.2 2005/11/20 14:44:14 haraldkipp
  72. * Register offsets added.
  73. *
  74. * Revision 1.1 2005/10/24 10:31:13 haraldkipp
  75. * Moved from parent directory.
  76. *
  77. *
  78. * \endverbatim
  79. */
  80. /*! \addtogroup xgNutArchArmAt91x40 */
  81. /*@{*/
  82. /*! \name Peripheral Identifiers and Interrupts */
  83. /*@{*/
  84. #define FIQ_ID 0 /*!< \brief Fast interrupt ID. */
  85. #define SWIRQ_ID 1 /*!< \brief Software interrupt ID. */
  86. #define US0_ID 2 /*!< \brief USART 0 ID. */
  87. #define US1_ID 3 /*!< \brief USART 1 ID. */
  88. #define TC0_ID 4 /*!< \brief Timer 0 ID. */
  89. #define TC1_ID 5 /*!< \brief Timer 1 ID. */
  90. #define TC2_ID 6 /*!< \brief Timer 2 ID. */
  91. #define WDI_ID 7 /*!< \brief Watchdog interrupt ID. */
  92. #define PIO_ID 8 /*!< \brief Parallel I/O controller ID. */
  93. #define IRQ0_ID 16 /*!< \brief External interrupt 0 ID. */
  94. #define IRQ1_ID 17 /*!< \brief External interrupt 1 ID. */
  95. #define IRQ2_ID 18 /*!< \brief External interrupt 2 ID. */
  96. /*@}*/
  97. #define EBI_BASE 0xFFE00000 /*!< \brief EBI base address. */
  98. #define SF_BASE 0xFFF00000 /*!< \brief Special function register base address. */
  99. #define USART1_BASE 0xFFFCC000 /*!< \brief USART 1 base address. */
  100. #define USART0_BASE 0xFFFD0000 /*!< \brief USART 0 base address. */
  101. #define TC_BASE 0xFFFE0000 /*!< \brief TC base address. */
  102. #define PIO_BASE 0xFFFF0000 /*!< \brief PIO base address. */
  103. #define PS_BASE 0xFFFF4000 /*!< \brief PS base address. */
  104. #define WD_BASE 0xFFFF8000 /*!< \brief Watch Dog register base address. */
  105. #define AIC_BASE 0xFFFFF000 /*!< AIC base address. */
  106. #define PERIPH_RPR_OFF 0x00000030 /*!< \brief Receive pointer register offset. */
  107. #define PERIPH_RCR_OFF 0x00000034 /*!< \brief Receive counter register offset. */
  108. #define PERIPH_TPR_OFF 0x00000038 /*!< \brief Transmit pointer register offset. */
  109. #define PERIPH_TCR_OFF 0x0000003C /*!< \brief Transmit counter register offset. */
  110. #define USART_HAS_PDC
  111. #include <arch/arm/at91_ebi.h>
  112. #include <arch/arm/at91_sf.h>
  113. #include <arch/arm/at91_us.h>
  114. #include <arch/arm/at91_tc.h>
  115. #include <arch/arm/at91_pio.h>
  116. #include <arch/arm/at91_ps.h>
  117. #include <arch/arm/at91_wd.h>
  118. #include <arch/arm/at91_aic.h>
  119. /*@} xgNutArchArmAt91 */
  120. #ifndef __ASSEMBLER__
  121. extern void McuInit(void);
  122. #endif
  123. #endif /* _ARCH_ARM_AT91X40_H_ */