Contiki 3.x
nvic.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014, University of Southampton, Electronics and Computer Science
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the Institute nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * This file is part of the Contiki operating system.
30 */
31 
32 /**
33 * \file
34 * Header file for the MKL25Z NVIC functions.
35 *
36 * \author
37 * Graeme Bragg - <g.bragg@ecs.soton.ac.uk>
38 */
39 
40 #ifndef NVIC_H_MKL25z__
41 #define NVIC_H_MKL25Z__
42 
43 #include <MKL25Z4.h>
44 
45 
46 #define IRQ_DMA_Channel0 0
47 #define IRQ_DMA_Channel1 1
48 #define IRQ_DMA_Channel2 2
49 #define IRQ_DMA_Channel3 3
50 #define IRQ_FTFA 5
51 #define IRQ_PMC 6
52 #define IRQ_LLWU 7
53 #define IRQ_I2C0 8
54 #define IRQ_I2C1 9
55 #define IRQ_SPI0 10
56 #define IRQ_SPI1 11
57 #define IRQ_UART0 12
58 #define IRQ_UART1 13
59 #define IRQ_UART2 14
60 #define IRQ_ADC0 15
61 #define IRQ_CMP0 16
62 #define IRQ_TPM0 17
63 #define IRQ_TPM1 18
64 #define IRQ_TPM2 19
65 #define IRQ_RTC_Alarm 20
66 #define IRQ_RTC_Seconds 21
67 #define IRQ_PIT 22
68 #define IRQ_USB 24
69 #define IRQ_DAC0 25
70 #define IRQ_TSI0 26
71 #define IRQ_MCG 27
72 #define IRQ_LPTMR0 28
73 #define IRQ_PORTA 30
74 #define IRQ_PORTD 31
75 
76 #define NVIC_IPR_Shift_Int0 6
77 #define NVIC_IPR_Shift_Int1 14
78 #define NVIC_IPR_Shift_Int2 22
79 #define NVIC_IPR_Shift_Int3 30
80 
81 
82 void NVIC_ENABLE_INT(uint32_t IRQ);
83 
84 void NVIC_DISABLE_INT(uint32_t IRQ);
85 
86 void NVIC_SET_PENDING(uint32_t IRQ);
87 
88 void NVIC_CLEAR_PENDING(uint32_t IRQ);
89 
90 void NVIC_Set_Priority(uint32_t IRQ, uint8_t priority);
91 
92 void NVIC_SET_SYSTICK_PRI(uint8_t priority);
93 
94 #endif /* NVIC_H_MKL25Z__ */
void NVIC_DISABLE_INT(uint32_t IRQ)
Disable specified interrupt in the ARM NVIC.
Definition: nvic.c:95
void NVIC_Set_Priority(uint32_t IRQ, uint8_t priority)
Set the priority of the specified interrupt in the ARM NVIC.
Definition: nvic.c:142
void NVIC_CLEAR_PENDING(uint32_t IRQ)
Clear a pending interrupt for the specified interrupt in the ARM NVIC.
Definition: nvic.c:124
CMSIS Peripheral Access Layer for MKL25Z4.
void NVIC_ENABLE_INT(uint32_t IRQ)
Enable specified interrupt in the ARM NVIC.
Definition: nvic.c:80
void NVIC_SET_SYSTICK_PRI(uint8_t priority)
Set the priority of the SYSTICK interrupt.
Definition: nvic.c:188
void NVIC_SET_PENDING(uint32_t IRQ)
Set a pending interrupt for the specified interrupt in the ARM NVIC.
Definition: nvic.c:110