1 /* 2 3 Copyright (c) 2010 - 2023, Nordic Semiconductor ASA All rights reserved. 4 5 SPDX-License-Identifier: BSD-3-Clause 6 7 Redistribution and use in source and binary forms, with or without 8 modification, are permitted provided that the following conditions are met: 9 10 1. Redistributions of source code must retain the above copyright notice, this 11 list of conditions and the following disclaimer. 12 13 2. Redistributions in binary form must reproduce the above copyright 14 notice, this list of conditions and the following disclaimer in the 15 documentation and/or other materials provided with the distribution. 16 17 3. Neither the name of Nordic Semiconductor ASA nor the names of its 18 contributors may be used to endorse or promote products derived from this 19 software without specific prior written permission. 20 21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE 24 ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 POSSIBILITY OF SUCH DAMAGE. 32 33 */ 34 35 #ifndef NRF_H 36 #define NRF_H 37 38 /* MDK version */ 39 #define MDK_MAJOR_VERSION 8 40 #define MDK_MINOR_VERSION 60 41 #define MDK_MICRO_VERSION 3 42 43 44 /* Define coprocessor domains */ 45 #if defined (NRF5340_XXAA_APPLICATION) || defined (NRF5340_XXAA_NETWORK) 46 #ifndef NRF5340_XXAA 47 #define NRF5340_XXAA 48 #endif 49 #endif 50 #if defined (NRF5340_XXAA_APPLICATION) 51 #ifndef NRF_APPLICATION 52 #define NRF_APPLICATION 53 #endif 54 #endif 55 #if defined (NRF5340_XXAA_NETWORK) 56 #ifndef NRF_NETWORK 57 #define NRF_NETWORK 58 #endif 59 #endif 60 61 /* Apply compatibility macros for old nRF5340 macros */ 62 #if defined(NRF5340_XXAA) 63 #if defined (NRF_APPLICATION) 64 #ifndef NRF5340_XXAA_APPLICATION 65 #define NRF5340_XXAA_APPLICATION 66 #endif 67 #endif 68 #if defined (NRF_NETWORK) 69 #ifndef NRF5340_XXAA_NETWORK 70 #define NRF5340_XXAA_NETWORK 71 #endif 72 #endif 73 #endif 74 75 /* Define NRF51_SERIES for common use in nRF51 series devices. Only if not previously defined. */ 76 #if defined (NRF51) ||\ 77 defined (NRF51422_XXAA) ||\ 78 defined (NRF51422_XXAB) ||\ 79 defined (NRF51422_XXAC) ||\ 80 defined (NRF51801_XXAB) ||\ 81 defined (NRF51802_XXAA) ||\ 82 defined (NRF51822_XXAA) ||\ 83 defined (NRF51822_XXAB) ||\ 84 defined (NRF51822_XXAC) ||\ 85 defined (NRF51824_XXAA) 86 #ifndef NRF51_SERIES 87 #define NRF51_SERIES 88 #endif 89 #ifndef NRF51 90 #define NRF51 91 #endif 92 #endif 93 94 /* Redefine "old" too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */ 95 #if defined (NRF52) 96 #ifndef NRF52832_XXAA 97 #define NRF52832_XXAA 98 #endif 99 #endif 100 101 /* Define NRF52_SERIES for common use in nRF52 series devices. Only if not previously defined. */ 102 #if defined (NRF52805_XXAA) || defined (NRF52810_XXAA) || defined (NRF52811_XXAA) || defined (NRF52820_XXAA) || defined (NRF52832_XXAA) || defined (NRF52832_XXAB) || defined (NRF52833_XXAA) || defined (NRF52840_XXAA) 103 #ifndef NRF52_SERIES 104 #define NRF52_SERIES 105 #endif 106 #endif 107 108 /* Define NRF53_SERIES for common use in nRF53 series devices. */ 109 #if defined (NRF5340_XXAA) 110 #ifndef NRF53_SERIES 111 #define NRF53_SERIES 112 #endif 113 #endif 114 115 /* Define NRF54H_SERIES for common use in nRF54H series devices */ 116 #if defined (NRF54H20_ENGA_XXAA) 117 #ifndef NRF54H_SERIES 118 #define NRF54H_SERIES 119 #endif 120 #ifndef HALTIUM_XXAA 121 #define HALTIUM_XXAA 122 #endif 123 #endif 124 125 /* Define NRF54L_SERIES for common use in nRF54L series devices */ 126 #if defined (NRF54L15_ENGA_XXAA) 127 #ifndef NRF54L_SERIES 128 #define NRF54L_SERIES 129 #endif 130 #ifndef LUMOS_XXAA 131 #define LUMOS_XXAA 132 #endif 133 #endif 134 135 /* Define NRF91_SERIES for common use in nRF91 series devices. */ 136 #if defined (NRF9160_XXAA) || defined (NRF9120_XXAA) 137 #ifndef NRF91_SERIES 138 #define NRF91_SERIES 139 #endif 140 #endif 141 142 /* Device selection for device includes. */ 143 #if defined (NRF51) 144 #include "nrf51.h" 145 #include "nrf51_bitfields.h" 146 #include "nrf51_deprecated.h" 147 148 #elif defined (NRF52805_XXAA) 149 #include "nrf52805.h" 150 #include "nrf52805_bitfields.h" 151 #include "nrf51_to_nrf52810.h" 152 #include "nrf52_to_nrf52810.h" 153 #include "nrf52810_to_nrf52811.h" 154 #elif defined (NRF52810_XXAA) 155 #include "nrf52810.h" 156 #include "nrf52810_bitfields.h" 157 #include "nrf51_to_nrf52810.h" 158 #include "nrf52_to_nrf52810.h" 159 #include "nrf52810_name_change.h" 160 #elif defined (NRF52811_XXAA) 161 #include "nrf52811.h" 162 #include "nrf52811_bitfields.h" 163 #include "nrf51_to_nrf52810.h" 164 #include "nrf52_to_nrf52810.h" 165 #include "nrf52810_to_nrf52811.h" 166 #elif defined (NRF52820_XXAA) 167 #include "nrf52820.h" 168 #include "nrf52820_bitfields.h" 169 #include "nrf51_to_nrf52.h" 170 #include "nrf52_to_nrf52833.h" 171 #include "nrf52833_to_nrf52820.h" 172 #elif defined (NRF52832_XXAA) || defined (NRF52832_XXAB) 173 #include "nrf52.h" 174 #include "nrf52_bitfields.h" 175 #include "nrf51_to_nrf52.h" 176 #include "nrf52_name_change.h" 177 #elif defined (NRF52833_XXAA) 178 #include "nrf52833.h" 179 #include "nrf52833_bitfields.h" 180 #include "nrf52_to_nrf52833.h" 181 #include "nrf51_to_nrf52.h" 182 #elif defined (NRF52840_XXAA) 183 #include "nrf52840.h" 184 #include "nrf52840_bitfields.h" 185 #include "nrf51_to_nrf52840.h" 186 #include "nrf52_to_nrf52840.h" 187 188 #elif defined (NRF5340_XXAA) 189 #if defined(NRF_APPLICATION) 190 #include "nrf5340_application.h" 191 #include "nrf5340_application_bitfields.h" 192 #include "nrf5340_application_name_change.h" 193 194 /* Address of locations in RAM that will be used to store a NS-accessible version of FICR */ 195 #if !defined(NRF_FICR_NS) 196 #define NRF_FICR_NS_BASE 0x2007F000 197 #define NRF_FICR_NS ((NRF_FICR_Type*) NRF_FICR_NS_BASE) 198 #endif 199 #elif defined (NRF_NETWORK) 200 #include "nrf5340_network.h" 201 #include "nrf5340_network_bitfields.h" 202 #include "nrf5340_network_name_change.h" 203 #endif 204 205 #elif defined (NRF54H20_ENGA_XXAA) 206 #include "nrf54h20_enga.h" 207 #include "nrf54h20_enga_interim.h" 208 209 #elif defined (NRF54L15_ENGA_XXAA) 210 #include "nrf54l15_enga.h" 211 #include "nrf54l15_enga_interim.h" 212 213 #elif defined (NRF9160_XXAA) 214 #include "nrf9160.h" 215 #include "nrf9160_bitfields.h" 216 #include "nrf91_name_change.h" 217 218 /* Address of locations in RAM that will be used to store a NS-accessible version of FICR */ 219 #if !defined(NRF_FICR_NS) 220 #define NRF_FICR_NS_BASE 0x2003E000 221 #define NRF_FICR_NS ((NRF_FICR_Type*) NRF_FICR_NS_BASE) 222 #endif 223 224 #elif defined (NRF9120_XXAA) 225 #include "nrf9120.h" 226 #include "nrf9120_bitfields.h" 227 #include "nrf91_name_change.h" 228 229 /* Address of locations in RAM that will be used to store a NS-accessible version of FICR */ 230 #if !defined(NRF_FICR_NS) 231 #define NRF_FICR_NS_BASE 0x2003E000 232 #define NRF_FICR_NS ((NRF_FICR_Type*) NRF_FICR_NS_BASE) 233 #endif 234 235 #else 236 #error "Device must be defined. See nrf.h." 237 #endif /* NRF51, NRF52805_XXAA, NRF52810_XXAA, NRF52811_XXAA, NRF52820_XXAA, NRF52832_XXAA, NRF52832_XXAB, NRF52833_XXAA, NRF52840_XXAA, NRF5340_XXAA_APPLICATION, NRF5340_XXAA_NETWORK, NRF9160_XXAA */ 238 239 #include "compiler_abstraction.h" 240 241 #endif /* NRF_H */ 242 243