1 /*
2  * Note:
3  * This file content is a partial copy-paste from nrfx's nrf5_common.h
4  * and of nrf51_to_nrf52.h
5  */
6 /*
7  * Copyright (c) 2016 Linaro Ltd.
8  * Copyright (c) 2016 Nordic Semiconductor ASA
9  *
10  * SPDX-License-Identifier: Apache-2.0
11  */
12 
13 #ifndef _NRF5_SOC_COMMON_H_
14 #define _NRF5_SOC_COMMON_H_
15 
16 /**
17  * @file Common definitions for NRF51/NRF52 family processors.
18  *
19  * The nRF51 IRQs can all be represented by the common definitions.
20  *
21  * Based on Nordic MDK included header files: nrf51.h and nrf51_to_nrf52.h
22  */
23 
24 #define NRF5_IRQ_POWER_CLOCK_IRQn              0
25 #define NRF5_IRQ_RADIO_IRQn                    1
26 #define NRF5_IRQ_UART0_IRQn                    2
27 #define NRF5_IRQ_SPI0_TWI0_IRQn                3
28 #define NRF5_IRQ_SPI1_TWI1_IRQn                4
29 #define NRF5_IRQ_GPIOTE_IRQn                   6
30 #define NRF5_IRQ_ADC_IRQn                      7
31 #define NRF5_IRQ_TIMER0_IRQn                   8
32 #define NRF5_IRQ_TIMER1_IRQn                   9
33 #define NRF5_IRQ_TIMER2_IRQn                   10
34 #define NRF5_IRQ_RTC0_IRQn                     11
35 #define NRF5_IRQ_TEMP_IRQn                     12
36 #define NRF5_IRQ_RNG_IRQn                      13
37 #define NRF5_IRQ_ECB_IRQn                      14
38 #define NRF5_IRQ_CCM_AAR_IRQn                  15
39 #define NRF5_IRQ_WDT_IRQn                      16
40 #define NRF5_IRQ_RTC1_IRQn                     17
41 #define NRF5_IRQ_QDEC_IRQn                     18
42 #define NRF5_IRQ_LPCOMP_IRQn                   19
43 #define NRF5_IRQ_SWI0_IRQn                     20
44 #define NRF5_IRQ_SWI1_IRQn                     21
45 #define NRF5_IRQ_SWI2_IRQn                     22
46 #define NRF5_IRQ_SWI3_IRQn                     23
47 #define NRF5_IRQ_SWI4_IRQn                     24
48 #define NRF5_IRQ_SWI5_IRQn                     25
49 
50 /**
51  * @file Interrupt numbers for NRF52 family processors.
52  *
53  * Based on Nordic MDK included header file: nrf52.h
54  */
55 
56 #define NRF52_IRQ_NFCT_IRQn                    5
57 #define NRF52_IRQ_TIMER3_IRQn                  26
58 #define NRF52_IRQ_TIMER4_IRQn                  27
59 #define NRF52_IRQ_PWM0_IRQn                    28
60 #define NRF52_IRQ_PDM_IRQn                     29
61 #define NRF52_IRQ_MWU_IRQn                     32
62 #define NRF52_IRQ_PWM1_IRQn                    33
63 #define NRF52_IRQ_PWM2_IRQn                    34
64 #define NRF52_IRQ_SPIM2_SPIS2_SPI2_IRQn        35
65 #define NRF52_IRQ_RTC2_IRQn                    36
66 #define NRF52_IRQ_I2S_IRQn                     37
67 #define NRF52_IRQ_FPU_IRQn                     38
68 
69 #endif /* _NRF5_SOC_COMMON_H_ */
70 
71 /*
72 
73 Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved.
74 
75 Redistribution and use in source and binary forms, with or without
76 modification, are permitted provided that the following conditions are met:
77 
78 1. Redistributions of source code must retain the above copyright notice, this
79    list of conditions and the following disclaimer.
80 
81 2. Redistributions in binary form must reproduce the above copyright
82    notice, this list of conditions and the following disclaimer in the
83    documentation and/or other materials provided with the distribution.
84 
85 3. Neither the name of Nordic Semiconductor ASA nor the names of its
86    contributors may be used to endorse or promote products derived from this
87    software without specific prior written permission.
88 
89 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
90 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
91 IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
92 ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
93 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
94 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
95 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
96 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
97 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
98 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
99 POSSIBILITY OF SUCH DAMAGE.
100 
101 */
102 
103 #ifndef NRF51_TO_NRF52_H
104 #define NRF51_TO_NRF52_H
105 
106 #define SWI4_IRQn               SWI4_EGU4_IRQn
107 #define SWI5_IRQn               SWI5_EGU5_IRQn
108 
109 #endif /* NRF51_TO_NRF52_H */
110