nrf.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. Copyright (c) 2010 - 2018, 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 17
  36. #define MDK_MICRO_VERSION 0
  37. /* Redefine "old" too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */
  38. #if defined (NRF52)
  39. #ifndef NRF52832_XXAA
  40. #define NRF52832_XXAA
  41. #endif
  42. #endif
  43. /* Define NRF52_SERIES for common use in nRF52 series devices. Only if not previously defined. */
  44. #if defined (NRF52810_XXAA) || defined (NRF52832_XXAA) || defined (NRF52832_XXAB) || defined (NRF52840_XXAA)
  45. #ifndef NRF52_SERIES
  46. #define NRF52_SERIES
  47. #endif
  48. #endif
  49. #if defined(_WIN32)
  50. /* Do not include nrf specific files when building for PC host */
  51. #elif defined(__unix)
  52. /* Do not include nrf specific files when building for PC host */
  53. #elif defined(__APPLE__)
  54. /* Do not include nrf specific files when building for PC host */
  55. #else
  56. /* Device selection for device includes. */
  57. #if defined (NRF51)
  58. #include "nrf51.h"
  59. #include "nrf51_bitfields.h"
  60. #include "nrf51_deprecated.h"
  61. #elif defined (NRF52810_XXAA)
  62. #include "nrf52810.h"
  63. #include "nrf52810_bitfields.h"
  64. #include "nrf51_to_nrf52810.h"
  65. #include "nrf52_to_nrf52810.h"
  66. #elif defined (NRF52832_XXAA) || defined (NRF52832_XXAB)
  67. #include "nrf52.h"
  68. #include "nrf52_bitfields.h"
  69. #include "nrf51_to_nrf52.h"
  70. #include "nrf52_name_change.h"
  71. #elif defined (NRF52840_XXAA)
  72. #include "nrf52840.h"
  73. #include "nrf52840_bitfields.h"
  74. #include "nrf51_to_nrf52840.h"
  75. #include "nrf52_to_nrf52840.h"
  76. #else
  77. #error "Device must be defined. See nrf.h."
  78. #endif /* NRF51, NRF52810_XXAA, NRF52832_XXAA, NRF52832_XXAB, NRF52840_XXAA */
  79. #include "compiler_abstraction.h"
  80. #endif /* _WIN32 || __unix || __APPLE__ */
  81. #endif /* NRF_H */