Cefn Hoile / nRF51822

Dependencies:   nrf51-sdk

Dependents:   microbit-dal

Fork of nRF51822 by Lancaster University

Revision:
498:d72c7e78ee13
Parent:
496:08bd8a46630b
--- a/source/nordic-sdk/components/device/nrf.h	Wed Dec 02 10:32:51 2015 +0000
+++ b/source/nordic-sdk/components/device/nrf.h	Wed Dec 02 10:32:52 2015 +0000
@@ -29,22 +29,29 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
+
 #ifndef NRF_H
 #define NRF_H
 
-#ifndef _WIN32
+#if defined(_WIN32)         
+    /* Do not include nrf51 specific files when building for PC host */
+#elif defined(__unix)       
+    /* Do not include nrf51 specific files when building for PC host */
+#elif defined(__APPLE__)    
+    /* Do not include nrf51 specific files when building for PC host */
+#else
 
-/* Family selection for main includes. NRF51 must be selected. */
-#ifdef NRF51
-    #include "nrf51.h"
-    #include "nrf51_bitfields.h"
-    #include "nrf51_deprecated.h"
-#else
-    #error "Device family must be defined. See nrf.h."
-#endif /* NRF51 */
+    /* Family selection for family includes. */
+    #if defined (NRF51)
+        #include "nrf51.h"
+        #include "nrf51_bitfields.h"
+        #include "nrf51_deprecated.h"
+    #else
+        #error "Device family must be defined. See nrf.h."
+    #endif /* NRF51 */
 
-#include "compiler_abstraction.h"
+    #include "compiler_abstraction.h"
 
-#endif /* _WIN32 */
+#endif /* _WIN32 || __unix || __APPLE__ */
 
 #endif /* NRF_H */