You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/10/03 20:28:56 UTC

[3/6] incubator-mynewt-core git commit: Add #ifdef __cplusplus guards

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gattc_struct_serialization.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gattc_struct_serialization.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gattc_struct_serialization.h
index 26e3848..c5ea0d4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gattc_struct_serialization.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gattc_struct_serialization.h
@@ -14,6 +14,10 @@
 
 #include "ble_gattc.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 uint32_t ble_gattc_evt_char_val_by_uuid_read_rsp_t_enc(void const * const p_void_struct,
                                                        uint8_t * const    p_buf,
                                                        uint32_t           buf_len,
@@ -114,4 +118,8 @@ uint32_t ble_gattc_evt_attr_info_disc_rsp_t_dec(uint8_t const * const p_buf,
                                                 uint32_t              buf_len,
                                                 uint32_t * const      p_index,
                                                 void * const          p_void_struct);
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*BLE_GATTC_STRUCT_SERIALIZATION_H*/

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gatts_struct_serialization.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gatts_struct_serialization.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gatts_struct_serialization.h
index ceaabda..93e7252 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gatts_struct_serialization.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/struct_ser/s130/ble_gatts_struct_serialization.h
@@ -14,6 +14,10 @@
 
 #include "ble_gatts.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 uint32_t ser_ble_gatts_char_pf_enc(void const * const p_void_char_pf,
                                    uint8_t * const    p_buf,
                                    uint32_t           buf_len,
@@ -147,4 +151,8 @@ uint32_t ble_gatts_value_t_dec(uint8_t const * const p_buf,
                                uint32_t * const      p_index,
                                void * const          p_void_struct);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* BLE_GATTS_STRUCT_SERIALIZATION_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/debug/debug_hci_config_nrf6310.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/debug/debug_hci_config_nrf6310.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/debug/debug_hci_config_nrf6310.h
index 6673d74..88dfa01 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/debug/debug_hci_config_nrf6310.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/debug/debug_hci_config_nrf6310.h
@@ -15,6 +15,10 @@
 
 #include "boards.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 // define CONN_DGB to prevent CONN chip from being reseted while connected via DBG
 #define nCONN_DGB
 
@@ -40,5 +44,9 @@
 #define PIO_SLIP_EVT_ERR_RXED     LED_2   // only pulses not change of state
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //DEBUG_CONFIG_NRF6310_H__
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/dtm_uart_params.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/dtm_uart_params.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/dtm_uart_params.h
index ded44b0..c7e5346 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/dtm_uart_params.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/dtm_uart_params.h
@@ -16,6 +16,10 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** @ingroup ble_dtm_app
  */
 
@@ -54,4 +58,8 @@ typedef struct
     app_uart_stream_baud_rate_t baud_rate;      /**< Baud rate configuration. */
 } app_uart_stream_comm_params_t;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DTM_UART_PARAMS_H__

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_hal_transport.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_hal_transport.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_hal_transport.h
index 4bb4485..e8e90f2 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_hal_transport.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_hal_transport.h
@@ -37,6 +37,10 @@
 #include <stdint.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Serialization HAL Transport layer event types. */
 typedef enum
 {
@@ -227,5 +231,9 @@ uint32_t ser_hal_transport_tx_pkt_send(const uint8_t * p_buffer, uint16_t num_of
 uint32_t ser_hal_transport_tx_pkt_free(uint8_t * p_buffer);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_HAL_TRANSPORT_H__ */
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_config_5W_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_config_5W_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_config_5W_app.h
index 562bc42..9a4af06 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_config_5W_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_config_5W_app.h
@@ -13,4 +13,12 @@
 #ifndef SER_CONFIG_5W_APP_H__
 #define SER_CONFIG_5W_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONFIG_APP_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_app_nrf51.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_app_nrf51.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_app_nrf51.h
index 1ee9b72..eaa6639 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_app_nrf51.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_app_nrf51.h
@@ -16,6 +16,10 @@
 #include "boards.h"
 #include "ser_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(SPI_MASTER_0_ENABLE)
 #define SER_PHY_SPI_MASTER SPI_MASTER_0
 #endif
@@ -67,4 +71,8 @@
 #define SER_PHY_UART_CTS                        SER_APP_CTS_PIN
 #define SER_PHY_UART_RTS                        SER_APP_RTS_PIN
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //SER_CONFIG_APP_HAL_NRF51_H__

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_conn_nrf51.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_conn_nrf51.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_conn_nrf51.h
index 47a9b51..a929845 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_conn_nrf51.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_config_conn_nrf51.h
@@ -16,6 +16,10 @@
 #include "boards.h"
 #include "ser_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /***********************************************************************************************//**
  * SER_PHY layer configuration.
  **************************************************************************************************/
@@ -39,4 +43,8 @@
 #define SER_PHY_UART_CTS                        SER_CON_CTS_PIN
 #define SER_PHY_UART_RTS                        SER_CON_RTS_PIN
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //SER_PHY_CONFIG_CONN_NRF51_H__

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_app.h
index 44b962d..7b3f9b0 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_app.h
@@ -13,6 +13,10 @@
 #ifndef SER_PHY_DEBUG_APP_H__
 #define SER_PHY_DEBUG_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef SER_PHY_DEBUG_APP_ENABLE
 
 #define DEBUG_EVT_SPI_MASTER_RAW_REQUEST(data)
@@ -159,4 +163,8 @@ do {                                                    \
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //SER_PHY_DEBUG_APP_H__

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_conn.h
index ed48bbb..68ac6eb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/config/ser_phy_debug_conn.h
@@ -13,6 +13,10 @@
 #ifndef SER_PHY_DEBUG_CONN_H__
 #define SER_PHY_DEBUG_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef SER_PHY_DEBUG_CONN_ENABLE
 
 #define DEBUG_EVT_SPI_SLAVE_RAW_RX_XFER_DONE(data);
@@ -127,4 +131,8 @@ do {                                                \
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //SER_PHY_DEBUG_CONN_H__

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy.h
index 4672b03..ad127ec 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy.h
@@ -91,6 +91,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Serialization PHY module events types. */
 typedef enum
 {
@@ -252,5 +256,9 @@ void ser_phy_interrupts_enable(void);
 void ser_phy_interrupts_disable(void);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_PHY_H__ */
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy_hci.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy_hci.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy_hci.h
index 1aea5e7..7e2321c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy_hci.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/ser_phy_hci.h
@@ -29,6 +29,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Serialization PHY HCI module events types. */
 typedef enum
 {
@@ -143,5 +147,9 @@ uint32_t ser_phy_hci_slip_rx_buf_free(uint8_t * p_buffer);
  */
 void ser_phy_hci_slip_close(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_PHY_HCI_H__ */
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/spi_5W_master.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/spi_5W_master.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/spi_5W_master.h
index e8814fb..501eeff 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/spi_5W_master.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy/spi_5W_master.h
@@ -17,6 +17,10 @@
 #include <stdlib.h>
 #include "boards.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define _SPI_5W_
 
 /**@brief Struct containing configuration parameters of the SPI master. */
@@ -167,4 +171,8 @@ void spi_5W_master_evt_handler_reg(const spi_master_hw_instance_t spi_master_hw_
                                          spi_master_event_handler_t event_handler);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy_debug_comm.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy_debug_comm.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy_debug_comm.h
index a45847b..5cd6c1e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy_debug_comm.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/transport/ser_phy_debug_comm.h
@@ -13,6 +13,10 @@
 #ifndef SER_PHY_DEBUG_COMM_H__
 #define SER_PHY_DEBUG_COMM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef SER_PHY_HCI_DEBUG_ENABLE
 
 // empty definitions here
@@ -164,4 +168,8 @@ do {                                                  \
 
 #endif  // SER_PHY_HCI_DEBUG_ENABLE
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  // SER_PHY_DEBUG_COMM_H__

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/ble_dtm_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/ble_dtm_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/ble_dtm_conn.h
index ececf39..0ea2677 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/ble_dtm_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/ble_dtm_conn.h
@@ -13,6 +13,10 @@
 #ifndef BLE_DTM_CONN_H__
 #define BLE_DTM_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -73,5 +77,9 @@ uint32_t ble_dtm_init_rsp_enc(uint32_t         return_code,
                               uint32_t * const p_buf_len);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BLE_DTM_CONN_H__
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/conn_mw.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/conn_mw.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/conn_mw.h
index 71d205d..047dddf 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/conn_mw.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/common/conn_mw.h
@@ -14,6 +14,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Connectivity Middleware dispatcher function
  *
  * @details It will handle decode the opcode from RX buffer and based on the opcode it will search
@@ -35,4 +39,8 @@ uint32_t conn_mw_handler (uint8_t const * const p_rx_buf,
                           uint32_t              rx_buf_len,
                           uint8_t * const       p_tx_buf,
                           uint32_t      * const p_tx_buf_len);
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_MW_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw.h
index 71d205d..047dddf 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw.h
@@ -14,6 +14,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Connectivity Middleware dispatcher function
  *
  * @details It will handle decode the opcode from RX buffer and based on the opcode it will search
@@ -35,4 +39,8 @@ uint32_t conn_mw_handler (uint8_t const * const p_rx_buf,
                           uint32_t              rx_buf_len,
                           uint8_t * const       p_tx_buf,
                           uint32_t      * const p_tx_buf_len);
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_MW_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble.h
index 9e66560..4decac2 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble.h
@@ -14,6 +14,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Handles @ref sd_ble_tx_packet_count_get command and prepares response.
  *
  * @param[in]     p_rx_buf            Pointer to input buffer.
@@ -176,4 +180,8 @@ uint32_t conn_mw_ble_user_mem_reply(uint8_t const * const p_rx_buf,
                                      uint8_t * const       p_tx_buf,
                                      uint32_t * const      p_tx_buf_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_MW_BLE_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gap.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gap.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gap.h
index cce2a76..25be634 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gap.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gap.h
@@ -14,6 +14,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Handles @ref sd_ble_gap_address_set command request and prepares response.
  *
  * @param[in]     p_rx_buf            Pointer to input buffer.
@@ -604,4 +608,8 @@ uint32_t conn_mw_ble_gap_sec_context_destroy(uint16_t conn_handle);
  */
 uint32_t conn_mw_ble_gap_sec_context_find(uint16_t conn_handle, uint32_t *p_index);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_MW_BLE_GAP_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gattc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gattc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gattc.h
index 7e01f62..4f3182f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gattc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gattc.h
@@ -14,6 +14,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Handles @ref sd_ble_gattc_primary_services_discover command and prepares response.
  *
  * @param[in]     p_rx_buf            Pointer to input buffer.
@@ -193,4 +197,8 @@ uint32_t conn_mw_ble_gattc_attr_info_discover(uint8_t const * const p_rx_buf,
                                               uint32_t              rx_buf_len,
                                               uint8_t * const       p_tx_buf,
                                               uint32_t * const      p_tx_buf_len);
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_MW_BLE_GATTC_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gatts.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gatts.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gatts.h
index becbcb9..e05c29e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gatts.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_gatts.h
@@ -15,6 +15,10 @@
  
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Handles @ref sd_ble_gatts_service_add command and prepares response.
  *
  * @param[in]     p_rx_buf            Pointer to input buffer.
@@ -248,5 +252,9 @@ uint32_t conn_mw_ble_gatts_initial_user_handle_get(uint8_t const * const p_rx_bu
                                                    uint32_t              rx_buf_len,
                                                    uint8_t * const       p_tx_buf,
                                                    uint32_t * const      p_tx_buf_len);
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_MW_BLE_GATTS_H
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_l2cap.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_l2cap.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_l2cap.h
index 087791f..633fd7e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_l2cap.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_ble_l2cap.h
@@ -15,6 +15,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Handles @ref sd_ble_l2cap_cid_register command and prepares response.
  *
  * @param[in]     p_rx_buf            Pointer to input buffer.
@@ -69,4 +73,8 @@ uint32_t conn_mw_ble_l2cap_tx(uint8_t const * const p_rx_buf,
                               uint8_t * const p_tx_buf,
                               uint32_t * const p_tx_buf_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_nrf_soc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_nrf_soc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_nrf_soc.h
index f15915f..b682500 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_nrf_soc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/middleware/conn_mw_nrf_soc.h
@@ -14,6 +14,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Handles @ref sd_power_system_off command request.
  *
  * @param[in]     p_rx_buf            Pointer to input buffer.
@@ -71,4 +75,8 @@ uint32_t conn_mw_ecb_block_encrypt(uint8_t const * const p_rx_buf,
                                    uint8_t * const       p_tx_buf,
                                    uint32_t * const      p_tx_buf_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_conn.h
index 2921bf0..4b9f48c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_CONN_H__
 #define BLE_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -446,4 +450,8 @@ uint32_t ble_user_mem_reply_rsp_enc(uint32_t         return_code,
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_evt_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_evt_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_evt_conn.h
index 8d88550..3a0e362 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_evt_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_evt_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_EVT_CONN_H__
 #define BLE_EVT_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -92,4 +96,8 @@ uint32_t ble_evt_user_mem_request_enc(ble_evt_t const * const p_event,
                                       uint8_t * const         p_buf,
                                       uint32_t * const        p_buf_len);
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_conn.h
index 14a29dc..82656c4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GAP_CONN_H__
 #define BLE_GAP_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -1201,4 +1205,8 @@ uint32_t ble_gap_lesc_oob_data_get_rsp_enc(uint32_t                     return_c
                                            uint8_t * const              p_buf,
                                            uint32_t * const             p_buf_len);
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_evt_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_evt_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_evt_conn.h
index a40a670..b00d2db 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_evt_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gap_evt_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GAP_EVT_CONN_H__
 #define BLE_GAP_EVT_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -373,4 +377,8 @@ uint32_t ble_gap_evt_lesc_dhkey_request_enc(ble_evt_t const * const p_event,
                                             uint32_t * const        p_buf_len);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_conn.h
index c176cc9..7bcdf99 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTC_CONN_H__
 #define BLE_GATTC_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -430,5 +434,9 @@ uint32_t ble_gattc_attr_info_discover_rsp_enc(uint32_t         return_code,
                                               uint8_t * const  p_buf,
                                               uint32_t * const p_buf_len);
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_evt_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_evt_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_evt_conn.h
index 5b65cb8..8f6ffca 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_evt_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gattc_evt_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTC_EVT_CONN_H__
 #define BLE_GATTC_EVT_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -253,4 +257,8 @@ uint32_t ble_gattc_evt_attr_info_disc_rsp_enc(ble_evt_t const * const p_event,
                                               uint32_t * const        p_buf_len);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_conn.h
index 7eb052f..3f48689 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTS_CONN_H__
 #define BLE_GATTS_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -587,5 +591,9 @@ uint32_t ble_gatts_initial_user_handle_get_rsp_enc(uint32_t           return_cod
                                                    uint32_t * const   p_buf_len,
                                                    uint16_t         * p_handle);
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif //BLE_GATTS_CONN_H__
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_evt_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_evt_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_evt_conn.h
index 512f6a1..909ef80 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_evt_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_gatts_evt_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTS_EVT_CONN_H__
 #define BLE_GATTS_EVT_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -153,4 +157,8 @@ uint32_t ble_gatts_evt_write_enc(ble_evt_t const * const p_event,
                                  uint32_t * const        p_buf_len);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_conn.h
index 1bb4091..f461ca7 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_conn.h
@@ -34,6 +34,10 @@
 #include "ble_err.h"
 #include "ble_l2cap.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Decodes @ref sd_ble_l2cap_cid_register command request.
  *
  * @sa @ref nrf51_ble_l2cap_cid_register for packet format,
@@ -149,6 +153,10 @@ uint32_t ble_l2cap_tx_rsp_enc(uint32_t         return_code,
                               uint8_t * const  p_buf,
                               uint32_t * const p_buf_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //BLE_L2CAP_CONN_H__
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_evt_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_evt_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_evt_conn.h
index b651752..046140f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_evt_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/ble_l2cap_evt_conn.h
@@ -12,6 +12,10 @@
 #ifndef BLE_L2CAP_EVT_CONN_H__
 #define BLE_L2CAP_EVT_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -53,4 +57,8 @@ uint32_t ble_l2cap_evt_rx_enc(ble_evt_t const * const p_event,
                               uint32_t * const        p_buf_len);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_gap_sec_keys.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_gap_sec_keys.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_gap_sec_keys.h
index 11018e5..01e66b2 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_gap_sec_keys.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_gap_sec_keys.h
@@ -12,6 +12,10 @@
 #ifndef _CONN_BLE_GAP_SEC_KEYS_H
 #define _CONN_BLE_GAP_SEC_KEYS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -85,4 +89,8 @@ uint32_t conn_ble_gap_sec_context_destroy(uint16_t conn_handle);
 uint32_t conn_ble_gap_sec_context_find(uint16_t conn_handle, uint32_t *p_index);
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_BLE_GAP_SEC_KEYS_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_user_mem.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_user_mem.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_user_mem.h
index 75a29d7..e5a2a8d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_user_mem.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/conn_ble_user_mem.h
@@ -12,6 +12,10 @@
 #ifndef _CONN_BLE_USER_MEM_H
 #define _CONN_BLE_USER_MEM_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -78,4 +82,8 @@ uint32_t conn_ble_user_mem_context_destroy(uint16_t conn_handle);
 uint32_t conn_ble_user_mem_context_find(uint16_t conn_handle, uint32_t *p_index);
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_CONN_BLE_USER_MEM_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/nrf_soc_conn.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/nrf_soc_conn.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/nrf_soc_conn.h
index b5d70b5..f04b0db 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/nrf_soc_conn.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/codecs/s130/serializers/nrf_soc_conn.h
@@ -12,6 +12,10 @@
 #ifndef NRF_SOC_CONN_H__
 #define NRF_SOC_CONN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -123,5 +127,9 @@ uint32_t ecb_block_encrypt_rsp_enc(uint32_t         return_code,
                                    nrf_ecb_hal_data_t * const  p_ecb_data);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/hal/dtm_uart.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/hal/dtm_uart.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/hal/dtm_uart.h
index 41e179d..ebe9c25 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/hal/dtm_uart.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/hal/dtm_uart.h
@@ -16,8 +16,16 @@
 #include <stdint.h>
 #include "dtm_uart_params.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define  UART_PIN_DISCONNECTED  0xFFFFFFFF  /**< Value indicating that no pin is connected to this UART register. */
 
 uint32_t dtm_start(app_uart_stream_comm_params_t uart_comm_params);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DTM_UART_H__

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/pstorage_platform.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/pstorage_platform.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/pstorage_platform.h
index 093a869..874f274 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/pstorage_platform.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/pstorage_platform.h
@@ -22,6 +22,10 @@
 #include <stdint.h>
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 static __INLINE uint16_t pstorage_flash_page_size()
 {
   return (uint16_t)NRF_FICR->CODEPAGESIZE;
@@ -64,6 +68,10 @@ typedef uint16_t pstorage_size_t;      /** Size of length and offset fields. */
 /**@brief Handles Flash Access Result Events. To be called in the system event dispatcher of the application. */
 void pstorage_sys_event_handler (uint32_t sys_evt);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // PSTORAGE_PL_H__
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_cmd_decoder.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_cmd_decoder.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_cmd_decoder.h
index 934ebd6..947f86d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_cmd_decoder.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_cmd_decoder.h
@@ -32,6 +32,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief A function decodes an encoded command and sends a response to an Application Chip.
  *
  * @details The function decodes an encoded command and calls a SoftDevice API function when a
@@ -48,6 +52,10 @@
  */
 uint32_t ser_conn_command_process(uint8_t * p_command, uint16_t command_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONN_CMD_DECODER_H__ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_dtm_cmd_decoder.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_dtm_cmd_decoder.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_dtm_cmd_decoder.h
index 6810f63..64779ce 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_dtm_cmd_decoder.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_dtm_cmd_decoder.h
@@ -32,6 +32,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief A function for processing the encoded DTM commands from an Application Chip.
  *
  * @details     The function decodes encoded DTM commands and calls the appropriate DTM API.
@@ -56,6 +60,10 @@ uint32_t ser_conn_dtm_command_process(uint8_t * p_command, uint16_t command_len)
  */
 void ser_conn_is_ready_to_enter_dtm(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONN_DTM_CMD_DECODER_H__ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_event_encoder.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_event_encoder.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_event_encoder.h
index 32b938c..f05592c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_event_encoder.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_event_encoder.h
@@ -32,6 +32,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief A function for encoding a @ref ble_evt_t. The function passes the serialized byte stream
  *        to the transport layer after encoding.
  *
@@ -45,6 +49,10 @@
  */
 void ser_conn_ble_event_encoder(void * p_event_data, uint16_t event_size);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONN_EVENT_ENCODER_H__ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_handlers.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_handlers.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_handlers.h
index f08d458..7693b1d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_handlers.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_handlers.h
@@ -41,6 +41,10 @@
 #include "ble.h"
 #include "ser_hal_transport.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** Maximum number of events in the application scheduler queue. */
 #define SER_CONN_SCHED_QUEUE_SIZE             16u
 
@@ -80,5 +84,9 @@ uint32_t ser_conn_rx_process(void);
  */
 void ser_conn_ble_event_handle(ble_evt_t * p_ble_evt);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONN_HANDLERS_H__ */
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_pkt_decoder.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_pkt_decoder.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_pkt_decoder.h
index 4ad6c76..5d026c0 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_pkt_decoder.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_pkt_decoder.h
@@ -33,6 +33,10 @@
 #include <stdint.h>
 #include "ser_hal_transport.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief A function for dispatching packets from an Application Chip to an appropriate decoder.
  *
  * @details    The function is called to process received packets from a transport layer.
@@ -49,6 +53,10 @@
 uint32_t ser_conn_received_pkt_process(
         ser_hal_transport_evt_rx_pkt_received_params_t * p_rx_pkt_params);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONN_PKT_DECODER_H__ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_reset_cmd_decoder.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_reset_cmd_decoder.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_reset_cmd_decoder.h
index 19f4c77..694a15b 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_reset_cmd_decoder.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/connectivity/ser_conn_reset_cmd_decoder.h
@@ -32,6 +32,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief A function for processing the encoded reset commands from an Application Chip.
  *
  * @details     The function decodes encoded system reset command and performs software reset.
@@ -39,6 +43,10 @@
  */
 void ser_conn_reset_command_process(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONN_RESET_CMD_DECODER_H__ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/toolchain/arm/uicr_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/toolchain/arm/uicr_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/toolchain/arm/uicr_config.h
index 67ee0c7..2e71d86 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/toolchain/arm/uicr_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/toolchain/arm/uicr_config.h
@@ -34,6 +34,10 @@
 #ifndef _UICR_CONFIG_H
 #define _UICR_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 #include <stdint.h>
@@ -101,4 +105,8 @@
 
 /*lint --flb "Leave library region" */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_UICR_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/stm/stm32f4xx/include/mcu/cortex_m4.h
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/include/mcu/cortex_m4.h b/hw/mcu/stm/stm32f4xx/include/mcu/cortex_m4.h
index 59e2e3f..e8a3feb 100644
--- a/hw/mcu/stm/stm32f4xx/include/mcu/cortex_m4.h
+++ b/hw/mcu/stm/stm32f4xx/include/mcu/cortex_m4.h
@@ -22,6 +22,14 @@
 
 #include "stm32f4xx.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define OS_TICKS_PER_SEC    (1000)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MCU_CORTEX_M4_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4_bsp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4_bsp.h b/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4_bsp.h
index a761778..e238286 100644
--- a/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4_bsp.h
+++ b/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4_bsp.h
@@ -20,6 +20,10 @@
 #ifndef __MCU_STM32F4_BSP_H_
 #define __MCU_STM32F4_BSP_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * BSP specific UART settings.
  */
@@ -45,4 +49,8 @@ int hal_gpio_init_af(int pin, uint8_t af_type, enum gpio_pull pull);
 struct hal_flash;
 extern struct hal_flash stm32f4_flash_dev;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MCU_STM32F4_BSP_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_conf.h
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_conf.h b/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_conf.h
index ce34c55..1077625 100644
--- a/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_conf.h
+++ b/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_conf.h
@@ -29,6 +29,10 @@
 #ifndef __STM32F4xx_CONF_H
 #define __STM32F4xx_CONF_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Includes ------------------------------------------------------------------*/
 /* Uncomment the line below to enable peripheral header file inclusion */
 #include "stm32f4xx_adc.h"
@@ -156,6 +160,10 @@
   #define assert_param(expr) ((void)0)
 #endif /* USE_FULL_ASSERT */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __STM32F4xx_CONF_H */
 
 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_mynewt_hal.h
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_mynewt_hal.h b/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_mynewt_hal.h
index c18decd..343fc4a 100644
--- a/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_mynewt_hal.h
+++ b/hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_mynewt_hal.h
@@ -26,6 +26,10 @@
 #include "stm32f4xx_hal_i2c.h"
 #include "stm32f4xx_hal_spi.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Helper functions to enable/disable interrupts. */
 #define __HAL_DISABLE_INTERRUPTS(x)                     \
     do {                                                \
@@ -57,4 +61,8 @@ struct stm32f4_hal_spi_cfg {
     SPI_InitTypeDef *spi_settings;
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MCU_STM32F4_MYNEWT_HAL_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/arch/cortex_m0/os/os_arch.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/arch/cortex_m0/os/os_arch.h b/kernel/os/include/os/arch/cortex_m0/os/os_arch.h
index 1a83ba9..1af7d13 100755
--- a/kernel/os/include/os/arch/cortex_m0/os/os_arch.h
+++ b/kernel/os/include/os/arch/cortex_m0/os/os_arch.h
@@ -23,6 +23,10 @@
 #include <stdint.h>
 #include <mcu/cortex_m0.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_task;
 
 /* Run in priviliged or unprivileged Thread mode */
@@ -71,4 +75,8 @@ void os_default_irq_asm(void);
 void os_bsp_systick_init(uint32_t os_ticks_per_sec, int prio);
 void os_bsp_ctx_sw(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_ARCH_ARM_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/arch/cortex_m4/os/os_arch.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/arch/cortex_m4/os/os_arch.h b/kernel/os/include/os/arch/cortex_m4/os/os_arch.h
index 46a193f..0b47c3a 100755
--- a/kernel/os/include/os/arch/cortex_m4/os/os_arch.h
+++ b/kernel/os/include/os/arch/cortex_m4/os/os_arch.h
@@ -24,6 +24,10 @@
 #include "mcu/cortex_m4.h"
 #include "os/os_time.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_task;
 
 /* Run in priviliged or unprivileged Thread mode */
@@ -73,4 +77,8 @@ void os_bsp_systick_init(uint32_t os_tick_per_sec, int prio);
 void os_bsp_idle(os_time_t ticks);
 void os_bsp_ctx_sw(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_ARCH_ARM_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/arch/sim/os/os_arch.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/arch/sim/os/os_arch.h b/kernel/os/include/os/arch/sim/os/os_arch.h
index d9570c8..ee4ba06 100644
--- a/kernel/os/include/os/arch/sim/os/os_arch.h
+++ b/kernel/os/include/os/arch/sim/os/os_arch.h
@@ -22,6 +22,10 @@
 
 #include <mcu/mcu_sim.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_task;
 
 /* CPU status register */
@@ -71,4 +75,8 @@ os_error_t os_arch_os_init(void);
 void os_arch_os_stop(void);
 os_error_t os_arch_os_start(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_ARCH_SIM_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/endian.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/endian.h b/kernel/os/include/os/endian.h
index ffb054d..a9dc07b 100644
--- a/kernel/os/include/os/endian.h
+++ b/kernel/os/include/os/endian.h
@@ -22,6 +22,10 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 
 #ifndef ntohll
@@ -89,4 +93,8 @@
 #endif
 
 #endif
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os.h b/kernel/os/include/os/os.h
index 9b7cec9..c8e1e1a 100644
--- a/kernel/os/include/os/os.h
+++ b/kernel/os/include/os/os.h
@@ -23,6 +23,10 @@
 #include <stdlib.h>
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef min
 #define min(a, b) ((a)<(b)?(a):(b))
 #endif
@@ -99,4 +103,8 @@ void os_init_idle_task(void);
 #include "os/os_task.h"
 #include "os/os_time.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_callout.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_callout.h b/kernel/os/include/os/os_callout.h
index b881343..ac27c59 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -21,6 +21,10 @@
 #ifndef _OS_CALLOUT_H
 #define _OS_CALLOUT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define OS_CALLOUT_F_QUEUED (0x01)
 
 #include "os/os_eventq.h"
@@ -56,6 +60,10 @@ os_callout_queued(struct os_callout *c)
     return c->c_next.tqe_prev != NULL;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_CALLOUT_H */
 
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_cfg.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_cfg.h b/kernel/os/include/os/os_cfg.h
index 40c1e91..c0ba0fe 100644
--- a/kernel/os/include/os/os_cfg.h
+++ b/kernel/os/include/os/os_cfg.h
@@ -22,4 +22,12 @@
 #define _OS_CFG_H_ 
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_CFG_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_dev.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_dev.h b/kernel/os/include/os/os_dev.h
index def42c0..86f810a 100644
--- a/kernel/os/include/os/os_dev.h
+++ b/kernel/os/include/os/os_dev.h
@@ -24,6 +24,10 @@
 
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_dev;
 
 /*
@@ -111,4 +115,8 @@ struct os_dev *os_dev_open(char *devname, uint32_t timo, void *arg);
 int os_dev_close(struct os_dev *dev);
 void os_dev_reset(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_DEV_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_eventq.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_eventq.h b/kernel/os/include/os/os_eventq.h
index 2969db2..ac1c6d8 100644
--- a/kernel/os/include/os/os_eventq.h
+++ b/kernel/os/include/os/os_eventq.h
@@ -24,6 +24,10 @@
 #include "os/os_time.h"
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_event {
     uint8_t ev_queued;
     uint8_t ev_type;
@@ -48,5 +52,9 @@ struct os_event *os_eventq_get(struct os_eventq *);
 struct os_event *os_eventq_poll(struct os_eventq **, int, os_time_t);
 void os_eventq_remove(struct os_eventq *, struct os_event *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_EVENTQ_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_heap.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_heap.h b/kernel/os/include/os/os_heap.h
index e526537..7b6b3ff 100644
--- a/kernel/os/include/os/os_heap.h
+++ b/kernel/os/include/os/os_heap.h
@@ -22,9 +22,17 @@
 
 #include <stddef.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void *os_malloc(size_t size);
 void os_free(void *mem);
 void *os_realloc(void *ptr, size_t size);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_malloc.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_malloc.h b/kernel/os/include/os/os_malloc.h
index 1823856..f6c11e7 100644
--- a/kernel/os/include/os/os_malloc.h
+++ b/kernel/os/include/os/os_malloc.h
@@ -22,6 +22,10 @@
 
 #include "os/os_heap.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #undef  malloc
 #define malloc  os_malloc
 
@@ -31,4 +35,8 @@
 #undef  realloc
 #define realloc  os_realloc
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_mbuf.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_mbuf.h b/kernel/os/include/os/os_mbuf.h
index e0733fd..6c54497 100644
--- a/kernel/os/include/os/os_mbuf.h
+++ b/kernel/os/include/os/os_mbuf.h
@@ -23,6 +23,10 @@
 #include "os/queue.h"
 #include "os/os_eventq.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * A mbuf pool from which to allocate mbufs. This contains a pointer to the os 
  * mempool to allocate mbufs out of, the total number of elements in the pool, 
@@ -294,4 +298,8 @@ void os_mbuf_concat(struct os_mbuf *first, struct os_mbuf *second);
 void *os_mbuf_extend(struct os_mbuf *om, uint16_t len);
 struct os_mbuf *os_mbuf_pullup(struct os_mbuf *om, uint16_t len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_MBUF_H */ 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_mempool.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_mempool.h b/kernel/os/include/os/os_mempool.h
index a731618..a690580 100644
--- a/kernel/os/include/os/os_mempool.h
+++ b/kernel/os/include/os/os_mempool.h
@@ -23,6 +23,10 @@
 #include "os/os.h"
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* 
  * A memory block structure. This simply contains a pointer to the free list 
  * chain and is only used when the block is on the free list. When the block 
@@ -91,4 +95,8 @@ void *os_memblock_get(struct os_mempool *mp);
 /* Put the memory block back into the pool */
 os_error_t os_memblock_put(struct os_mempool *mp, void *block_addr);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _OS_MEMPOOL_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_mutex.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_mutex.h b/kernel/os/include/os/os_mutex.h
index 46c15f2..5b94745 100644
--- a/kernel/os/include/os/os_mutex.h
+++ b/kernel/os/include/os/os_mutex.h
@@ -23,6 +23,10 @@
 #include "os/os.h"
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mutex
 {
     SLIST_HEAD(, os_task) mu_head;  /* chain of waiting tasks */
@@ -56,4 +60,8 @@ os_error_t os_mutex_release(struct os_mutex *mu);
 /* Pend (wait) for a mutex */
 os_error_t os_mutex_pend(struct os_mutex *mu, uint32_t timeout);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _OS_MUTEX_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_sanity.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_sanity.h b/kernel/os/include/os/os_sanity.h
index fb93570..9b2434a 100644
--- a/kernel/os/include/os/os_sanity.h
+++ b/kernel/os/include/os/os_sanity.h
@@ -25,6 +25,10 @@
 #include "os/os_time.h"
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_sanity_check;
 typedef int (*os_sanity_check_func_t)(struct os_sanity_check *, void *);
 
@@ -53,4 +57,8 @@ int os_sanity_check_init(struct os_sanity_check *);
 int os_sanity_check_register(struct os_sanity_check *);
 int os_sanity_check_reset(struct os_sanity_check *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_SANITY_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_sched.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_sched.h b/kernel/os/include/os/os_sched.h
index ac45683..0811f73 100644
--- a/kernel/os/include/os/os_sched.h
+++ b/kernel/os/include/os/os_sched.h
@@ -22,6 +22,10 @@
 
 #include "os/os_task.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void os_sched_ctx_sw_hook(struct os_task *);
 struct os_task *os_sched_get_current_task(void);
 void os_sched_set_current_task(struct os_task *);
@@ -34,4 +38,8 @@ int os_sched_wakeup(struct os_task *);
 void os_sched_resort(struct os_task *);
 os_time_t os_sched_wakeup_ticks(os_time_t now);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_SCHED_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_sem.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_sem.h b/kernel/os/include/os/os_sem.h
index 0d44f91..c3ee88d 100644
--- a/kernel/os/include/os/os_sem.h
+++ b/kernel/os/include/os/os_sem.h
@@ -22,6 +22,10 @@
 
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_sem
 {
     SLIST_HEAD(, os_task) sem_head;     /* chain of waiting tasks */
@@ -49,4 +53,8 @@ os_error_t os_sem_release(struct os_sem *sem);
 /* Pend (wait) for a semaphore */
 os_error_t os_sem_pend(struct os_sem *sem, uint32_t timeout);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _OS_MUTEX_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_task.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_task.h b/kernel/os/include/os/os_task.h
index 561583b..7b9341f 100644
--- a/kernel/os/include/os/os_task.h
+++ b/kernel/os/include/os/os_task.h
@@ -24,6 +24,10 @@
 #include "os/os_sanity.h" 
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* The highest and lowest task priorities */
 #define OS_TASK_PRI_HIGHEST (0)
 #define OS_TASK_PRI_LOWEST  (0xff)
@@ -111,4 +115,8 @@ struct os_task *os_task_info_get_next(const struct os_task *,
         struct os_task_info *);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_TASK_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_test.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_test.h b/kernel/os/include/os/os_test.h
index 6701315..c846ea7 100644
--- a/kernel/os/include/os/os_test.h
+++ b/kernel/os/include/os/os_test.h
@@ -20,6 +20,14 @@
 #ifndef H_OS_TEST_
 #define H_OS_TEST_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int os_test_all(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/os_time.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_time.h b/kernel/os/include/os/os_time.h
index 38b6bd9..7ccc862 100644
--- a/kernel/os/include/os/os_time.h
+++ b/kernel/os/include/os/os_time.h
@@ -55,6 +55,10 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef UINT32_MAX
 #define UINT32_MAX  0xFFFFFFFFU
 #endif
@@ -108,4 +112,8 @@ int os_gettimeofday(struct os_timeval *utctime, struct os_timezone *tz);
 int64_t os_get_uptime_usec(void);
 int os_time_ms_to_ticks(uint32_t ms, uint32_t *out_ticks);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _OS_TIME_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/include/os/queue.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/queue.h b/kernel/os/include/os/queue.h
index 01739af..faffd85 100755
--- a/kernel/os/include/os/queue.h
+++ b/kernel/os/include/os/queue.h
@@ -33,6 +33,10 @@
 #ifndef _QUEUE_H_
 #define	_QUEUE_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * This file defines five types of data structures: singly-linked lists,
  * singly-linked tail queues, lists, tail queues, and circular queues.
@@ -511,4 +515,8 @@ struct {								\
 		    CIRCLEQ_NEXT((elm), field);				\
 } while (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* !_QUEUE_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/src/os_priv.h
----------------------------------------------------------------------
diff --git a/kernel/os/src/os_priv.h b/kernel/os/src/os_priv.h
index 7745a0a..8a38642 100644
--- a/kernel/os/src/os_priv.h
+++ b/kernel/os/src/os_priv.h
@@ -22,6 +22,10 @@
 
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 TAILQ_HEAD(os_task_list, os_task);
 TAILQ_HEAD(os_callout_list, os_callout);
 STAILQ_HEAD(os_task_stailq, os_task);
@@ -35,4 +39,8 @@ extern struct os_callout_list g_callout_list;
 
 void os_msys_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/kernel/os/test/src/os_test_priv.h
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/os_test_priv.h b/kernel/os/test/src/os_test_priv.h
index e923a6f..945efc0 100644
--- a/kernel/os/test/src/os_test_priv.h
+++ b/kernel/os/test/src/os_test_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_OS_TEST_PRIV_
 #define H_OS_TEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void os_test_restart(void);
 
 int os_mempool_test_suite(void);
@@ -29,4 +33,8 @@ int os_sem_test_suite(void);
 int os_eventq_test_suite(void);
 int os_callout_test_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/assert.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/assert.h b/libc/baselibc/include/assert.h
index 273058f..851ad4c 100644
--- a/libc/baselibc/include/assert.h
+++ b/libc/baselibc/include/assert.h
@@ -5,6 +5,10 @@
 #ifndef _ASSERT_H
 #define _ASSERT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef NDEBUG
 
 /*
@@ -25,4 +29,8 @@ extern void __assert_func(const char *, int, const char *, const char *)
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _ASSERT_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/ctype.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/ctype.h b/libc/baselibc/include/ctype.h
index 4670b6a..7b7b24b 100644
--- a/libc/baselibc/include/ctype.h
+++ b/libc/baselibc/include/ctype.h
@@ -10,6 +10,10 @@
 #include <klibc/extern.h>
 #include <klibc/inline.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __extern_inline int isupper(int __c)
 {
 	return __c >= 'A' && __c <= 'Z';
@@ -83,4 +87,8 @@ __extern_inline int tolower(int __c)
 	return isupper(__c) ? (__c | 32) : __c;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _CTYPE_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/inttypes.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/inttypes.h b/libc/baselibc/include/inttypes.h
index e9ee426..ce4159a 100644
--- a/libc/baselibc/include/inttypes.h
+++ b/libc/baselibc/include/inttypes.h
@@ -9,6 +9,10 @@
 #include <stdint.h>
 #include <stddef.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 static __inline__ intmax_t imaxabs(intmax_t __n)
 {
 	return (__n < (intmax_t) 0) ? -__n : __n;
@@ -226,4 +230,8 @@ __extern uintmax_t strntoumax(const char *, char **, int, size_t);
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _INTTYPES_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/klibc/extern.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/klibc/extern.h b/libc/baselibc/include/klibc/extern.h
index 7d7c7b8..920bad5 100644
--- a/libc/baselibc/include/klibc/extern.h
+++ b/libc/baselibc/include/klibc/extern.h
@@ -6,6 +6,10 @@
 #define _KLIBC_EXTERN_H
 
 #ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
 #define __extern extern "C"
 #else
 #define __extern extern
@@ -13,4 +17,8 @@
 
 #define __alias(x) __attribute__((weak, alias(x)))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _KLIBC_EXTERN_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/klibc/inline.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/klibc/inline.h b/libc/baselibc/include/klibc/inline.h
index 0e54743..bd01738 100644
--- a/libc/baselibc/include/klibc/inline.h
+++ b/libc/baselibc/include/klibc/inline.h
@@ -5,8 +5,16 @@
 #ifndef _KLIBC_INLINE_H
 #define _KLIBC_INLINE_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef __extern_inline
 #define __extern_inline extern inline __attribute__((gnu_inline))
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _KLIBC_INLINE_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/stdio.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/stdio.h b/libc/baselibc/include/stdio.h
index 3f93340..8b82262 100644
--- a/libc/baselibc/include/stdio.h
+++ b/libc/baselibc/include/stdio.h
@@ -11,6 +11,10 @@
 #include <stddef.h>
 #include <string.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* The File structure is designed to be compatible with ChibiOS/RT type
  * BaseSequentialStream.
  */
@@ -121,4 +125,8 @@ struct MemFile
 FILE *fmemopen_w(struct MemFile* storage, char *buffer, size_t size);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _STDIO_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/stdlib.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/stdlib.h b/libc/baselibc/include/stdlib.h
index 847cda7..2efd71e 100644
--- a/libc/baselibc/include/stdlib.h
+++ b/libc/baselibc/include/stdlib.h
@@ -10,6 +10,10 @@
 #include <stddef.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __extern_inline int abs(int __n)
 {
 	return (__n < 0) ? -__n : __n;
@@ -98,4 +102,8 @@ __extern_inline void srandom(unsigned int __s)
 	srand48(__s);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _STDLIB_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/include/string.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/include/string.h b/libc/baselibc/include/string.h
index b3c1988..a483a15 100644
--- a/libc/baselibc/include/string.h
+++ b/libc/baselibc/include/string.h
@@ -8,6 +8,10 @@
 #include <klibc/extern.h>
 #include <stddef.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __extern void *memccpy(void *, const void *, int, size_t);
 __extern void *memchr(const void *, int, size_t);
 __extern void *memrchr(const void *, int, size_t);
@@ -56,4 +60,8 @@ inline static size_t strxfrm(char *dest, const char *src, size_t n)
 	return strlen(src);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif				/* _STRING_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/src/baselibc_test/unittests.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/src/baselibc_test/unittests.h b/libc/baselibc/src/baselibc_test/unittests.h
index 572f595..1c23120 100644
--- a/libc/baselibc/src/baselibc_test/unittests.h
+++ b/libc/baselibc/src/baselibc_test/unittests.h
@@ -22,6 +22,10 @@
 
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define COMMENT(x) printf("\n----" x "----\n");
 #define STR(x) #x
 #define STR2(x) STR(x)
@@ -33,4 +37,8 @@
         printf("\033[32;1mOK:\033[22;39m " #x "\n"); \
     }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libc/baselibc/src/malloc.h
----------------------------------------------------------------------
diff --git a/libc/baselibc/src/malloc.h b/libc/baselibc/src/malloc.h
index 2bed2a6..296b35b 100644
--- a/libc/baselibc/src/malloc.h
+++ b/libc/baselibc/src/malloc.h
@@ -21,6 +21,10 @@ struct arena_header {
 
 #ifdef DEBUG_MALLOC
 #define ARENA_TYPE_USED 0x64e69c70
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define ARENA_TYPE_FREE 0x012d610a
 #define ARENA_TYPE_HEAD 0x971676b5
 #define ARENA_TYPE_DEAD 0xeeeeeeee
@@ -28,6 +32,10 @@ struct arena_header {
 #define ARENA_TYPE_USED 0
 #define ARENA_TYPE_FREE 1
 #define ARENA_TYPE_HEAD 2
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
 #define ARENA_SIZE_MASK (~(sizeof(struct arena_header)-1))

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/imgmgr/include/imgmgr/imgmgr.h
----------------------------------------------------------------------
diff --git a/libs/imgmgr/include/imgmgr/imgmgr.h b/libs/imgmgr/include/imgmgr/imgmgr.h
index d96130b..effbb45 100644
--- a/libs/imgmgr/include/imgmgr/imgmgr.h
+++ b/libs/imgmgr/include/imgmgr/imgmgr.h
@@ -20,6 +20,10 @@
 #ifndef _IMGMGR_H_
 #define _IMGMGR_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define IMGMGR_NMGR_OP_LIST		0
 #define IMGMGR_NMGR_OP_UPLOAD		1
 #define IMGMGR_NMGR_OP_BOOT		2
@@ -59,4 +63,8 @@ int imgr_read_info(int area_id, struct image_version *ver, uint8_t *hash, uint32
  */
 int imgr_my_version(struct image_version *ver);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _IMGMGR_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/imgmgr/src/imgmgr_priv.h
----------------------------------------------------------------------
diff --git a/libs/imgmgr/src/imgmgr_priv.h b/libs/imgmgr/src/imgmgr_priv.h
index 7b45a85..066ddce 100644
--- a/libs/imgmgr/src/imgmgr_priv.h
+++ b/libs/imgmgr/src/imgmgr_priv.h
@@ -23,6 +23,10 @@
 #include <stdint.h>
 #include "syscfg/syscfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define IMGMGR_MAX_IMGS		2
 
 #define IMGMGR_HASH_STR		48
@@ -110,4 +114,8 @@ int imgr_find_by_ver(struct image_version *find, uint8_t *hash);
 int imgr_find_by_hash(uint8_t *find, struct image_version *ver);
 int imgr_cli_register(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __IMGMGR_PRIV_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_api.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_api.h b/libs/iotivity/include/iotivity/oc_api.h
index 31eb3c2..83e91f7 100644
--- a/libs/iotivity/include/iotivity/oc_api.h
+++ b/libs/iotivity/include/iotivity/oc_api.h
@@ -23,6 +23,10 @@
 #include "../src/port/oc_signal_main_loop.h"
 #include "../src/port/oc_storage.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct
 {
   void (*init)(void);
@@ -163,4 +167,8 @@ void oc_remove_delayed_callback(void *cb_data, oc_trigger_t callback);
   }                                                                            \
   void name##_interrupt_x_handler(void)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_API_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_buffer.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_buffer.h b/libs/iotivity/include/iotivity/oc_buffer.h
index 4204a9d..0bbf8a7 100644
--- a/libs/iotivity/include/iotivity/oc_buffer.h
+++ b/libs/iotivity/include/iotivity/oc_buffer.h
@@ -21,6 +21,10 @@
 #include "../../src/util/oc_process.h"
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 OC_PROCESS_NAME(message_buffer_handler);
 oc_message_t *oc_allocate_message(void);
 void oc_message_add_ref(oc_message_t *message);
@@ -29,4 +33,8 @@ void oc_message_unref(oc_message_t *message);
 void oc_recv_message(oc_message_t *message);
 void oc_send_message(oc_message_t *message);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_BUFFER_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_client_state.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_client_state.h b/libs/iotivity/include/iotivity/oc_client_state.h
index eb04857..43c25ac 100644
--- a/libs/iotivity/include/iotivity/oc_client_state.h
+++ b/libs/iotivity/include/iotivity/oc_client_state.h
@@ -21,6 +21,10 @@
 #include "oc_ri.h"
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum { HIGH_QOS = 0, LOW_QOS } oc_qos_t;
 
 typedef struct
@@ -85,4 +89,8 @@ oc_discovery_flags_t oc_ri_process_discovery_payload(uint8_t *payload, int len,
 bool oc_ri_send_rst(oc_endpoint_t *endpoint, uint8_t *token, uint8_t token_len,
                     uint16_t mid);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_CLIENT_STATE_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_constants.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_constants.h b/libs/iotivity/include/iotivity/oc_constants.h
index 0413ddc..cde1acf 100644
--- a/libs/iotivity/include/iotivity/oc_constants.h
+++ b/libs/iotivity/include/iotivity/oc_constants.h
@@ -17,6 +17,10 @@
 #ifndef OC_CONSTANTS_H
 #define OC_CONSTANTS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* OCF standard resource interfaces */
 #define OC_NUM_STD_INTERFACES (7)
 #define OC_RSRVD_IF_BASELINE "oic.if.baseline"
@@ -40,4 +44,8 @@
 #define OC_RSRVD_DEVICE_URI "/oic/d"
 #define OC_RSRVD_PLATFORM_URI "/oic/p"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_CONSTANTS_H */