irqreg.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. #ifndef _DEV_IRQREG_ARM_H_
  2. #define _DEV_IRQREG_ARM_H_
  3. /*
  4. * Copyright (C) 2001-2007 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 THE COPYRIGHT HOLDERS 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 THE
  23. * COPYRIGHT OWNER 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$
  36. * Revision 1.19 2010/12/15 21:46:28 ve2yag
  37. * Add PWM interrupt support for AT91SAM7S and SE.
  38. *
  39. * Revision 1.18 2010/12/15 13:22:28 ve2yag
  40. * Add support for all AT91SAM7S and SE family.
  41. *
  42. * Revision 1.17 2008/10/03 11:31:28 haraldkipp
  43. * Added TWI support for the AT91SAM9260.
  44. *
  45. * Revision 1.16 2008/08/06 12:51:11 haraldkipp
  46. * Added support for Ethernut 5 (AT91SAM9XE reference design).
  47. *
  48. * Revision 1.15 2008/02/15 17:00:08 haraldkipp
  49. * Spport for AT91SAM7SE512 added.
  50. *
  51. * Revision 1.14 2008/01/31 09:22:32 haraldkipp
  52. * Added first version of platform independent GPIO routines. Consider the
  53. * AVR version untested.
  54. *
  55. * Revision 1.13 2007/12/09 21:29:33 olereinhardt
  56. * Added adc support
  57. *
  58. * Revision 1.12 2007/10/04 20:27:58 olereinhardt
  59. * Support for SAM7S256 added
  60. *
  61. * Revision 1.11 2007/09/06 19:46:47 olereinhardt
  62. * Added interrupt definitions for SPI/TWI
  63. *
  64. * Revision 1.10 2007/02/15 16:29:23 haraldkipp
  65. * Support for system controller interrupts added.
  66. *
  67. * Revision 1.9 2006/09/29 12:34:59 haraldkipp
  68. * Basic AT91 SPI support added.
  69. *
  70. * Revision 1.8 2006/09/08 16:47:49 haraldkipp
  71. * For some reason the SSC driver for SAM7X had not been included.
  72. *
  73. * Revision 1.7 2006/09/05 12:33:45 haraldkipp
  74. * SSC interrupt handler added.
  75. *
  76. * Revision 1.6 2006/08/31 19:04:08 haraldkipp
  77. * Added support for the AT91SAM9260 and Atmel's AT91SAM9260 Evaluation Kit.
  78. *
  79. * Revision 1.5 2006/07/05 07:45:28 haraldkipp
  80. * Split on-chip interface definitions.
  81. *
  82. * Revision 1.4 2006/06/28 17:22:34 haraldkipp
  83. * Make it compile for AT91SAM7X256.
  84. *
  85. * Revision 1.3 2006/02/23 15:33:59 haraldkipp
  86. * Support for Philips LPC2xxx Family and LPC-E2294 Board from Olimex added.
  87. * Many thanks to Michael Fischer for this port.
  88. *
  89. * Revision 1.2 2005/10/24 10:26:21 haraldkipp
  90. * AT91 handlers added.
  91. *
  92. * Revision 1.1 2005/07/26 18:35:09 haraldkipp
  93. * First check in
  94. *
  95. * Revision 1.3 2005/04/05 17:52:40 haraldkipp
  96. * Much better implementation of GBA interrupt registration.
  97. *
  98. * Revision 1.2 2004/09/08 10:52:31 haraldkipp
  99. * Tyou's support for the SAMSUNG S3C45
  100. *
  101. * Revision 1.1 2004/03/16 16:48:28 haraldkipp
  102. * Added Jan Dubiec's H8/300 port.
  103. *
  104. *
  105. */
  106. #ifdef S3C4510B
  107. #include "s3c4510b_irqreg.h"
  108. #elif defined(MCU_GBA)
  109. extern IRQ_HANDLER sig_VBLANK;
  110. extern IRQ_HANDLER sig_HBLANK;
  111. extern IRQ_HANDLER sig_VCOUNT;
  112. extern IRQ_HANDLER sig_TMR0;
  113. extern IRQ_HANDLER sig_TMR1;
  114. extern IRQ_HANDLER sig_TMR2;
  115. extern IRQ_HANDLER sig_TMR3;
  116. extern IRQ_HANDLER sig_SIO;
  117. extern IRQ_HANDLER sig_DMA0;
  118. extern IRQ_HANDLER sig_DMA1;
  119. extern IRQ_HANDLER sig_DMA2;
  120. extern IRQ_HANDLER sig_DMA3;
  121. extern IRQ_HANDLER sig_KEYPAD;
  122. extern IRQ_HANDLER sig_GAMEPAK;
  123. extern void InitIrqHandler(void);
  124. #elif defined(MCU_AT91R40008)
  125. extern IRQ_HANDLER sig_FIQ;
  126. extern IRQ_HANDLER sig_SWIRQ;
  127. extern IRQ_HANDLER sig_UART0;
  128. extern IRQ_HANDLER sig_UART1;
  129. extern IRQ_HANDLER sig_TC0;
  130. extern IRQ_HANDLER sig_TC1;
  131. extern IRQ_HANDLER sig_TC2;
  132. extern IRQ_HANDLER sig_WDI;
  133. extern IRQ_HANDLER sig_PIO;
  134. extern IRQ_HANDLER sig_INTERRUPT0;
  135. extern IRQ_HANDLER sig_INTERRUPT1;
  136. extern IRQ_HANDLER sig_INTERRUPT2;
  137. #elif defined(MCU_LPC2XXX)
  138. extern IRQ_HANDLER sig_UART0;
  139. extern IRQ_HANDLER sig_UART1;
  140. extern IRQ_HANDLER sig_TC0;
  141. extern IRQ_HANDLER sig_TC1;
  142. extern IRQ_HANDLER sig_WDI;
  143. extern IRQ_HANDLER sig_INTERRUPT0;
  144. extern IRQ_HANDLER sig_INTERRUPT1;
  145. extern IRQ_HANDLER sig_INTERRUPT2;
  146. extern IRQ_HANDLER sig_INTERRUPT2;
  147. #elif defined(MCU_AT91SAM7X)
  148. extern IRQ_HANDLER sig_FIQ;
  149. extern IRQ_HANDLER sig_SYS;
  150. extern IRQ_HANDLER sig_UART0;
  151. extern IRQ_HANDLER sig_UART1;
  152. extern IRQ_HANDLER sig_TC0;
  153. extern IRQ_HANDLER sig_TC1;
  154. extern IRQ_HANDLER sig_TC2;
  155. extern IRQ_HANDLER sig_INTERRUPT0;
  156. extern IRQ_HANDLER sig_INTERRUPT1;
  157. extern IRQ_HANDLER sig_EMAC;
  158. extern IRQ_HANDLER sig_PIOA;
  159. extern IRQ_HANDLER sig_PIOB;
  160. extern IRQ_HANDLER sig_PIOC;
  161. extern IRQ_HANDLER sig_SWIRQ;
  162. extern IRQ_HANDLER sig_SSC;
  163. extern IRQ_HANDLER sig_SPI0;
  164. extern IRQ_HANDLER sig_SPI1;
  165. extern IRQ_HANDLER sig_TWI;
  166. extern IRQ_HANDLER sig_ADC;
  167. /*
  168. * Registered system interrupt handler information structure.
  169. */
  170. typedef struct {
  171. void *sir_arg;
  172. void (*sir_handler) (void *);
  173. int sir_enabled;
  174. } SYSIRQ_HANDLER;
  175. extern SYSIRQ_HANDLER syssig_DBGU;
  176. extern SYSIRQ_HANDLER syssig_MC;
  177. extern SYSIRQ_HANDLER syssig_PIT;
  178. extern SYSIRQ_HANDLER syssig_PMC;
  179. extern SYSIRQ_HANDLER syssig_RSTC;
  180. extern SYSIRQ_HANDLER syssig_RTT;
  181. extern SYSIRQ_HANDLER syssig_WDT;
  182. extern int NutRegisterSysIrqHandler(SYSIRQ_HANDLER * sysirq, void (*handler) (void *), void *arg);
  183. extern int NutSysIrqEnable(SYSIRQ_HANDLER * sysirq);
  184. extern int NutSysIrqDisable(SYSIRQ_HANDLER * sysirq);
  185. #elif defined(MCU_AT91SAM7S) || defined(MCU_AT91SAM7SE)
  186. extern IRQ_HANDLER sig_FIQ;
  187. extern IRQ_HANDLER sig_SYS;
  188. extern IRQ_HANDLER sig_UART0;
  189. extern IRQ_HANDLER sig_UART1;
  190. extern IRQ_HANDLER sig_TC0;
  191. extern IRQ_HANDLER sig_TC1;
  192. extern IRQ_HANDLER sig_TC2;
  193. extern IRQ_HANDLER sig_PWMC;
  194. extern IRQ_HANDLER sig_INTERRUPT0;
  195. extern IRQ_HANDLER sig_INTERRUPT1;
  196. extern IRQ_HANDLER sig_PIOA;
  197. extern IRQ_HANDLER sig_PIOB;
  198. extern IRQ_HANDLER sig_PIOC;
  199. extern IRQ_HANDLER sig_SWIRQ;
  200. extern IRQ_HANDLER sig_SSC;
  201. extern IRQ_HANDLER sig_SPI0;
  202. extern IRQ_HANDLER sig_TWI;
  203. /*
  204. * Registered system interrupt handler information structure.
  205. */
  206. typedef struct {
  207. void *sir_arg;
  208. void (*sir_handler) (void *);
  209. int sir_enabled;
  210. } SYSIRQ_HANDLER;
  211. extern SYSIRQ_HANDLER syssig_DBGU;
  212. extern SYSIRQ_HANDLER syssig_MC;
  213. extern SYSIRQ_HANDLER syssig_PIT;
  214. extern SYSIRQ_HANDLER syssig_PMC;
  215. extern SYSIRQ_HANDLER syssig_RSTC;
  216. extern SYSIRQ_HANDLER syssig_RTT;
  217. extern SYSIRQ_HANDLER syssig_WDT;
  218. extern int NutRegisterSysIrqHandler(SYSIRQ_HANDLER * sysirq, void (*handler) (void *), void *arg);
  219. extern int NutSysIrqEnable(SYSIRQ_HANDLER * sysirq);
  220. extern int NutSysIrqDisable(SYSIRQ_HANDLER * sysirq);
  221. #elif defined(MCU_AT91SAM9260) || defined(MCU_AT91SAM9XE512) || defined(MCU_AT91SAM9G45)
  222. extern IRQ_HANDLER sig_FIQ;
  223. extern IRQ_HANDLER sig_UART0;
  224. extern IRQ_HANDLER sig_UART1;
  225. extern IRQ_HANDLER sig_TC0;
  226. extern IRQ_HANDLER sig_TC1;
  227. extern IRQ_HANDLER sig_TC2;
  228. extern IRQ_HANDLER sig_INTERRUPT0;
  229. extern IRQ_HANDLER sig_INTERRUPT1;
  230. extern IRQ_HANDLER sig_EMAC;
  231. extern IRQ_HANDLER sig_PIOA;
  232. extern IRQ_HANDLER sig_PIOB;
  233. extern IRQ_HANDLER sig_PIOC;
  234. extern IRQ_HANDLER sig_SWIRQ;
  235. extern IRQ_HANDLER sig_SSC;
  236. extern IRQ_HANDLER sig_SPI0;
  237. extern IRQ_HANDLER sig_SPI1;
  238. extern IRQ_HANDLER sig_TWI;
  239. extern IRQ_HANDLER sig_ISI;
  240. /*
  241. * Registered system interrupt handler information structure.
  242. */
  243. typedef struct {
  244. void *sir_arg;
  245. void (*sir_handler) (void *);
  246. int sir_enabled;
  247. } SYSIRQ_HANDLER;
  248. extern SYSIRQ_HANDLER syssig_DBGU;
  249. extern SYSIRQ_HANDLER syssig_MC;
  250. extern SYSIRQ_HANDLER syssig_PIT;
  251. extern SYSIRQ_HANDLER syssig_PMC;
  252. extern SYSIRQ_HANDLER syssig_RSTC;
  253. extern SYSIRQ_HANDLER syssig_RTT;
  254. extern SYSIRQ_HANDLER syssig_WDT;
  255. extern int NutRegisterSysIrqHandler(SYSIRQ_HANDLER * sysirq, void (*handler) (void *), void *arg);
  256. extern int NutSysIrqEnable(SYSIRQ_HANDLER * sysirq);
  257. extern int NutSysIrqDisable(SYSIRQ_HANDLER * sysirq);
  258. #elif defined(MCU_ZERO)
  259. #else
  260. #warning "No MCU defined"
  261. #endif
  262. #endif