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   17
39 #define MDK_MICRO_VERSION   0
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 
56 #if defined(_WIN32)
57     /* Do not include nrf specific files when building for PC host */
58 #elif defined(__unix)
59     /* Do not include nrf specific files when building for PC host */
60 #elif defined(__APPLE__)
61     /* Do not include nrf specific files when building for PC host */
62 #else
63 
64     /* Device selection for device includes. */
65     #if defined (NRF51)
66         #include "nrf51.h"
67         #include "nrf51_bitfields.h"
68         #include "nrf51_deprecated.h"
69 
70     #elif defined (NRF52810_XXAA)
71         #include "nrf52810.h"
72         #include "nrf52810_bitfields.h"
73         #include "nrf51_to_nrf52810.h"
74         #include "nrf52_to_nrf52810.h"
75     #elif defined (NRF52832_XXAA) || defined (NRF52832_XXAB)
76         #include "nrf52.h"
77         #include "nrf52_bitfields.h"
78         #include "nrf51_to_nrf52.h"
79         #include "nrf52_name_change.h"
80     #elif defined (NRF52840_XXAA)
81         #include "nrf52840.h"
82         #include "nrf52840_bitfields.h"
83         #include "nrf51_to_nrf52840.h"
84         #include "nrf52_to_nrf52840.h"
85 
86     #else
87         #error "Device must be defined. See nrf.h."
88     #endif /* NRF51, NRF52810_XXAA, NRF52832_XXAA, NRF52832_XXAB, NRF52840_XXAA */
89 
90     #include "compiler_abstraction.h"
91 
92 #endif /* _WIN32 || __unix || __APPLE__ */
93 
94 #endif /* NRF_H */
95 
96