]> git.sur5r.net Git - freertos/blob - Demo/AVR32_UC3A_GCC/Atmel_SW_Framework/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE/nlao_interrupts.h
057c005223c1a7e79dff774e78b1d940e77b670d
[freertos] / Demo / AVR32_UC3A_GCC / Atmel_SW_Framework / UTILS / LIBS / NEWLIB_ADDONS / INCLUDE / nlao_interrupts.h
1 /* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */\r
2
3 /*This file is prepared for Doxygen automatic documentation generation.*/\r
4 /*! \file *********************************************************************\r
5  *\r
6  * \brief NEWLIB_ADDONS interrupts include file for AVR32.\r
7  *\r
8  * - Compiler:           GNU GCC for AVR32\r
9  * - Supported devices:  All AVR32 devices can be used.\r
10  * - AppNote:\r
11  *\r
12  * \author               Atmel Corporation: http://www.atmel.com \n\r
13  *                       Support and FAQ: http://support.atmel.no/\r
14  *\r
15  ******************************************************************************/\r
16 \r
17 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.\r
18  *\r
19  * Redistribution and use in source and binary forms, with or without\r
20  * modification, are permitted provided that the following conditions are met:\r
21  *\r
22  * 1. Redistributions of source code must retain the above copyright notice, this\r
23  * list of conditions and the following disclaimer.\r
24  *\r
25  * 2. Redistributions in binary form must reproduce the above copyright notice,\r
26  * this list of conditions and the following disclaimer in the documentation\r
27  * and/or other materials provided with the distribution.\r
28  *\r
29  * 3. The name of Atmel may not be used to endorse or promote products derived\r
30  * from this software without specific prior written permission.\r
31  *\r
32  * 4. This software may only be redistributed and used in connection with an Atmel\r
33  * AVR product.\r
34  *\r
35  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED\r
36  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
37  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE\r
38  * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR\r
39  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
40  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
41  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
42  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
43  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
44  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE\r
45  *\r
46  */\r
47 \r
48 #ifndef __AVR32_NEWLIB_ADDONS_INTERRUPTS_H__\r
49 #define __AVR32_NEWLIB_ADDONS_INTERRUPTS_H__\r
50 \r
51 #include <_ansi.h>\r
52 \r
53 _BEGIN_STD_C\r
54 \r
55 #define INT_GRPS          64\r
56 #define INT_LINES         32\r
57 #define INTPR_BASE        (__intc_base__ + 0x0000)\r
58 #define INTREQ_BASE       (__intc_base__ + 64*4)\r
59 #define INTCAUSE_BASE     (__intc_base__ + 2*64*4)\r
60 \r
61 //Register offsets\r
62 #define INTLEVEL          30\r
63 #define AUTOVECTOR        0\r
64 #define AUTOVECTOR_BITS   14\r
65 \r
66 //Priorities\r
67 #define INT0              0\r
68 #define INT1              1\r
69 #define INT2              2\r
70 #define INT3              3\r
71 \r
72 \r
73 typedef void (*__newlib_int_handler)(int /* int_grp*/, void */*user_handle*/);\r
74 \r
75 __newlib_int_handler register_interrupt(__newlib_int_handler handler, int int_grp, int line, int priority,\r
76                                  .../* void *user_handle*/);\r
77 void init_interrupts();\r
78 void set_interrupts_base(void *base);\r
79 \r
80 _END_STD_C\r
81 \r
82 #endif\r