1 /* 2 3 Copyright (c) 2010 - 2018, 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 21 39 #define MDK_MICRO_VERSION 1 40 41 /* Redefine "old" too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */ 42 #if defined (NRF52) 43 #ifndef NRF52832_XXAA 44 #define NRF52832_XXAA 45 #endif 46 #endif 47 48 /* Define NRF52_SERIES for common use in nRF52 series devices. Only if not previously defined. */ 49 #if defined (NRF52810_XXAA) || defined (NRF52832_XXAA) || defined (NRF52832_XXAB) || defined (NRF52840_XXAA) 50 #ifndef NRF52_SERIES 51 #define NRF52_SERIES 52 #endif 53 #endif 54 55 /* Define NRF91_SERIES for common use in nRF91 series devices. */ 56 #if defined (NRF9160_XXAA) 57 #ifndef NRF91_SERIES 58 #define NRF91_SERIES 59 #endif 60 #endif 61 62 #if defined(_WIN32) 63 /* Do not include nrf specific files when building for PC host */ 64 #elif defined(__unix) 65 /* Do not include nrf specific files when building for PC host */ 66 #elif defined(__APPLE__) 67 /* Do not include nrf specific files when building for PC host */ 68 #else 69 70 /* Device selection for device includes. */ 71 #if defined (NRF51) 72 #include "nrf51.h" 73 #include "nrf51_bitfields.h" 74 #include "nrf51_deprecated.h" 75 76 #elif defined (NRF52810_XXAA) 77 #include "nrf52810.h" 78 #include "nrf52810_bitfields.h" 79 #include "nrf51_to_nrf52810.h" 80 #include "nrf52_to_nrf52810.h" 81 #elif defined (NRF52832_XXAA) || defined (NRF52832_XXAB) 82 #include "nrf52.h" 83 #include "nrf52_bitfields.h" 84 #include "nrf51_to_nrf52.h" 85 #include "nrf52_name_change.h" 86 #elif defined (NRF52840_XXAA) 87 #include "nrf52840.h" 88 #include "nrf52840_bitfields.h" 89 #include "nrf51_to_nrf52840.h" 90 #include "nrf52_to_nrf52840.h" 91 92 #elif defined (NRF9160_XXAA) 93 #include "nrf9160.h" 94 #include "nrf9160_bitfields.h" 95 96 #else 97 #error "Device must be defined. See nrf.h." 98 #endif /* NRF51, NRF52810_XXAA, NRF52832_XXAA, NRF52832_XXAB, NRF52840_XXAA, NRF9160_XXAA */ 99 100 #include "compiler_abstraction.h" 101 102 #endif /* _WIN32 || __unix || __APPLE__ */ 103 104 #endif /* NRF_H */ 105 106