Change filename and macros from AT91SAM3.. to SAM3.. to conform to Atmel's official...
[bertos.git] / bertos / cpu / cortex-m3 / io / sam3_ints.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
30  *
31  * -->
32  *
33  * \brief SAM3 interrupt definitions.
34  */
35
36 #ifndef SAM3_INTS_H
37 #define SAM3_INTS_H
38
39 /**
40  * Defines for the fault assignments.
41  */
42 /*\{*/
43 #define FAULT_NMI               2           ///< NMI fault
44 #define FAULT_HARD              3           ///< Hard fault
45 #define FAULT_MPU               4           ///< MPU fault
46 #define FAULT_BUS               5           ///< Bus fault
47 #define FAULT_USAGE             6           ///< Usage fault
48 #define FAULT_SVCALL            11          ///< SVCall
49 #define FAULT_DEBUG             12          ///< Debug monitor
50 #define FAULT_PENDSV            14          ///< PendSV
51 #define FAULT_SYSTICK           15          ///< System Tick
52 /*\}*/
53
54 /**
55  * Defines for the interrupt assignments.
56  */
57 /*\{*/
58 #define INT_PERIPH_BASE  16
59
60 #define INT_SUPC    (INT_PERIPH_BASE + SUPC_ID)   ///< Supply Controller (SUPC)
61 #define INT_RSTC    (INT_PERIPH_BASE + RSTC_ID)   ///< Reset Controller (RSTC)
62 #define INT_RTC     (INT_PERIPH_BASE + RTC_ID)    ///< Real Time Clock (RTC)
63 #define INT_RTT     (INT_PERIPH_BASE + RTT_ID)    ///< Real Time Timer (RTT)
64 #define INT_WDT     (INT_PERIPH_BASE + WDT_ID)    ///< Watchdog Timer (WDT)
65 #define INT_PMC     (INT_PERIPH_BASE + PMC_ID)    ///< Power Management Controller (PMC)
66 #define INT_EFC     (INT_PERIPH_BASE + EFC_ID)    ///< Enhanced Flash Controller (EFC)
67 #define INT_UART0   (INT_PERIPH_BASE + UART0_ID)  ///< UART 0 (UART0)
68 #define INT_UART1   (INT_PERIPH_BASE + UART1_ID)  ///< UART 1 (UART1)
69 #define INT_PIOA    (INT_PERIPH_BASE + PIOA_ID)   ///< Parallel I/O Controller A (PIOA)
70 #define INT_PIOB    (INT_PERIPH_BASE + PIOB_ID)   ///< Parallel I/O Controller B (PIOB)
71 #define INT_PIOC    (INT_PERIPH_BASE + PIOC_ID)   ///< Parallel I/O Controller C (PIOC)
72 #define INT_US0     (INT_PERIPH_BASE + US0_ID)    ///< USART 0 (USART0)
73 #define INT_US1     (INT_PERIPH_BASE + US1_ID)    ///< USART 1 (USART1)
74 #define INT_TWI0    (INT_PERIPH_BASE + TWI0_ID)   ///< Two Wire Interface 0 (TWI0)
75 #define INT_TWI1    (INT_PERIPH_BASE + TWI1_ID)   ///< Two Wire Interface 1 (TWI1)
76 #define INT_SPI0    (INT_PERIPH_BASE + SPI0_ID)   ///< Serial Peripheral Interface (SPI)
77 #define INT_TC0     (INT_PERIPH_BASE + TC0_ID)    ///< Timer/Counter 0 (TC0)
78 #define INT_TC1     (INT_PERIPH_BASE + TC1_ID)    ///< Timer/Counter 1 (TC1)
79 #define INT_TC2     (INT_PERIPH_BASE + TC2_ID)    ///< Timer/Counter 2 (TC2)
80 #define INT_TC3     (INT_PERIPH_BASE + TC3_ID)    ///< Timer/Counter 3 (TC3)
81 #define INT_TC4     (INT_PERIPH_BASE + TC4_ID)    ///< Timer/Counter 4 (TC4)
82 #define INT_TC5     (INT_PERIPH_BASE + TC5_ID)    ///< Timer/Counter 5 (TC5)
83 #define INT_ADC     (INT_PERIPH_BASE + ADC_ID)    ///< Analog To Digital Converter (ADC)
84 #define INT_DACC    (INT_PERIPH_BASE + DACC_ID)   ///< Digital To Analog Converter (DACC)
85 #define INT_PWM     (INT_PERIPH_BASE + PWM_ID)    ///< Pulse Width Modulation (PWM)
86 /*\}*/
87
88 /**
89  * Total number of interrupts.
90  */
91 /*\{*/
92 #define NUM_INTERRUPTS  48
93 /*\}*/
94
95 #endif /* SAM3_INTS_H */