parts.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
  2. /*This file is prepared for Doxygen automatic documentation generation.*/
  3. /*! \file *********************************************************************
  4. *
  5. * \brief Arch file for AVR32.
  6. *
  7. * This file defines common AVR32 UC3 series.
  8. *
  9. * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
  10. * - Supported devices: All AVR32 devices can be used.
  11. * - AppNote:
  12. *
  13. * \author Atmel Corporation: http://www.atmel.com \n
  14. * Support and FAQ: http://support.atmel.no/
  15. *
  16. ******************************************************************************/
  17. /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
  18. *
  19. * Redistribution and use in source and binary forms, with or without
  20. * modification, are permitted provided that the following conditions are met:
  21. *
  22. * 1. Redistributions of source code must retain the above copyright notice, this
  23. * list of conditions and the following disclaimer.
  24. *
  25. * 2. Redistributions in binary form must reproduce the above copyright notice,
  26. * this list of conditions and the following disclaimer in the documentation
  27. * and/or other materials provided with the distribution.
  28. *
  29. * 3. The name of Atmel may not be used to endorse or promote products derived
  30. * from this software without specific prior written permission.
  31. *
  32. * 4. This software may only be redistributed and used in connection with an Atmel
  33. * AVR product.
  34. *
  35. * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
  36. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  37. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
  38. * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
  39. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  40. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  41. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  42. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  43. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  44. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
  45. *
  46. */
  47. #ifndef _ARCH_H_
  48. #define _ARCH_H_
  49. // UC3 A Series
  50. #define UC3A0 ( defined (__GNUC__) && \
  51. ( defined (__AVR32_UC3A0128__) || \
  52. defined (__AVR32_UC3A0256__) || \
  53. defined (__AVR32_UC3A0512__) || \
  54. defined (__AVR32_UC3A0512ES__))) \
  55. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  56. ( defined (__AT32UC3A0128__) || \
  57. defined (__AT32UC3A0256__) || \
  58. defined (__AT32UC3A0512__) || \
  59. defined (__AT32UC3A0512ES__)))
  60. #define UC3A1 ( defined (__GNUC__) && \
  61. ( defined (__AVR32_UC3A1128__) || \
  62. defined (__AVR32_UC3A1256__) || \
  63. defined (__AVR32_UC3A1512__) || \
  64. defined (__AVR32_UC3A1512ES__))) \
  65. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  66. ( defined (__AT32UC3A1128__) || \
  67. defined (__AT32UC3A1256__) || \
  68. defined (__AT32UC3A1512__) || \
  69. defined (__AT32UC3A1512ES__)))
  70. #define UC3A3 ( defined (__GNUC__) && \
  71. ( defined (__AVR32_UC3A364__) || \
  72. defined (__AVR32_UC3A364S__) || \
  73. defined (__AVR32_UC3A3128__) || \
  74. defined (__AVR32_UC3A3128S__) || \
  75. defined (__AVR32_UC3A3256__) || \
  76. defined (__AVR32_UC3A3256S__))) \
  77. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  78. ( defined (__AT32UC3A364__) || \
  79. defined (__AT32UC3A364S__) || \
  80. defined (__AT32UC3A3128__) || \
  81. defined (__AT32UC3A3128S__) || \
  82. defined (__AT32UC3A3256__) || \
  83. defined (__AT32UC3A3256S__)))
  84. #define UC3A (UC3A0 || UC3A1 || UC3A3)
  85. // UC3 B Series
  86. #define UC3B0 ( defined (__GNUC__) && \
  87. ( defined (__AVR32_UC3B064__) || \
  88. defined (__AVR32_UC3B0128__) || \
  89. defined (__AVR32_UC3B0256__) || \
  90. defined (__AVR32_UC3B0256ES__) || \
  91. defined (__AVR32_UC3B0512__) || \
  92. defined (__AVR32_UC3B0512REVC_))) \
  93. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  94. ( defined (__AT32UC3B064__) || \
  95. defined (__AT32UC3B0128__) || \
  96. defined (__AT32UC3B0256__) || \
  97. defined (__AT32UC3B0256ES__) || \
  98. defined (__AT32UC3B0512__) || \
  99. defined (__AT32UC3B0512REVC__)))
  100. #define UC3B1 ( defined (__GNUC__) && \
  101. ( defined (__AVR32_UC3B164__) || \
  102. defined (__AVR32_UC3B1128__) || \
  103. defined (__AVR32_UC3B1256__) || \
  104. defined (__AVR32_UC3B1256ES__) || \
  105. defined (__AVR32_UC3B1512__) || \
  106. defined (__AVR32_UC3B1512ES__))) \
  107. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  108. ( defined (__AT32UC3B164__) || \
  109. defined (__AT32UC3B1128__) || \
  110. defined (__AT32UC3B1256__) || \
  111. defined (__AT32UC3B1256ES__) || \
  112. defined (__AT32UC3B1512__) || \
  113. defined (__AT32UC3B1512REVC__)))
  114. #define UC3B (UC3B0 || UC3B1 )
  115. // UC3 C Series
  116. #define UC3C0 ( defined (__GNUC__) && \
  117. ( defined (__AVR32_UC3C064C__) || \
  118. defined (__AVR32_UC3C0128C__) || \
  119. defined (__AVR32_UC3C0256C__) || \
  120. defined (__AVR32_UC3C0512CREVC__))) \
  121. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  122. ( defined (__AT32UC3C064C__) || \
  123. defined (__AT32UC3C0128C__) || \
  124. defined (__AT32UC3C0256C__) || \
  125. defined (__AT32UC3C0512C__)))
  126. #define UC3C1 ( defined (__GNUC__) && \
  127. ( defined (__AVR32_UC3C164C__) || \
  128. defined (__AVR32_UC3C1128C__) || \
  129. defined (__AVR32_UC3C1256C__) || \
  130. defined (__AVR32_UC3C1512CREVC__))) \
  131. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  132. ( defined (__AT32UC3C164C__) || \
  133. defined (__AT32UC3C1128C__) || \
  134. defined (__AT32UC3C1256C__) || \
  135. defined (__AT32UC3C1512C__)))
  136. #define UC3C2 ( defined (__GNUC__) && \
  137. ( defined (__AVR32_UC3C264C__) || \
  138. defined (__AVR32_UC3C2128C__) || \
  139. defined (__AVR32_UC3C2256C__) || \
  140. defined (__AVR32_UC3C2512CREVC__))) \
  141. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  142. ( defined (__AT32UC3C264C__) || \
  143. defined (__AT32UC3C2128C__) || \
  144. defined (__AT32UC3C2256C__) || \
  145. defined (__AT32UC3C2512C__)))
  146. #define UC3C (UC3C0 || UC3C1 || UC3C2)
  147. // UC3 L Device series
  148. #define UC3L0 ( defined (__GNUC__) && \
  149. ( defined (__AVR32_UC3L016__) || \
  150. defined (__AVR32_UC3L032__) || \
  151. defined (__AVR32_UC3L064__) || \
  152. defined (__AVR32_UC3L064REVB__))) \
  153. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  154. ( defined (__AT32UC3L016__) || \
  155. defined (__AT32UC3L032__) || \
  156. defined (__AT32UC3L064__) || \
  157. defined (__AT32UC3L064REVB__)))
  158. #define UC3L1 ( defined (__GNUC__) && \
  159. ( defined (__AVR32_UC3L116__) || \
  160. defined (__AVR32_UC3L132__) || \
  161. defined (__AVR32_UC3L164__))) \
  162. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  163. ( defined (__AT32UC3L116__) || \
  164. defined (__AT32UC3L132__) || \
  165. defined (__AT32UC3L164__)))
  166. #define UC3L2 ( defined (__GNUC__) && \
  167. ( defined (__AVR32_UC3L216__) || \
  168. defined (__AVR32_UC3L232__) || \
  169. defined (__AVR32_UC3L264__))) \
  170. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  171. ( defined (__AT32UC3L216__) || \
  172. defined (__AT32UC3L232__) || \
  173. defined (__AT32UC3L264__)))
  174. #define UC3L3 ( defined (__GNUC__) && \
  175. ( defined (__AVR32_UC3L316__) || \
  176. defined (__AVR32_UC3L332__) || \
  177. defined (__AVR32_UC3L364__))) \
  178. ||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
  179. ( defined (__AT32UC3L316__) || \
  180. defined (__AT32UC3L332__) || \
  181. defined (__AT32UC3L364__)))
  182. #define UC3L (UC3L0 || UC3L1 || UC3L2 || UC3L3)
  183. #endif // _ARCH_H_