Nordic stack and drivers for the mbed BLE API Modified for HRM1017 for library 0.1.0

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Wed Jul 23 11:59:36 2014 +0100
Parent:
48:895748db3357
Child:
50:d788c5ff95db
Commit message:
add __cplusplus guards to allow certain header files to be included from C sources.

Changed in this revision

nordic/nrf-sdk/app_common/app_error.h Show annotated file Show diff for this revision Revisions of this file
nordic/nrf-sdk/nrf_assert.h Show annotated file Show diff for this revision Revisions of this file
--- a/nordic/nrf-sdk/app_common/app_error.h	Mon Jul 21 08:28:53 2014 +0100
+++ b/nordic/nrf-sdk/app_common/app_error.h	Wed Jul 23 11:59:36 2014 +0100
@@ -1,6 +1,5 @@
 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
  *
- * The information contained herein is property of Nordic Semiconductor ASA.
  * Terms and conditions of usage are described in detail in NORDIC
  * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
  *
@@ -9,7 +8,7 @@
  * the file.
  *
  */
- 
+
 /** @file
  *
  * @defgroup app_error Common application error handler
@@ -26,15 +25,23 @@
 #include <stdbool.h>
 #include "nrf_error.h"
 
-/**@brief Function for error handling, which is called when an error has occurred. 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**@brief Function for error handling, which is called when an error has occurred.
  *
  * @param[in] error_code  Error code supplied to the handler.
  * @param[in] line_num    Line number where the handler is called.
- * @param[in] p_file_name Pointer to the file name. 
+ * @param[in] p_file_name Pointer to the file name.
  */
 void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name);
 
-/**@brief Macro for calling error handler function. 
+#ifdef __cplusplus
+}
+#endif
+
+/**@brief Macro for calling error handler function.
  *
  * @param[in] ERR_CODE Error code supplied to the error handler.
  */
@@ -44,10 +51,10 @@
         app_error_handler((ERR_CODE), __LINE__, (uint8_t*) __FILE__);  \
     } while (0)
 
-/**@brief Macro for calling error handler function if supplied error code any other than NRF_SUCCESS. 
+/**@brief Macro for calling error handler function if supplied error code any other than NRF_SUCCESS.
  *
  * @param[in] ERR_CODE Error code supplied to the error handler.
- */    
+ */
 #define APP_ERROR_CHECK(ERR_CODE)                           \
     do                                                      \
     {                                                       \
@@ -56,12 +63,12 @@
         {                                                   \
             APP_ERROR_HANDLER(LOCAL_ERR_CODE);              \
         }                                                   \
-    } while (0)    
-    
-/**@brief Macro for calling error handler function if supplied boolean value is false. 
+    } while (0)
+
+/**@brief Macro for calling error handler function if supplied boolean value is false.
  *
  * @param[in] BOOLEAN_VALUE Boolean value to be evaluated.
- */    
+ */
 #define APP_ERROR_CHECK_BOOL(BOOLEAN_VALUE)                 \
     do                                                      \
     {                                                       \
@@ -70,7 +77,7 @@
         {                                                   \
             APP_ERROR_HANDLER(0);                           \
         }                                                   \
-    } while (0)        
+    } while (0)
 
 #endif // APP_ERROR_H__
 
--- a/nordic/nrf-sdk/nrf_assert.h	Mon Jul 21 08:28:53 2014 +0100
+++ b/nordic/nrf-sdk/nrf_assert.h	Wed Jul 23 11:59:36 2014 +0100
@@ -16,6 +16,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER)
 
 /** @brief Function for handling assertions.
@@ -36,7 +40,7 @@
  */
 void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name);
 
-/*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ 
+/*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */
 /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \
 
 /** @brief Function for checking intended for production code.
@@ -53,6 +57,11 @@
 #else
 #define ASSERT(expr) //!< Assert empty when disabled
 void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name);
+
 #endif /* defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_ASSERT_H_ */