1 /**
2  * \file
3  *
4  * \brief INTC software driver API for AVR UC3 devices.
5  *
6  * Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
7  *
8  * \asf_license_start
9  *
10  * \page License
11  *
12  * Subject to your compliance with these terms, you may use Microchip
13  * software and any derivatives exclusively with Microchip products.
14  * It is your responsibility to comply with third party license terms applicable
15  * to your use of third party software (including open source software) that
16  * may accompany Microchip software.
17  *
18  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19  * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20  * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21  * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22  * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23  * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24  * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25  * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE.  TO THE FULLEST EXTENT
26  * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27  * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28  * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29  *
30  * \asf_license_stop
31  *
32  */
33 /*
34  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
35  */
36 
37 #ifndef _INTC_H_
38 #define _INTC_H_
39 
40 #include "compiler.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /**
47  * \defgroup intc_group INTC Software Driver API for AVR UC3
48  *
49  * This is a software module to register interrupt handlers at any specified
50  * interrupt level to any interrupt line managed by the INTC module in AVR UC3
51  * devices.
52  * @{
53  */
54 
55 //! Maximal number of interrupt request lines per group.
56 #define AVR32_INTC_MAX_NUM_IRQS_PER_GRP      32
57 
58 //! Number of interrupt priority levels.
59 #define AVR32_INTC_NUM_INT_LEVELS            (1 << AVR32_INTC_IPR_INTLEVEL_SIZE)
60 
61 
62 #ifdef __AVR32_ABI_COMPILER__
63 // (Automatically defined when compiling for AVR UC3, not when assembling).
64 
65 extern void INTC_init_interrupts(void);
66 extern void INTC_register_interrupt(__int_handler handler, uint32_t irq,
67 		uint32_t int_level);
68 
69 #endif  // __AVR32_ABI_COMPILER__
70 
71 //! @}
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif  // _INTC_H_
78