]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/driverlib/interrupt.h
commit 9f316c246baafa15c542a5aea81a94f26e3d6507
[freertos] / FreeRTOS / Demo / CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil / driverlib / interrupt.h
1 /*
2  * -------------------------------------------
3  *    MSP432 DriverLib - v3_10_00_09 
4  * -------------------------------------------
5  *
6  * --COPYRIGHT--,BSD,BSD
7  * Copyright (c) 2014, Texas Instruments Incorporated
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * *  Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions and the following disclaimer.
16  *
17  * *  Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in the
19  *    documentation and/or other materials provided with the distribution.
20  *
21  * *  Neither the name of Texas Instruments Incorporated nor the names of
22  *    its contributors may be used to endorse or promote products derived
23  *    from this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
27  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
29  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  * --/COPYRIGHT--*/
37 #ifndef __INTERRUPT_H__
38 #define __INTERRUPT_H__
39
40 //*****************************************************************************
41 //
42 //! \addtogroup interrupt_api
43 //! @{
44 //
45 //*****************************************************************************
46
47
48 //*****************************************************************************
49 //
50 // If building with a C++ compiler, make all of the definitions in this header
51 // have a C binding.
52 //
53 //*****************************************************************************
54 #ifdef __cplusplus
55 extern "C"
56 {
57 #endif
58
59 #include <stdint.h>
60 #include <stdbool.h>
61 #include <msp.h>
62
63 /******************************************************************************
64 * NVIC interrupts                                                             *
65 ******************************************************************************/
66 /* System exceptions */
67 #define FAULT_NMI                                       ( 2) /* NMI fault */
68 #define FAULT_HARD                                      ( 3) /* Hard fault */
69 #define FAULT_MPU                                       ( 4) /* MPU fault */
70 #define FAULT_BUS                                       ( 5) /* Bus fault */
71 #define FAULT_USAGE                                     ( 6) /* Usage fault */
72 #define FAULT_SVCALL                                    (11) /* SVCall */
73 #define FAULT_DEBUG                                     (12) /* Debug monitor */
74 #define FAULT_PENDSV                                    (14) /* PendSV */
75 #define FAULT_SYSTICK                                   (15) /* System Tick */
76
77 /* External interrupts */
78 #define INT_PSS                                         (16) /* PSS IRQ */
79 #define INT_CS                                          (17) /* CS IRQ */
80 #define INT_PCM                                         (18) /* PCM IRQ */
81 #define INT_WDT_A                                       (19) /* WDT_A IRQ */
82 #define INT_FPU                                         (20) /* FPU IRQ */
83 #define INT_FLCTL                                       (21) /* FLCTL IRQ */
84 #define INT_COMP_E0                                     (22) /* COMP_E0 IRQ */
85 #define INT_COMP_E1                                     (23) /* COMP_E1 IRQ */
86 #define INT_TA0_0                                       (24) /* TA0_0 IRQ */
87 #define INT_TA0_N                                       (25) /* TA0_N IRQ */
88 #define INT_TA1_0                                       (26) /* TA1_0 IRQ */
89 #define INT_TA1_N                                       (27) /* TA1_N IRQ */
90 #define INT_TA2_0                                       (28) /* TA2_0 IRQ */
91 #define INT_TA2_N                                       (29) /* TA2_N IRQ */
92 #define INT_TA3_0                                       (30) /* TA3_0 IRQ */
93 #define INT_TA3_N                                       (31) /* TA3_N IRQ */
94 #define INT_EUSCIA0                                     (32) /* EUSCIA0 IRQ */
95 #define INT_EUSCIA1                                     (33) /* EUSCIA1 IRQ */
96 #define INT_EUSCIA2                                     (34) /* EUSCIA2 IRQ */
97 #define INT_EUSCIA3                                     (35) /* EUSCIA3 IRQ */
98 #define INT_EUSCIB0                                     (36) /* EUSCIB0 IRQ */
99 #define INT_EUSCIB1                                     (37) /* EUSCIB1 IRQ */
100 #define INT_EUSCIB2                                     (38) /* EUSCIB2 IRQ */
101 #define INT_EUSCIB3                                     (39) /* EUSCIB3 IRQ */
102 #define INT_ADC14                                       (40) /* ADC14 IRQ */
103 #define INT_T32_INT1                                    (41) /* T32_INT1 IRQ */
104 #define INT_T32_INT2                                    (42) /* T32_INT2 IRQ */
105 #define INT_T32_INTC                                    (43) /* T32_INTC IRQ */
106 #define INT_AES256                                      (44) /* AES256 IRQ */
107 #define INT_RTC_C                                       (45) /* RTC_C IRQ */
108 #define INT_DMA_ERR                                     (46) /* DMA_ERR IRQ */
109 #define INT_DMA_INT3                                    (47) /* DMA_INT3 IRQ */
110 #define INT_DMA_INT2                                    (48) /* DMA_INT2 IRQ */
111 #define INT_DMA_INT1                                    (49) /* DMA_INT1 IRQ */
112 #define INT_DMA_INT0                                    (50) /* DMA_INT0 IRQ */
113 #define INT_PORT1                                       (51) /* PORT1 IRQ */
114 #define INT_PORT2                                       (52) /* PORT2 IRQ */
115 #define INT_PORT3                                       (53) /* PORT3 IRQ */
116 #define INT_PORT4                                       (54) /* PORT4 IRQ */
117 #define INT_PORT5                                       (55) /* PORT5 IRQ */
118 #define INT_PORT6                                       (56) /* PORT6 IRQ */
119
120 #define NUM_INTERRUPTS                                  (56)
121 //*****************************************************************************
122 //
123 // Macro to generate an interrupt priority mask based on the number of bits
124 // of priority supported by the hardware.
125 //
126 //*****************************************************************************
127 #define INT_PRIORITY_MASK       ((0xFF << (8 - NUM_PRIORITY_BITS)) & 0xFF)
128 #define NUM_PRIORITY            8
129
130 #define NVIC_APINT_PRIGROUP_M   0x00000700  // Interrupt Priority Grouping
131 #define NVIC_APINT_PRIGROUP_7_1 0x00000000  // Priority group 7.1 split
132 #define NVIC_APINT_PRIGROUP_6_2 0x00000100  // Priority group 6.2 split
133 #define NVIC_APINT_PRIGROUP_5_3 0x00000200  // Priority group 5.3 split
134 #define NVIC_APINT_PRIGROUP_4_4 0x00000300  // Priority group 4.4 split
135 #define NVIC_APINT_PRIGROUP_3_5 0x00000400  // Priority group 3.5 split
136 #define NVIC_APINT_PRIGROUP_2_6 0x00000500  // Priority group 2.6 split
137 #define NVIC_APINT_PRIGROUP_1_7 0x00000600  // Priority group 1.7 split
138 #define NVIC_APINT_PRIGROUP_0_8 0x00000700  // Priority group 0.8 split
139 #define NVIC_SYS_PRI1_R         0xE000ED18  // System Handler Priority 1
140 #define NVIC_SYS_PRI2_R         0xE000ED1C  // System Handler Priority 2
141 #define NVIC_SYS_PRI3_R         0xE000ED20  // System Handler Priority 3
142 #define NVIC_PRI0_R             0xE000E400  // Interrupt 0-3 Priority
143 #define NVIC_PRI1_R             0xE000E404  // Interrupt 4-7 Priority
144 #define NVIC_PRI2_R             0xE000E408  // Interrupt 8-11 Priority
145 #define NVIC_PRI3_R             0xE000E40C  // Interrupt 12-15 Priority
146 #define NVIC_PRI4_R             0xE000E410  // Interrupt 16-19 Priority
147 #define NVIC_PRI5_R             0xE000E414  // Interrupt 20-23 Priority
148 #define NVIC_PRI6_R             0xE000E418  // Interrupt 24-27 Priority
149 #define NVIC_PRI7_R             0xE000E41C  // Interrupt 28-31 Priority
150 #define NVIC_PRI8_R             0xE000E420  // Interrupt 32-35 Priority
151 #define NVIC_PRI9_R             0xE000E424  // Interrupt 36-39 Priority
152 #define NVIC_PRI10_R            0xE000E428  // Interrupt 40-43 Priority
153 #define NVIC_PRI11_R            0xE000E42C  // Interrupt 44-47 Priority
154 #define NVIC_PRI12_R            0xE000E430  // Interrupt 48-51 Priority
155 #define NVIC_PRI13_R            0xE000E434  // Interrupt 52-55 Priority
156 #define NVIC_PRI14_R            0xE000E438  // Interrupt 56-59 Priority
157 #define NVIC_PRI15_R            0xE000E43C  // Interrupt 60-63 Priority
158 #define NVIC_EN0_R              0xE000E100  // Interrupt 0-31 Set Enable
159 #define NVIC_EN1_R              0xE000E104  // Interrupt 32-54 Set Enable
160 #define NVIC_DIS0_R             0xE000E180  // Interrupt 0-31 Clear Enable
161 #define NVIC_DIS1_R             0xE000E184  // Interrupt 32-54 Clear Enable
162 #define NVIC_PEND0_R            0xE000E200  // Interrupt 0-31 Set Pending
163 #define NVIC_PEND1_R            0xE000E204  // Interrupt 32-54 Set Pending
164 #define NVIC_UNPEND0_R          0xE000E280  // Interrupt 0-31 Clear Pending
165 #define NVIC_UNPEND1_R          0xE000E284  // Interrupt 32-54 Clear Pending
166 //*****************************************************************************
167 //
168 // Prototypes for the APIs.
169 //
170 //*****************************************************************************
171
172 //*****************************************************************************
173 //
174 //! Enables the processor interrupt.
175 //!
176 //! This function allows the processor to respond to interrupts.  This function
177 //! does not affect the set of interrupts enabled in the interrupt controller;
178 //! it just gates the single interrupt from the controller to the processor.
179 //!
180 //! \return Returns \b true if interrupts were disabled when the function was
181 //! called or \b false if they were initially enabled.
182 //
183 //*****************************************************************************
184 extern bool Interrupt_enableMaster(void);
185
186 //*****************************************************************************
187 //
188 //! Disables the processor interrupt.
189 //!
190 //! This function prevents the processor from receiving interrupts.  This
191 //! function does not affect the set of interrupts enabled in the interrupt
192 //! controller; it just gates the single interrupt from the controller to the
193 //! processor.
194 //!
195 //! \return Returns \b true if interrupts were already disabled when the
196 //! function was called or \b false if they were initially enabled.
197 //
198 //*****************************************************************************
199 extern bool Interrupt_disableMaster(void);
200
201 //*****************************************************************************
202 //
203 //! Registers a function to be called when an interrupt occurs.
204 //!
205 //! \param interruptNumber specifies the interrupt in question.
206 //! \param intHandler is a pointer to the function to be called.
207 //!
208 //! \note The use of this function (directly or indirectly via a peripheral
209 //! driver interrupt register function) moves the interrupt vector table from
210 //! flash to SRAM.  Therefore, care must be taken when linking the application
211 //! to ensure that the SRAM vector table is located at the beginning of SRAM;
212 //! otherwise the NVIC does not look in the correct portion of memory for the
213 //! vector table (it requires the vector table be on a 1 kB memory alignment).
214 //! Normally, the SRAM vector table is so placed via the use of linker scripts.
215 //! See the discussion of compile-time versus run-time interrupt handler
216 //! registration in the introduction to this chapter.
217 //!
218 //! \note This function is only used if the customer wants to specify the 
219 //!  interrupt handler at run time. In most cases, this is done through means
220 //!  of the user setting the ISR function pointer in the startup file. Refer
221 //!  Refer to the Module Operation section for more details.
222 //!
223 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
224 //! parameter
225 //!
226 //! \return None.
227 //
228 //*****************************************************************************
229 extern void Interrupt_registerInterrupt(uint32_t interruptNumber,
230         void (*intHandler)(void));
231
232 //*****************************************************************************
233 //
234 //! Unregisters the function to be called when an interrupt occurs.
235 //!
236 //! \param interruptNumber specifies the interrupt in question.
237 //!
238 //! This function is used to indicate that no handler should be called when the
239 //! given interrupt is asserted to the processor.  The interrupt source is
240 //! automatically disabled (via Interrupt_disableInterrupt()) if necessary.
241 //!
242 //! \sa Interrupt_registerInterrupt() for important information about
243 //! registering interrupt handlers.
244 //!
245 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
246 //! parameter
247 //!
248 //! \return None.
249 //
250 //*****************************************************************************
251 extern void Interrupt_unregisterInterrupt(uint32_t interruptNumber);
252
253 //*****************************************************************************
254 //
255 //! Sets the priority grouping of the interrupt controller.
256 //!
257 //! \param bits specifies the number of bits of preemptable priority.
258 //!
259 //! This function specifies the split between preemptable priority levels and
260 //! sub-priority levels in the interrupt priority specification.  The range of
261 //! the grouping values are dependent upon the hardware implementation; on
262 //! the MSP432 family, three bits are available for hardware interrupt
263 //! prioritization and therefore priority grouping values of three through
264 //! seven have the same effect.
265 //!
266 //! \return None.
267 //
268 //*****************************************************************************
269 extern void Interrupt_setPriorityGrouping(uint32_t bits);
270
271 //*****************************************************************************
272 //
273 //! Gets the priority grouping of the interrupt controller.
274 //!
275 //! This function returns the split between preemptable priority levels and
276 //! sub-priority levels in the interrupt priority specification.
277 //!
278 //! \return The number of bits of preemptable priority.
279 //
280 //*****************************************************************************
281 extern uint32_t Interrupt_getPriorityGrouping(void);
282
283 //*****************************************************************************
284 //
285 //! Sets the priority of an interrupt.
286 //!
287 //! \param interruptNumber specifies the interrupt in question.
288 //! \param priority specifies the priority of the interrupt.
289 //!
290 //! This function is used to set the priority of an interrupt.  When multiple
291 //! interrupts are asserted simultaneously, the ones with the highest priority
292 //! are processed before the lower priority interrupts.  Smaller numbers
293 //! correspond to higher interrupt priorities; priority 0 is the highest
294 //! interrupt priority.
295 //!
296 //! The hardware priority mechanism only looks at the upper N bits of the
297 //! priority level (where N is 3 for the MSP432 family), so any
298 //! prioritization must be performed in those bits.  The remaining bits can be
299 //! used to sub-prioritize the interrupt sources, and may be used by the
300 //! hardware priority mechanism on a future part.  This arrangement allows
301 //! priorities to migrate to different NVIC implementations without changing
302 //! the gross prioritization of the interrupts.
303 //!
304 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
305 //! parameter
306 //!
307 //! \return None.
308 //
309 //*****************************************************************************
310 extern void Interrupt_setPriority(uint32_t interruptNumber, uint8_t priority);
311
312 //*****************************************************************************
313 //
314 //! Gets the priority of an interrupt.
315 //!
316 //! \param interruptNumber specifies the interrupt in question.
317 //!
318 //! This function gets the priority of an interrupt.  See
319 //! Interrupt_setPriority() for a definition of the priority value.
320 //!
321 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
322 //! parameter
323 //!
324 //! \return Returns the interrupt priority, or -1 if an invalid interrupt was
325 //! specified.
326 //
327 //*****************************************************************************
328 extern uint8_t Interrupt_getPriority(uint32_t interruptNumber);
329
330 //*****************************************************************************
331 //
332 //! Enables an interrupt.
333 //!
334 //! \param interruptNumber specifies the interrupt to be enabled.
335 //!
336 //! The specified interrupt is enabled in the interrupt controller.  Other
337 //! enables for the interrupt (such as at the peripheral level) are unaffected
338 //! by this function.
339 //!
340 //! Valid values will vary from part to part, so it is important to check the
341 //! device specific datasheet, however for MSP432 101 the following values can
342 //! be provided:
343 //!     - \b FAULT_NMI
344 //!     - \b FAULT_HARD
345 //!     - \b FAULT_MPU
346 //!     - \b FAULT_BUS
347 //!     - \b FAULT_USAGE
348 //!     - \b FAULT_SVCALL
349 //!     - \b FAULT_DEBUG
350 //!     - \b FAULT_PENDSV
351 //!     - \b FAULT_SYSTICK
352 //!     - \b INT_PSS
353 //!     - \b INT_CS
354 //!     - \b INT_PCM
355 //!     - \b INT_WDT_A
356 //!     - \b INT_FPU
357 //!     - \b INT_FLCTL
358 //!     - \b INT_COMP0
359 //!     - \b INT_COMP1
360 //!     - \b INT_TA0_0
361 //!     - \b INT_TA0_N
362 //!     - \b INT_TA1_0
363 //!     - \b INT_TA1_N
364 //!     - \b INT_TA2_0
365 //!     - \b INT_TA2_N
366 //!     - \b INT_TA3_0
367 //!     - \b INT_TA3_N
368 //!     - \b INT_EUSCIA0
369 //!     - \b INT_EUSCIA1
370 //!     - \b INT_EUSCIA2
371 //!     - \b INT_EUSCIA3
372 //!     - \b INT_EUSCIB0
373 //!     - \b INT_EUSCIB1
374 //!     - \b INT_EUSCIB2
375 //!     - \b INT_EUSCIB3
376 //!     - \b INT_ADC14
377 //!     - \b INT_T32_INT1
378 //!     - \b INT_T32_INT2
379 //!     - \b INT_T32_INTC
380 //!     - \b INT_AES
381 //!     - \b INT_RTCC
382 //!     - \b INT_DMA_ERR
383 //!     - \b INT_DMA_INT3
384 //!     - \b INT_DMA_INT2
385 //!     - \b INT_DMA_INT1
386 //!     - \b INT_DMA_INT0
387 //!     - \b INT_PORT1
388 //!     - \b INT_PORT2
389 //!     - \b INT_PORT3
390 //!     - \b INT_PORT4
391 //!     - \b INT_PORT5
392 //!     - \b INT_PORT6
393 //!
394 //! \return None.
395 //
396 //*****************************************************************************
397 extern void Interrupt_enableInterrupt(uint32_t interruptNumber);
398
399 //*****************************************************************************
400 //
401 //! Disables an interrupt.
402 //!
403 //! \param interruptNumber specifies the interrupt to be disabled.
404 //!
405 //! The specified interrupt is disabled in the interrupt controller.  Other
406 //! enables for the interrupt (such as at the peripheral level) are unaffected
407 //! by this function.
408 //!
409 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
410 //! parameter
411 //!
412 //! \return None.
413 //
414 //*****************************************************************************
415 extern void Interrupt_disableInterrupt(uint32_t interruptNumber);
416
417 //*****************************************************************************
418 //
419 //! Returns if a peripheral interrupt is enabled.
420 //!
421 //! \param interruptNumber specifies the interrupt to check.
422 //!
423 //! This function checks if the specified interrupt is enabled in the interrupt
424 //! controller.
425 //!
426 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
427 //! parameter
428 //!
429 //! \return A non-zero value if the interrupt is enabled.
430 //
431 //*****************************************************************************
432 extern bool Interrupt_isEnabled(uint32_t interruptNumber);
433
434 //*****************************************************************************
435 //
436 //! Pends an interrupt.
437 //!
438 //! \param interruptNumber specifies the interrupt to be pended.
439 //!
440 //! The specified interrupt is pended in the interrupt controller.  Pending an
441 //! interrupt causes the interrupt controller to execute the corresponding
442 //! interrupt handler at the next available time, based on the current
443 //! interrupt state priorities. For example, if called by a higher priority
444 //! interrupt handler, the specified interrupt handler is not called until
445 //! after the current interrupt handler has completed execution.  The interrupt
446 //! must have been enabled for it to be called.
447 //!
448 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
449 //! parameter
450 //!
451 //! \return None.
452 //
453 //*****************************************************************************
454 extern void Interrupt_pendInterrupt(uint32_t interruptNumber);
455
456 //*****************************************************************************
457 //
458 //! Un-pends an interrupt.
459 //!
460 //! \param interruptNumber specifies the interrupt to be un-pended.
461 //!
462 //! The specified interrupt is un-pended in the interrupt controller.  This
463 //! will cause any previously generated interrupts that have not been handled
464 //! yet (due to higher priority interrupts or the interrupt no having been
465 //! enabled yet) to be discarded.
466 //!
467 //! See \link Interrupt_enableInterrupt \endlink for details about the interrupt
468 //! parameter
469 //!
470 //! \return None.
471 //
472 //*****************************************************************************
473 extern void Interrupt_unpendInterrupt(uint32_t interruptNumber);
474
475 //*****************************************************************************
476 //
477 //! Sets the priority masking level
478 //!
479 //! \param priorityMask is the priority level that is masked.
480 //!
481 //! This function sets the interrupt priority masking level so that all
482 //! interrupts at the specified or lesser priority level are masked.  Masking
483 //! interrupts can be used to globally disable a set of interrupts with
484 //! priority below a predetermined threshold.  A value of 0 disables priority
485 //! masking.
486 //!
487 //! Smaller numbers correspond to higher interrupt priorities.  So for example
488 //! a priority level mask of 4 allows interrupts of priority level 0-3,
489 //! and interrupts with a numerical priority of 4 and greater are blocked.
490 //!
491 //! The hardware priority mechanism only looks at the upper N bits of the
492 //! priority level (where N is 3 for the MSP432 family), so any
493 //! prioritization must be performed in those bits.
494 //!
495 //! \return None.
496 //
497 //*****************************************************************************
498 extern void Interrupt_setPriorityMask(uint8_t priorityMask);
499
500 //*****************************************************************************
501 //
502 //! Gets the priority masking level
503 //!
504 //! This function gets the current setting of the interrupt priority masking
505 //! level.  The value returned is the priority level such that all interrupts
506 //! of that and lesser priority are masked.  A value of 0 means that priority
507 //! masking is disabled.
508 //!
509 //! Smaller numbers correspond to higher interrupt priorities.  So for example
510 //! a priority level mask of 4 allows interrupts of priority level 0-3,
511 //! and interrupts with a numerical priority of 4 and greater are blocked.
512 //!
513 //! The hardware priority mechanism only looks at the upper N bits of the
514 //! priority level (where N is 3 for the MSP432 family), so any
515 //! prioritization must be performed in those bits.
516 //!
517 //! \return Returns the value of the interrupt priority level mask.
518 //
519 //*****************************************************************************
520 extern uint8_t Interrupt_getPriorityMask(void);
521
522 //*****************************************************************************
523 //
524 //! Sets the address of the vector table. This function is for advanced users
525 //! who might want to switch between multiple instances of vector tables
526 //! (perhaps between flash/ram).
527 //!
528 //! \param addr is the new address of the vector table.
529 //!
530 //! \return None.
531 //
532 //*****************************************************************************
533 extern void Interrupt_setVectorTableAddress(uint32_t addr);
534
535 //*****************************************************************************
536 //
537 //! Returns the address of the interrupt vector table.
538 //!
539 //! \return Address of the vector table.
540 //
541 //*****************************************************************************
542 extern uint32_t Interrupt_getVectorTableAddress(void);
543
544 //*****************************************************************************
545 //
546 //! Enables the processor to sleep when exiting an ISR. For low power operation,
547 //! this is ideal as power cycles are not wasted with the processing required
548 //! for waking up from an ISR and going back to sleep.
549 //!
550 //! \return None
551 //
552 //*****************************************************************************
553 extern void Interrupt_enableSleepOnIsrExit(void);
554
555 //*****************************************************************************
556 //
557 //! Disables the processor to sleep when exiting an ISR.
558 //!
559 //! \return None
560 //
561 //*****************************************************************************
562 extern void Interrupt_disableSleepOnIsrExit(void);
563
564 //*****************************************************************************
565 //
566 // Mark the end of the C bindings section for C++ compilers.
567 //
568 //*****************************************************************************
569 #ifdef __cplusplus
570 }
571 #endif
572
573 //*****************************************************************************
574 //
575 // Close the Doxygen group.
576 //! @}
577 //
578 //*****************************************************************************
579
580 #endif // __INTERRUPT_H__