1 /* 2 3 Copyright (c) 2010 - 2020, Nordic Semiconductor ASA 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 are met: 7 8 1. Redistributions of source code must retain the above copyright notice, this 9 list of conditions and the following disclaimer. 10 11 2. Redistributions in binary form must reproduce the above copyright 12 notice, this list of conditions and the following disclaimer in the 13 documentation and/or other materials provided with the distribution. 14 15 3. Neither the name of Nordic Semiconductor ASA nor the names of its 16 contributors may be used to endorse or promote products derived from this 17 software without specific prior written permission. 18 19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE 22 ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 POSSIBILITY OF SUCH DAMAGE. 30 31 */ 32 33 #ifndef NRF_H 34 #define NRF_H 35 36 /* MDK version */ 37 #define MDK_MAJOR_VERSION 8 38 #define MDK_MINOR_VERSION 35 39 #define MDK_MICRO_VERSION 0 40 41 /* Define NRF51_SERIES for common use in nRF51 series devices. Only if not previously defined. */ 42 #if defined (NRF51) ||\ 43 defined (NRF51422_XXAA) ||\ 44 defined (NRF51422_XXAB) ||\ 45 defined (NRF51422_XXAC) ||\ 46 defined (NRF51801_XXAB) ||\ 47 defined (NRF51802_XXAA) ||\ 48 defined (NRF51822_XXAA) ||\ 49 defined (NRF51822_XXAB) ||\ 50 defined (NRF51822_XXAC) ||\ 51 defined (NRF51824_XXAA) 52 #ifndef NRF51_SERIES 53 #define NRF51_SERIES 54 #endif 55 #ifndef NRF51 56 #define NRF51 57 #endif 58 #endif 59 60 /* Redefine "old" too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */ 61 #if defined (NRF52) 62 #ifndef NRF52832_XXAA 63 #define NRF52832_XXAA 64 #endif 65 #endif 66 67 /* Define NRF52_SERIES for common use in nRF52 series devices. Only if not previously defined. */ 68 #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) 69 #ifndef NRF52_SERIES 70 #define NRF52_SERIES 71 #endif 72 #endif 73 74 /* Define NRF53_SERIES for common use in nRF53 series devices. */ 75 #if defined (NRF5340_XXAA_APPLICATION) || defined (NRF5340_XXAA_NETWORK) 76 #ifndef NRF53_SERIES 77 #define NRF53_SERIES 78 #endif 79 #endif 80 81 /* Define NRF91_SERIES for common use in nRF91 series devices. */ 82 #if defined (NRF9160_XXAA) 83 #ifndef NRF91_SERIES 84 #define NRF91_SERIES 85 #endif 86 #endif 87 88 /* Define coprocessor domains */ 89 #if defined (NRF5340_XXAA_APPLICATION) || defined (NRF5340_XXAA_NETWORK) 90 #ifndef NRF5340_XXAA 91 #define NRF5340_XXAA 92 #endif 93 #endif 94 #if defined (NRF5340_XXAA_APPLICATION) 95 #ifndef NRF_APPLICATION 96 #define NRF_APPLICATION 97 #endif 98 #endif 99 #if defined (NRF5340_XXAA_NETWORK) 100 #ifndef NRF_NETWORK 101 #define NRF_NETWORK 102 #endif 103 #endif 104 105 /* Apply compatibility macros for old nRF5340 macros */ 106 #if defined(NRF5340_XXAA) 107 #if defined (NRF_APPLICATION) 108 #ifndef NRF5340_XXAA_APPLICATION 109 #define NRF5340_XXAA_APPLICATION 110 #endif 111 #endif 112 #if defined (NRF_NETWORK) 113 #ifndef NRF5340_XXAA_NETWORK 114 #define NRF5340_XXAA_NETWORK 115 #endif 116 #endif 117 #endif 118 119 /* Device selection for device includes. */ 120 #if defined (NRF51) 121 #include "nrf51.h" 122 #include "nrf51_bitfields.h" 123 #include "nrf51_deprecated.h" 124 125 #elif defined (NRF52805_XXAA) 126 #include "nrf52805.h" 127 #include "nrf52805_bitfields.h" 128 #include "nrf51_to_nrf52810.h" 129 #include "nrf52_to_nrf52810.h" 130 #include "nrf52810_to_nrf52811.h" 131 #elif defined (NRF52810_XXAA) 132 #include "nrf52810.h" 133 #include "nrf52810_bitfields.h" 134 #include "nrf51_to_nrf52810.h" 135 #include "nrf52_to_nrf52810.h" 136 #include "nrf52810_name_change.h" 137 #elif defined (NRF52811_XXAA) 138 #include "nrf52811.h" 139 #include "nrf52811_bitfields.h" 140 #include "nrf51_to_nrf52810.h" 141 #include "nrf52_to_nrf52810.h" 142 #include "nrf52810_to_nrf52811.h" 143 #elif defined (NRF52820_XXAA) 144 #include "nrf52820.h" 145 #include "nrf52820_bitfields.h" 146 #include "nrf51_to_nrf52.h" 147 #include "nrf52_to_nrf52833.h" 148 #include "nrf52833_to_nrf52820.h" 149 #elif defined (NRF52832_XXAA) || defined (NRF52832_XXAB) 150 #include "nrf52.h" 151 #include "nrf52_bitfields.h" 152 #include "nrf51_to_nrf52.h" 153 #include "nrf52_name_change.h" 154 #elif defined (NRF52833_XXAA) 155 #include "nrf52833.h" 156 #include "nrf52833_bitfields.h" 157 #include "nrf52_to_nrf52833.h" 158 #include "nrf51_to_nrf52.h" 159 #elif defined (NRF52840_XXAA) 160 #include "nrf52840.h" 161 #include "nrf52840_bitfields.h" 162 #include "nrf51_to_nrf52840.h" 163 #include "nrf52_to_nrf52840.h" 164 165 #elif defined (NRF5340_XXAA) 166 #if defined(NRF_APPLICATION) 167 #include "nrf5340_application.h" 168 #include "nrf5340_application_bitfields.h" 169 #elif defined (NRF_NETWORK) 170 #include "nrf5340_network.h" 171 #include "nrf5340_network_bitfields.h" 172 #endif 173 174 #elif defined (NRF9160_XXAA) 175 #include "nrf9160.h" 176 #include "nrf9160_bitfields.h" 177 #include "nrf9160_name_change.h" 178 179 #else 180 #error "Device must be defined. See nrf.h." 181 #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 */ 182 183 #include "compiler_abstraction.h" 184 185 #endif /* NRF_H */ 186 187