nrf.h 6.4 KB

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