]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/Common/drivers/LuminaryMicro/interrupt.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / Common / drivers / LuminaryMicro / interrupt.h
1 //*****************************************************************************\r
2 //\r
3 // interrupt.h - Prototypes for the NVIC Interrupt Controller Driver.\r
4 //\r
5 // Copyright (c) 2005-2008 Luminary Micro, Inc.  All rights reserved.\r
6 // \r
7 // Software License Agreement\r
8 // \r
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and\r
10 // exclusively on LMI's microcontroller products.\r
11 // \r
12 // The software is owned by LMI and/or its suppliers, and is protected under\r
13 // applicable copyright laws.  All rights are reserved.  You may not combine\r
14 // this software with "viral" open-source software in order to form a larger\r
15 // program.  Any use in violation of the foregoing restrictions may subject\r
16 // the user to criminal sanctions under applicable laws, as well as to civil\r
17 // liability for the breach of the terms and conditions of this license.\r
18 // \r
19 // THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED\r
20 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF\r
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.\r
22 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR\r
23 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.\r
24 // \r
25 // This is part of revision 2523 of the Stellaris Peripheral Driver Library.\r
26 //\r
27 //*****************************************************************************\r
28 \r
29 #ifndef __INTERRUPT_H__\r
30 #define __INTERRUPT_H__\r
31 \r
32 //*****************************************************************************\r
33 //\r
34 // If building with a C++ compiler, make all of the definitions in this header\r
35 // have a C binding.\r
36 //\r
37 //*****************************************************************************\r
38 #ifdef __cplusplus\r
39 extern "C"\r
40 {\r
41 #endif\r
42 \r
43 //*****************************************************************************\r
44 //\r
45 // Macro to generate an interrupt priority mask based on the number of bits\r
46 // of priority supported by the hardware.\r
47 //\r
48 //*****************************************************************************\r
49 #define INT_PRIORITY_MASK       ((0xFF << (8 - NUM_PRIORITY_BITS)) & 0xFF)\r
50 \r
51 //*****************************************************************************\r
52 //\r
53 // Prototypes for the APIs.\r
54 //\r
55 //*****************************************************************************\r
56 extern tBoolean IntMasterEnable(void);\r
57 extern tBoolean IntMasterDisable(void);\r
58 extern void IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void));\r
59 extern void IntUnregister(unsigned long ulInterrupt);\r
60 extern void IntPriorityGroupingSet(unsigned long ulBits);\r
61 extern unsigned long IntPriorityGroupingGet(void);\r
62 extern void IntPrioritySet(unsigned long ulInterrupt,\r
63                            unsigned char ucPriority);\r
64 extern long IntPriorityGet(unsigned long ulInterrupt);\r
65 extern void IntEnable(unsigned long ulInterrupt);\r
66 extern void IntDisable(unsigned long ulInterrupt);\r
67 \r
68 //*****************************************************************************\r
69 //\r
70 // Mark the end of the C bindings section for C++ compilers.\r
71 //\r
72 //*****************************************************************************\r
73 #ifdef __cplusplus\r
74 }\r
75 #endif\r
76 \r
77 #endif // __INTERRUPT_H__\r