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:54 UTC

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

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 6ae852c27 -> d69b07986


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_sched.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_sched.h b/net/nimble/controller/include/controller/ble_ll_sched.h
index 8539e84..e16879b 100644
--- a/net/nimble/controller/include/controller/ble_ll_sched.h
+++ b/net/nimble/controller/include/controller/ble_ll_sched.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_LL_SCHED_
 #define H_BLE_LL_SCHED_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Time per BLE scheduler slot */
 #define BLE_LL_SCHED_USECS_PER_SLOT (1250)
 
@@ -101,4 +105,8 @@ int ble_ll_sched_next_time(uint32_t *next_event_time);
 /* Stop the scheduler */
 void ble_ll_sched_stop(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_LL_SCHED_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_whitelist.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_whitelist.h b/net/nimble/controller/include/controller/ble_ll_whitelist.h
index 3c37afd..775e296 100644
--- a/net/nimble/controller/include/controller/ble_ll_whitelist.h
+++ b/net/nimble/controller/include/controller/ble_ll_whitelist.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_LL_WHITELIST_
 #define H_BLE_LL_WHITELIST_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Clear the whitelist */
 int ble_ll_whitelist_clear(void);
 
@@ -41,4 +45,8 @@ void ble_ll_whitelist_disable(void);
 /* Boolean function returning true if address matches a whitelist entry */
 int ble_ll_whitelist_match(uint8_t *addr, uint8_t addr_type, int is_ident);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_LL_WHITELIST_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_phy.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_phy.h b/net/nimble/controller/include/controller/ble_phy.h
index 585c2dc..d0d1ebf 100644
--- a/net/nimble/controller/include/controller/ble_phy.h
+++ b/net/nimble/controller/include/controller/ble_phy.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_PHY_
 #define H_BLE_PHY_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Forward declarations */
 struct os_mbuf;
 
@@ -148,4 +152,8 @@ void ble_phy_resolv_list_enable(void);
 /* Disable phy resolving list */
 void ble_phy_resolv_list_disable(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_PHY_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/src/ble_ll_conn_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_conn_priv.h b/net/nimble/controller/src/ble_ll_conn_priv.h
index 92c2b70..42a5c8b 100644
--- a/net/nimble/controller/src/ble_ll_conn_priv.h
+++ b/net/nimble/controller/src/ble_ll_conn_priv.h
@@ -22,6 +22,10 @@
 
 #include "controller/ble_ll_conn.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Definitions for max rx/tx time/bytes for connections
  *  NOTE: you get 327 usecs from 27 bytes of payload by:
@@ -159,4 +163,8 @@ void ble_ll_conn_auth_pyld_timer_start(struct ble_ll_conn_sm *connsm);
 int ble_ll_hci_cmd_rx(uint8_t *cmd, void *arg);
 int ble_ll_hci_acl_rx(struct os_mbuf *om, void *arg);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_LL_CONN_PRIV_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_att.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_att.h b/net/nimble/host/include/host/ble_att.h
index 24b4496..2f30376 100644
--- a/net/nimble/host/include/host/ble_att.h
+++ b/net/nimble/host/include/host/ble_att.h
@@ -21,6 +21,10 @@
 #define H_BLE_ATT_
 
 #include "os/queue.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 #define BLE_ATT_UUID_PRIMARY_SERVICE        0x2800
@@ -101,4 +105,8 @@ uint16_t ble_att_mtu(uint16_t conn_handle);
 uint16_t ble_att_preferred_mtu(void);
 int ble_att_set_preferred_mtu(uint16_t mtu);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_eddystone.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_eddystone.h b/net/nimble/host/include/host/ble_eddystone.h
index d4f97bd..d0c616c 100644
--- a/net/nimble/host/include/host/ble_eddystone.h
+++ b/net/nimble/host/include/host/ble_eddystone.h
@@ -21,6 +21,10 @@
 #define H_BLE_EDDYSTONE_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_adv_fields;
 
 #define BLE_EDDYSTONE_MAX_UUIDS16           3
@@ -53,4 +57,8 @@ int ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields,
                                    uint8_t url_scheme, char *url_body,
                                    uint8_t url_body_len, uint8_t suffix);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_gap.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_gap.h b/net/nimble/host/include/host/ble_gap.h
index f61324b..ff37133 100644
--- a/net/nimble/host/include/host/ble_gap.h
+++ b/net/nimble/host/include/host/ble_gap.h
@@ -22,6 +22,10 @@
 
 #include <inttypes.h>
 #include "host/ble_hs.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct hci_le_conn_complete;
 struct hci_conn_update;
 
@@ -562,4 +566,8 @@ int ble_gap_encryption_initiate(uint16_t conn_handle, const uint8_t *ltk,
                                 uint16_t ediv, uint64_t rand_val, int auth);
 int ble_gap_conn_rssi(uint16_t conn_handle, int8_t *out_rssi);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_gatt.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_gatt.h b/net/nimble/host/include/host/ble_gatt.h
index c5bc769..dfc888d 100644
--- a/net/nimble/host/include/host/ble_gatt.h
+++ b/net/nimble/host/include/host/ble_gatt.h
@@ -22,6 +22,10 @@
 
 #include <inttypes.h>
 #include "host/ble_att.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_conn;
 struct ble_att_error_rsp;
 struct ble_hs_cfg;
@@ -446,4 +450,8 @@ int ble_gatts_find_chr(const void *svc_uuid128, const void *chr_uuid128,
 int ble_gatts_find_dsc(const void *svc_uuid128, const void *chr_uuid128,
                        const void *dsc_uuid128, uint16_t *out_dsc_handle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_hs.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_hs.h b/net/nimble/host/include/host/ble_hs.h
index 7b520a5..d703806 100644
--- a/net/nimble/host/include/host/ble_hs.h
+++ b/net/nimble/host/include/host/ble_hs.h
@@ -34,6 +34,10 @@
 #include "host/ble_sm.h"
 #include "host/ble_store.h"
 #include "host/ble_uuid.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_eventq;
 struct os_event;
 
@@ -153,4 +157,8 @@ int ble_hs_synced(void);
 int ble_hs_start(void);
 void ble_hs_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_hs_adv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_hs_adv.h b/net/nimble/host/include/host/ble_hs_adv.h
index 8ae2b00..f0fca61 100644
--- a/net/nimble/host/include/host/ble_hs_adv.h
+++ b/net/nimble/host/include/host/ble_hs_adv.h
@@ -22,6 +22,10 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** Max field payload size (account for 2-byte header). */
 #define BLE_HS_ADV_MAX_FIELD_SZ     (BLE_HCI_MAX_ADV_DATA_LEN - 2)
 
@@ -174,4 +178,8 @@ struct ble_hs_adv_fields {
 
 #define BLE_HS_ADV_SVC_DATA_UUID128_MIN_LEN     16
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_hs_id.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_hs_id.h b/net/nimble/host/include/host/ble_hs_id.h
index 749524b..b76b4ed 100644
--- a/net/nimble/host/include/host/ble_hs_id.h
+++ b/net/nimble/host/include/host/ble_hs_id.h
@@ -22,9 +22,17 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_hs_id_gen_rnd(int nrpa, uint8_t *out_addr);
 int ble_hs_id_set_rnd(const uint8_t *rnd_addr);
 int ble_hs_id_copy_addr(uint8_t id_addr_type, uint8_t *out_id_addr,
                         int *out_is_nrpa);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_hs_log.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_hs_log.h b/net/nimble/host/include/host/ble_hs_log.h
index fd10ddb..f22a7b3 100644
--- a/net/nimble/host/include/host/ble_hs_log.h
+++ b/net/nimble/host/include/host/ble_hs_log.h
@@ -21,6 +21,10 @@
 #define H_BLE_HS_LOG_
 
 #include "log/log.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 extern struct log ble_hs_log;
@@ -36,4 +40,8 @@ extern struct log ble_hs_log;
 void ble_hs_log_mbuf(const struct os_mbuf *om);
 void ble_hs_log_flat_buf(const void *data, int len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_hs_mbuf.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_hs_mbuf.h b/net/nimble/host/include/host/ble_hs_mbuf.h
index d3606f2..e536c98 100644
--- a/net/nimble/host/include/host/ble_hs_mbuf.h
+++ b/net/nimble/host/include/host/ble_hs_mbuf.h
@@ -21,6 +21,10 @@
 #define H_BLE_HS_MBUF_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 struct os_mbuf *ble_hs_mbuf_att_pkt(void);
@@ -28,4 +32,8 @@ struct os_mbuf *ble_hs_mbuf_from_flat(const void *buf, uint16_t len);
 int ble_hs_mbuf_to_flat(const struct os_mbuf *om, void *flat, uint16_t max_len,
                         uint16_t *out_copy_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_hs_test.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_hs_test.h b/net/nimble/host/include/host/ble_hs_test.h
index 3247b59..65ab90f 100644
--- a/net/nimble/host/include/host/ble_hs_test.h
+++ b/net/nimble/host/include/host/ble_hs_test.h
@@ -21,6 +21,10 @@
 #define H_HOST_TEST_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 int ble_att_clt_test_all(void);
@@ -46,4 +50,8 @@ int ble_sm_sc_test_suite(void);
 int ble_sm_test_all(void);
 int ble_uuid_test_all(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_ibeacon.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_ibeacon.h b/net/nimble/host/include/host/ble_ibeacon.h
index 112f52b..770bce0 100644
--- a/net/nimble/host/include/host/ble_ibeacon.h
+++ b/net/nimble/host/include/host/ble_ibeacon.h
@@ -20,6 +20,14 @@
 #ifndef H_BLE_IBEACON_
 #define H_BLE_IBEACON_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_ibeacon_set_adv_data(void *uuid128, uint16_t major, uint16_t minor);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_l2cap.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_l2cap.h b/net/nimble/host/include/host/ble_l2cap.h
index ebdfa1c..684b7f5 100644
--- a/net/nimble/host/include/host/ble_l2cap.h
+++ b/net/nimble/host/include/host/ble_l2cap.h
@@ -21,6 +21,10 @@
 #define H_BLE_L2CAP_
 
 #include "nimble/nimble_opt.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_l2cap_sig_update_req;
 struct ble_hs_conn;
 
@@ -66,4 +70,8 @@ int ble_l2cap_sig_update(uint16_t conn_handle,
                          struct ble_l2cap_sig_update_params *params,
                          ble_l2cap_sig_update_fn *cb, void *cb_arg);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_sm.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_sm.h b/net/nimble/host/include/host/ble_sm.h
index 748ff2d..0530e3a 100644
--- a/net/nimble/host/include/host/ble_sm.h
+++ b/net/nimble/host/include/host/ble_sm.h
@@ -23,6 +23,10 @@
 #include <inttypes.h>
 #include "syscfg/syscfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BLE_SM_ERR_PASSKEY                      0x01
 #define BLE_SM_ERR_OOB                          0x02
 #define BLE_SM_ERR_AUTHREQ                      0x03
@@ -98,4 +102,8 @@ int ble_sm_inject_io(uint16_t conn_handle, struct ble_sm_io *pkey);
     ((void)(conn_handle), BLE_HS_ENOTSUP)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_store.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_store.h b/net/nimble/host/include/host/ble_store.h
index a533159..ae3ca95 100644
--- a/net/nimble/host/include/host/ble_store.h
+++ b/net/nimble/host/include/host/ble_store.h
@@ -22,6 +22,10 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BLE_STORE_OBJ_TYPE_OUR_SEC      1
 #define BLE_STORE_OBJ_TYPE_PEER_SEC     2
 #define BLE_STORE_OBJ_TYPE_CCCD         3
@@ -215,4 +219,8 @@ typedef int ble_store_iterator_fn(int obj_type,
 void ble_store_iterate(int obj_type,
                        ble_store_iterator_fn *callback,
                        void *cookie);
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/include/host/ble_uuid.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_uuid.h b/net/nimble/host/include/host/ble_uuid.h
index 89d9df0..d3c4d21 100644
--- a/net/nimble/host/include/host/ble_uuid.h
+++ b/net/nimble/host/include/host/ble_uuid.h
@@ -21,6 +21,10 @@
 #define H_BLE_UUID_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 uint16_t ble_uuid_128_to_16(const void *uuid128);
@@ -42,4 +46,8 @@ int ble_uuid_16_to_128(uint16_t uuid16, void *dst);
     0x00, 0x00                                                              \
 })
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _BLE_HOST_UUID_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/profiles/lls/include/profiles/lls/ble_svc_lls.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/profiles/lls/include/profiles/lls/ble_svc_lls.h b/net/nimble/host/profiles/lls/include/profiles/lls/ble_svc_lls.h
index 8dee779..ae8f768 100644
--- a/net/nimble/host/profiles/lls/include/profiles/lls/ble_svc_lls.h
+++ b/net/nimble/host/profiles/lls/include/profiles/lls/ble_svc_lls.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_SVC_LLS_
 #define H_BLE_SVC_LLS_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_cfg;
 
 #define BLE_SVC_LLS_UUID16                                  0x1803
@@ -40,5 +44,9 @@ int ble_svc_lls_init(struct ble_hs_cfg *cfg,
                      uint8_t initial_alert_level,
                      ble_svc_lls_event_fn *cb);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/services/bleuart/include/bleuart/bleuart.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/bleuart/include/bleuart/bleuart.h b/net/nimble/host/services/bleuart/include/bleuart/bleuart.h
index 6639747..4013dee 100644
--- a/net/nimble/host/services/bleuart/include/bleuart/bleuart.h
+++ b/net/nimble/host/services/bleuart/include/bleuart/bleuart.h
@@ -20,6 +20,10 @@
 #ifndef _BLEUART_H_
 #define _BLEUART_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void
 bleuart_init(void);
 int
@@ -31,4 +35,8 @@ bleuart_set_conn_handle(uint16_t conn_handle);
 
 extern const uint8_t gatt_svr_svc_uart[16];
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _BLEUART_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/services/gap/include/services/gap/ble_svc_gap.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/gap/include/services/gap/ble_svc_gap.h b/net/nimble/host/services/gap/include/services/gap/ble_svc_gap.h
index 070599d..07d1c22 100644
--- a/net/nimble/host/services/gap/include/services/gap/ble_svc_gap.h
+++ b/net/nimble/host/services/gap/include/services/gap/ble_svc_gap.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_SVC_GAP_
 #define H_BLE_SVC_GAP_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_cfg;
 
 #define BLE_SVC_GAP_UUID16                                  0x1800
@@ -36,4 +40,8 @@ int ble_svc_gap_device_name_set(const char *name);
 
 void ble_svc_gap_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h b/net/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h
index adc4433..6e99bf3 100644
--- a/net/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h
+++ b/net/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h
@@ -20,10 +20,18 @@
 #ifndef H_BLE_SVC_GATT_
 #define H_BLE_SVC_GATT_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_cfg;
 
 #define BLE_SVC_GATT_CHR_SERVICE_CHANGED_UUID16     0x2a05
 
 void ble_svc_gatt_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/services/lls/include/services/lls/ble_svc_lls.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/lls/include/services/lls/ble_svc_lls.h b/net/nimble/host/services/lls/include/services/lls/ble_svc_lls.h
index 8dee779..ae8f768 100644
--- a/net/nimble/host/services/lls/include/services/lls/ble_svc_lls.h
+++ b/net/nimble/host/services/lls/include/services/lls/ble_svc_lls.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_SVC_LLS_
 #define H_BLE_SVC_LLS_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_cfg;
 
 #define BLE_SVC_LLS_UUID16                                  0x1803
@@ -40,5 +44,9 @@ int ble_svc_lls_init(struct ble_hs_cfg *cfg,
                      uint8_t initial_alert_level,
                      ble_svc_lls_event_fn *cb);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_att_cmd_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att_cmd_priv.h b/net/nimble/host/src/ble_att_cmd_priv.h
index bfeb28f..669d3a9 100644
--- a/net/nimble/host/src/ble_att_cmd_priv.h
+++ b/net/nimble/host/src/ble_att_cmd_priv.h
@@ -21,6 +21,10 @@
 #define H_BLE_ATT_CMD_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_l2cap_chan;
 
 /**
@@ -408,4 +412,8 @@ void ble_att_indicate_rsp_parse(const void *payload, int len);
 void ble_att_indicate_rsp_write(void *payload, int len);
 void ble_att_indicate_req_log(const struct ble_att_indicate_req *cmd);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_att_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att_priv.h b/net/nimble/host/src/ble_att_priv.h
index d2875ab..551f319 100644
--- a/net/nimble/host/src/ble_att_priv.h
+++ b/net/nimble/host/src/ble_att_priv.h
@@ -24,6 +24,10 @@
 #include "stats/stats.h"
 #include "os/queue.h"
 #include "host/ble_att.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 struct ble_hs_conn;
 struct ble_l2cap_chan;
@@ -296,4 +300,8 @@ int ble_att_clt_tx_indicate(uint16_t conn_handle,
                             struct os_mbuf *txom);
 int ble_att_clt_rx_indicate(uint16_t conn_handle, struct os_mbuf **rxom);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_gap_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gap_priv.h b/net/nimble/host/src/ble_gap_priv.h
index eed5a18..a46067e 100644
--- a/net/nimble/host/src/ble_gap_priv.h
+++ b/net/nimble/host/src/ble_gap_priv.h
@@ -23,6 +23,10 @@
 #include <inttypes.h>
 #include "stats/stats.h"
 #include "host/ble_gap.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct hci_le_conn_upd_complete;
 struct hci_le_conn_param_req;
 struct hci_le_conn_complete;
@@ -97,4 +101,8 @@ int32_t ble_gap_heartbeat(void);
 
 int ble_gap_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_gatt_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gatt_priv.h b/net/nimble/host/src/ble_gatt_priv.h
index 7c0f020..f0e0ec6 100644
--- a/net/nimble/host/src/ble_gatt_priv.h
+++ b/net/nimble/host/src/ble_gatt_priv.h
@@ -22,6 +22,10 @@
 
 #include "stats/stats.h"
 #include "host/ble_gatt.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_att_read_type_adata;
 struct ble_att_find_type_value_hinfo;
 struct ble_att_find_info_idata;
@@ -151,4 +155,8 @@ int ble_gatts_conn_init(struct ble_gatts_conn *gatts_conn);
 int ble_gatts_start(void);
 int ble_gatts_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_adv_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_adv_priv.h b/net/nimble/host/src/ble_hs_adv_priv.h
index 3ad4f49..d83ffe5 100644
--- a/net/nimble/host/src/ble_hs_adv_priv.h
+++ b/net/nimble/host/src/ble_hs_adv_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_HS_ADV_PRIV_
 #define H_BLE_HS_ADV_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_hs_adv_set_flat(uint8_t type, int data_len, const void *data,
                         uint8_t *dst, uint8_t *dst_len, uint8_t max_len);
 int ble_hs_adv_set_fields(const struct ble_hs_adv_fields *adv_fields,
@@ -27,4 +31,8 @@ int ble_hs_adv_set_fields(const struct ble_hs_adv_fields *adv_fields,
 int ble_hs_adv_parse_fields(struct ble_hs_adv_fields *adv_fields, uint8_t *src,
                             uint8_t src_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_atomic_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_atomic_priv.h b/net/nimble/host/src/ble_hs_atomic_priv.h
index d82eeab..30de000 100644
--- a/net/nimble/host/src/ble_hs_atomic_priv.h
+++ b/net/nimble/host/src/ble_hs_atomic_priv.h
@@ -22,6 +22,10 @@
 
 #include "ble_hs_conn_priv.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_hs_atomic_conn_delete(uint16_t conn_handle);
 void ble_hs_atomic_conn_insert(struct ble_hs_conn *conn);
 int ble_hs_atomic_conn_flags(uint16_t conn_handle,
@@ -30,4 +34,8 @@ int ble_hs_atomic_conn_set_flags(uint16_t conn_handle,
                                  ble_hs_conn_flags_t flags, int on);
 uint16_t ble_hs_atomic_first_conn_handle(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_conn_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_conn_priv.h b/net/nimble/host/src/ble_hs_conn_priv.h
index ac87ff5..a446b2b 100644
--- a/net/nimble/host/src/ble_hs_conn_priv.h
+++ b/net/nimble/host/src/ble_hs_conn_priv.h
@@ -24,6 +24,10 @@
 #include "ble_l2cap_priv.h"
 #include "ble_gatt_priv.h"
 #include "ble_att_priv.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct hci_le_conn_complete;
 struct hci_create_conn;
 struct ble_l2cap_chan;
@@ -92,4 +96,8 @@ void ble_hs_conn_addrs(const struct ble_hs_conn *conn,
 
 int ble_hs_conn_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_dbg_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_dbg_priv.h b/net/nimble/host/src/ble_hs_dbg_priv.h
index cf8d203..859ef4f 100644
--- a/net/nimble/host/src/ble_hs_dbg_priv.h
+++ b/net/nimble/host/src/ble_hs_dbg_priv.h
@@ -20,7 +20,15 @@
 #ifndef H_BLE_HS_DBG_PRIV_
 #define H_BLE_HS_DBG_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void ble_hs_dbg_event_disp(uint8_t *evbuf);
 void ble_hs_dbg_set_sync_state(uint8_t sync_state);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_HOST_DBG_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_endian_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_endian_priv.h b/net/nimble/host/src/ble_hs_endian_priv.h
index c2342ff..e19116b 100644
--- a/net/nimble/host/src/ble_hs_endian_priv.h
+++ b/net/nimble/host/src/ble_hs_endian_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_HS_ENDIAN_
 #define H_BLE_HS_ENDIAN_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 
 #define TOFROMLE16(x)   ((uint16_t) (x))
@@ -54,4 +58,8 @@
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_hci_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_hci_priv.h b/net/nimble/host/src/ble_hs_hci_priv.h
index e9df8ea..d2c6570 100644
--- a/net/nimble/host/src/ble_hs_hci_priv.h
+++ b/net/nimble/host/src/ble_hs_hci_priv.h
@@ -21,6 +21,10 @@
 #define H_BLE_HS_HCI_PRIV_
 
 #include "nimble/hci_common.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_conn;
 struct os_mbuf;
 
@@ -155,4 +159,8 @@ int ble_hs_hci_cmd_build_set_resolv_priv_addr_timeout(
 int ble_hs_hci_cmd_build_set_random_addr(const uint8_t *addr,
                                          uint8_t *dst, int dst_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_id_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_id_priv.h b/net/nimble/host/src/ble_hs_id_priv.h
index 5c0728c..e5b0506 100644
--- a/net/nimble/host/src/ble_hs_id_priv.h
+++ b/net/nimble/host/src/ble_hs_id_priv.h
@@ -22,9 +22,17 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void ble_hs_id_set_pub(const uint8_t *pub_addr);
 int ble_hs_id_addr(uint8_t id_addr_type, const uint8_t **out_id_addr,
                    int *out_is_nrpa);
 int ble_hs_id_use_addr(uint8_t addr_type);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_mbuf_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_mbuf_priv.h b/net/nimble/host/src/ble_hs_mbuf_priv.h
index f0ea9b5..de036ce 100644
--- a/net/nimble/host/src/ble_hs_mbuf_priv.h
+++ b/net/nimble/host/src/ble_hs_mbuf_priv.h
@@ -1,6 +1,10 @@
 #ifndef H_BLE_HS_MBUF_PRIV_
 #define H_BLE_HS_MBUF_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 struct os_mbuf *ble_hs_mbuf_bare_pkt(void);
@@ -8,4 +12,8 @@ struct os_mbuf *ble_hs_mbuf_acm_pkt(void);
 struct os_mbuf *ble_hs_mbuf_l2cap_pkt(void);
 int ble_hs_mbuf_pullup_base(struct os_mbuf **om, int base_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_priv.h b/net/nimble/host/src/ble_hs_priv.h
index 2a3ce20..269635e 100644
--- a/net/nimble/host/src/ble_hs_priv.h
+++ b/net/nimble/host/src/ble_hs_priv.h
@@ -44,6 +44,10 @@
 #include "host/ble_hs.h"
 #include "nimble/nimble_opt.h"
 #include "stats/stats.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_conn;
 struct ble_l2cap_chan;
 struct os_mbuf;
@@ -145,4 +149,8 @@ void ble_hs_notifications_sched(void);
     #define BLE_HS_DBG_ASSERT_EVAL(x) ((void)(x))
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_pvcy_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_pvcy_priv.h b/net/nimble/host/src/ble_hs_pvcy_priv.h
index 16ded35..f55e498 100644
--- a/net/nimble/host/src/ble_hs_pvcy_priv.h
+++ b/net/nimble/host/src/ble_hs_pvcy_priv.h
@@ -22,10 +22,18 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_hs_pvcy_set_our_irk(const uint8_t *irk);
 int ble_hs_pvcy_our_irk(const uint8_t **out_irk);
 int ble_hs_pvcy_remove_entry(uint8_t addr_type, uint8_t *addr);
 int ble_hs_pvcy_add_entry(uint8_t *addr, uint8_t addrtype, uint8_t *irk);
 int ble_hs_pvcy_ensure_started(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_hs_startup_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_startup_priv.h b/net/nimble/host/src/ble_hs_startup_priv.h
index 2a5867e..7104b54 100644
--- a/net/nimble/host/src/ble_hs_startup_priv.h
+++ b/net/nimble/host/src/ble_hs_startup_priv.h
@@ -20,6 +20,14 @@
 #ifndef H_BLE_HS_STARTUP_
 #define H_BLE_HS_STARTUP_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_hs_startup_go(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_l2cap_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_l2cap_priv.h b/net/nimble/host/src/ble_l2cap_priv.h
index ce19218..50a87db 100644
--- a/net/nimble/host/src/ble_l2cap_priv.h
+++ b/net/nimble/host/src/ble_l2cap_priv.h
@@ -25,6 +25,10 @@
 #include "stats/stats.h"
 #include "os/queue.h"
 #include "os/os_mbuf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_conn;
 struct hci_data_hdr;
 
@@ -106,4 +110,8 @@ int ble_l2cap_tx(struct ble_hs_conn *conn, struct ble_l2cap_chan *chan,
 
 int ble_l2cap_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_l2cap_sig_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_l2cap_sig_priv.h b/net/nimble/host/src/ble_l2cap_sig_priv.h
index 822b52b..06436af 100644
--- a/net/nimble/host/src/ble_l2cap_sig_priv.h
+++ b/net/nimble/host/src/ble_l2cap_sig_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_L2CAP_SIG_
 #define H_BLE_L2CAP_SIG_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BLE_L2CAP_SIG_MTU           100  /* This is our own default. */
 
 #define BLE_L2CAP_SIG_HDR_SZ                4
@@ -85,4 +89,8 @@ int32_t ble_l2cap_sig_heartbeat(void);
 struct ble_l2cap_chan *ble_l2cap_sig_create_chan(void);
 int ble_l2cap_sig_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_sm_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_sm_priv.h b/net/nimble/host/src/ble_sm_priv.h
index 1b87eb5..f507c4e 100644
--- a/net/nimble/host/src/ble_sm_priv.h
+++ b/net/nimble/host/src/ble_sm_priv.h
@@ -25,6 +25,10 @@
 #include "os/queue.h"
 #include "nimble/nimble_opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_gap_sec_state;
 struct hci_le_lt_key_req;
 struct hci_encrypt_change;
@@ -482,4 +486,8 @@ int ble_sm_init(void);
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/src/ble_uuid_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_uuid_priv.h b/net/nimble/host/src/ble_uuid_priv.h
index a1f1bd4..8eef60b 100644
--- a/net/nimble/host/src/ble_uuid_priv.h
+++ b/net/nimble/host/src/ble_uuid_priv.h
@@ -20,9 +20,17 @@
 #ifndef H_BLE_UUID_PRIV_
 #define H_BLE_UUID_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 int ble_uuid_append(struct os_mbuf *om, const void *uuid128);
 int ble_uuid_extract(struct os_mbuf *om, int off, void *uuid128);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/store/ram/include/store/ram/ble_store_ram.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/store/ram/include/store/ram/ble_store_ram.h b/net/nimble/host/store/ram/include/store/ram/ble_store_ram.h
index b9529c5..fbc2f77 100644
--- a/net/nimble/host/store/ram/include/store/ram/ble_store_ram.h
+++ b/net/nimble/host/store/ram/include/store/ram/ble_store_ram.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_STORE_RAM_
 #define H_BLE_STORE_RAM_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 union ble_store_key;
 union ble_store_value;
 
@@ -27,4 +31,8 @@ int ble_store_ram_read(int obj_type, union ble_store_key *key,
                        union ble_store_value *value);
 int ble_store_ram_write(int obj_type, union ble_store_value *val);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/test/src/ble_hs_test_util.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_hs_test_util.h b/net/nimble/host/test/src/ble_hs_test_util.h
index c798916..4247f1f 100644
--- a/net/nimble/host/test/src/ble_hs_test_util.h
+++ b/net/nimble/host/test/src/ble_hs_test_util.h
@@ -24,6 +24,10 @@
 #include "host/ble_gap.h"
 #include "ble_hs_priv.h"
 #include "ble_hs_test_util_store.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_conn;
 struct ble_l2cap_chan;
 struct hci_disconn_complete;
@@ -194,4 +198,8 @@ void ble_hs_test_util_post_test(void *arg);
 void ble_hs_test_util_init_no_start(void);
 void ble_hs_test_util_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/test/src/ble_hs_test_util_store.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_hs_test_util_store.h b/net/nimble/host/test/src/ble_hs_test_util_store.h
index 77ee291..8a73b69 100644
--- a/net/nimble/host/test/src/ble_hs_test_util_store.h
+++ b/net/nimble/host/test/src/ble_hs_test_util_store.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_HS_TEST_UTIL_STORE_
 #define H_BLE_HS_TEST_UTIL_STORE_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 union ble_store_value;
 union ble_store_key;
 
@@ -33,4 +37,8 @@ int ble_hs_test_util_store_read(int obj_type, union ble_store_key *key,
                                 union ble_store_value *dst);
 int ble_hs_test_util_store_write(int obj_type, union ble_store_value *value);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/host/test/src/ble_sm_test_util.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_sm_test_util.h b/net/nimble/host/test/src/ble_sm_test_util.h
index 3323be6..9d41a24 100644
--- a/net/nimble/host/test/src/ble_sm_test_util.h
+++ b/net/nimble/host/test/src/ble_sm_test_util.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_SM_TEST_UTIL_
 #define H_BLE_SM_TEST_UTIL_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_sm_test_passkey_info {
     struct ble_sm_io passkey;
     uint32_t exp_numcmp;
@@ -116,4 +120,8 @@ void ble_sm_test_util_peer_sc_good(struct ble_sm_test_params *params);
 void ble_sm_test_util_us_sc_good(struct ble_sm_test_params *params);
 void ble_sm_test_util_us_fail_inval(struct ble_sm_test_params *params);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/include/nimble/ble.h
----------------------------------------------------------------------
diff --git a/net/nimble/include/nimble/ble.h b/net/nimble/include/nimble/ble.h
index 1ad6f29..db65ca0 100644
--- a/net/nimble/include/nimble/ble.h
+++ b/net/nimble/include/nimble/ble.h
@@ -21,6 +21,10 @@
 #define H_BLE_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* XXX: some or all of these should not be here */
 #include "os/os.h"
 
@@ -233,4 +237,8 @@ int ble_err_from_os(int os_err);
 #define BLE_HW_ERR_DO_NOT_USE           (0) /* XXX: reserve this one for now */
 #define BLE_HW_ERR_HCI_SYNC_LOSS        (1)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/include/nimble/ble_hci_trans.h
----------------------------------------------------------------------
diff --git a/net/nimble/include/nimble/ble_hci_trans.h b/net/nimble/include/nimble/ble_hci_trans.h
index 3e2ec7a..7aecf5f 100644
--- a/net/nimble/include/nimble/ble_hci_trans.h
+++ b/net/nimble/include/nimble/ble_hci_trans.h
@@ -21,6 +21,10 @@
 #define H_HCI_TRANSPORT_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mbuf;
 
 #define BLE_HCI_TRANS_CMD_SZ        260
@@ -166,4 +170,8 @@ void ble_hci_trans_cfg_hs(ble_hci_trans_rx_cmd_fn *cmd_cb,
  */
 int ble_hci_trans_reset(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_HCI_TRANSPORT_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/include/nimble/hci_common.h
----------------------------------------------------------------------
diff --git a/net/nimble/include/nimble/hci_common.h b/net/nimble/include/nimble/hci_common.h
index 5bf7156..17a49fd 100644
--- a/net/nimble/include/nimble/hci_common.h
+++ b/net/nimble/include/nimble/hci_common.h
@@ -22,6 +22,10 @@
 
 #include "ble.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * HCI Command Header
  *
@@ -767,4 +771,8 @@ struct hci_add_dev_to_resolving_list {
 /* External data structures */
 extern const uint8_t g_ble_hci_le_cmd_len[BLE_HCI_NUM_LE_CMDS];
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_HCI_COMMON_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/include/nimble/nimble_opt.h
----------------------------------------------------------------------
diff --git a/net/nimble/include/nimble/nimble_opt.h b/net/nimble/include/nimble/nimble_opt.h
index 82d2d55..21336e2 100644
--- a/net/nimble/include/nimble/nimble_opt.h
+++ b/net/nimble/include/nimble/nimble_opt.h
@@ -20,7 +20,15 @@
 #ifndef H_NIMBLE_OPT_
 #define H_NIMBLE_OPT_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Include automatically-generated settings. */
 #include "nimble/nimble_opt_auto.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/include/nimble/nimble_opt_auto.h
----------------------------------------------------------------------
diff --git a/net/nimble/include/nimble/nimble_opt_auto.h b/net/nimble/include/nimble/nimble_opt_auto.h
index 536416f..31dfb92 100644
--- a/net/nimble/include/nimble/nimble_opt_auto.h
+++ b/net/nimble/include/nimble/nimble_opt_auto.h
@@ -23,6 +23,10 @@
 #include "syscfg/syscfg.h"
 #include "nimble/nimble_opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /***
  * Automatic options.
  * 
@@ -113,4 +117,8 @@
 #undef NIMBLE_BLE_SM
 #define NIMBLE_BLE_SM   (MYNEWT_VAL(BLE_SM) || MYNEWT_VAL(BLE_SM_SC))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
----------------------------------------------------------------------
diff --git a/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h b/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
index 4b0aed1..79b9242 100644
--- a/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
+++ b/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
@@ -3,6 +3,14 @@
 
 #include "nimble/ble_hci_trans.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_hci_ram_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/transport/uart/include/transport/uart/ble_hci_uart.h
----------------------------------------------------------------------
diff --git a/net/nimble/transport/uart/include/transport/uart/ble_hci_uart.h b/net/nimble/transport/uart/include/transport/uart/ble_hci_uart.h
index 9d5b7c9..d2cd271 100644
--- a/net/nimble/transport/uart/include/transport/uart/ble_hci_uart.h
+++ b/net/nimble/transport/uart/include/transport/uart/ble_hci_uart.h
@@ -20,6 +20,14 @@
 #ifndef H_BLE_HCI_UART_
 #define H_BLE_HCI_UART_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ble_hci_uart_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt.h
----------------------------------------------------------------------
diff --git a/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt.h b/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt.h
index 411921a..6879597 100644
--- a/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt.h
+++ b/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt.h
@@ -19,6 +19,10 @@
 #ifndef __WIFI_MGMT_H__
 #define __WIFI_MGMT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Wi-Fi interface abstraction.
  */
@@ -79,4 +83,8 @@ int wifi_scan_start(struct wifi_if *w);
 
 int wifi_task_init(uint8_t prio, os_stack_t *stack, uint16_t stack_size);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __WIFI_MGMT_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt_if.h
----------------------------------------------------------------------
diff --git a/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt_if.h b/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt_if.h
index c6e432d..61ca6b1 100644
--- a/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt_if.h
+++ b/net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt_if.h
@@ -19,6 +19,10 @@
 #ifndef __WIFI_MGMT_IF_H__
 #define __WIFI_MGMT_IF_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Interface between Wi-fi management and the driver.
  */
@@ -44,4 +48,8 @@ void wifi_connect_done(struct wifi_if *wi, int status);
 void wifi_disconnected(struct wifi_if *wi, int status);
 void wifi_dhcp_done(struct wifi_if *wi, uint8_t *ip); /* XXX more IP info */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __WIFI_MGMT_IF_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/wifi/wifi_mgmt/src/wifi_priv.h
----------------------------------------------------------------------
diff --git a/net/wifi/wifi_mgmt/src/wifi_priv.h b/net/wifi/wifi_mgmt/src/wifi_priv.h
index d7fbb1f..fb74540 100644
--- a/net/wifi/wifi_mgmt/src/wifi_priv.h
+++ b/net/wifi/wifi_mgmt/src/wifi_priv.h
@@ -22,8 +22,16 @@
 
 #include "syscfg/syscfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if MYNEWT_VAL(WIFI_MGMT_CLI)
 extern struct shell_cmd wifi_cli_cmd;
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __WIFI_PRIV_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/config/include/config/config.h
----------------------------------------------------------------------
diff --git a/sys/config/include/config/config.h b/sys/config/include/config/config.h
index cdf63a9..07c1655 100644
--- a/sys/config/include/config/config.h
+++ b/sys/config/include/config/config.h
@@ -22,6 +22,10 @@
 #include <os/queue.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define CONF_MAX_DIR_DEPTH	8	/* max depth of config tree */
 #define CONF_MAX_NAME_LEN	(8 * CONF_MAX_DIR_DEPTH)
 #define CONF_MAX_VAL_LEN	256
@@ -97,4 +101,8 @@ struct conf_store {
     const struct conf_store_itf *cs_itf;
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SYS_CONFIG_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/config/include/config/config_fcb.h
----------------------------------------------------------------------
diff --git a/sys/config/include/config/config_fcb.h b/sys/config/include/config/config_fcb.h
index 91b4076..b2ed7a2 100644
--- a/sys/config/include/config/config_fcb.h
+++ b/sys/config/include/config/config_fcb.h
@@ -21,6 +21,10 @@
 
 #include "config/config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct conf_fcb {
     struct conf_store cf_store;
     struct fcb cf_fcb;
@@ -29,4 +33,8 @@ struct conf_fcb {
 int conf_fcb_src(struct conf_fcb *fcb);
 int conf_fcb_dst(struct conf_fcb *fcb);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SYS_CONFIG_FCB_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/config/include/config/config_file.h
----------------------------------------------------------------------
diff --git a/sys/config/include/config/config_file.h b/sys/config/include/config/config_file.h
index aa051a1..a2661f7 100644
--- a/sys/config/include/config/config_file.h
+++ b/sys/config/include/config/config_file.h
@@ -21,6 +21,10 @@
 
 #include "config/config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define CONF_FILE_NAME_MAX      32      /* max length for config filename */
 
 struct fs_file;
@@ -34,4 +38,8 @@ struct conf_file {
 int conf_file_src(struct conf_file *);  /* register file to be source of cfg */
 int conf_file_dst(struct conf_file *);  /* cfg saves go to a file */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SYS_CONFIG_FILE_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/config/src/config_priv.h
----------------------------------------------------------------------
diff --git a/sys/config/src/config_priv.h b/sys/config/src/config_priv.h
index 6dedeba..386e716 100644
--- a/sys/config/src/config_priv.h
+++ b/sys/config/src/config_priv.h
@@ -20,6 +20,10 @@
 #ifndef __CONFIG_PRIV_H_
 #define __CONFIG_PRIV_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int conf_cli_register(void);
 int conf_nmgr_register(void);
 
@@ -51,4 +55,8 @@ SLIST_HEAD(conf_handler_head, conf_handler);
 extern struct conf_handler_head conf_handlers;
 extern struct conf_store *conf_save_dst;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CONFIG_PRIV_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/config/test/src/conf_test.h
----------------------------------------------------------------------
diff --git a/sys/config/test/src/conf_test.h b/sys/config/test/src/conf_test.h
index b50ff2f..e88a1f6 100644
--- a/sys/config/test/src/conf_test.h
+++ b/sys/config/test/src/conf_test.h
@@ -20,6 +20,14 @@
 #ifndef _CONF_TEST_H_
 #define _CONF_TEST_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void config_test_all(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _CONF_TEST_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/config/test/src/config_test.h
----------------------------------------------------------------------
diff --git a/sys/config/test/src/config_test.h b/sys/config/test/src/config_test.h
index da531af..fb515f8 100644
--- a/sys/config/test/src/config_test.h
+++ b/sys/config/test/src/config_test.h
@@ -19,6 +19,14 @@
 #ifndef _CONFIG_TEST_H_
 #define _CONFIG_TEST_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int config_test_all();
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/console/full/include/console/console.h
----------------------------------------------------------------------
diff --git a/sys/console/full/include/console/console.h b/sys/console/full/include/console/console.h
index a196f01..cbe8e2f 100644
--- a/sys/console/full/include/console/console.h
+++ b/sys/console/full/include/console/console.h
@@ -21,6 +21,10 @@
 
 #include <stdarg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void (*console_rx_cb)(void);
 
 int console_init(console_rx_cb rx_cb);
@@ -35,4 +39,8 @@ void console_printf(const char *fmt, ...)
 
 extern int console_is_midline;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CONSOLE_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/console/full/include/console/prompt.h
----------------------------------------------------------------------
diff --git a/sys/console/full/include/console/prompt.h b/sys/console/full/include/console/prompt.h
index 849ec7e..d517460 100644
--- a/sys/console/full/include/console/prompt.h
+++ b/sys/console/full/include/console/prompt.h
@@ -23,6 +23,10 @@
 #include <stdarg.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* print console prompt */
 void console_print_prompt();
 /* set the console prompt character */
@@ -30,4 +34,8 @@ void console_set_prompt(char);
 
 void console_no_prompt(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CONSOLE_PROMPT_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/console/stub/include/console/console.h
----------------------------------------------------------------------
diff --git a/sys/console/stub/include/console/console.h b/sys/console/stub/include/console/console.h
index 99db457..2585bdb 100644
--- a/sys/console/stub/include/console/console.h
+++ b/sys/console/stub/include/console/console.h
@@ -21,6 +21,10 @@
 
 #include <stdarg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void (*console_rx_cb)(void);
 
 static int inline
@@ -67,5 +71,9 @@ console_echo(int on)
 
 #define console_is_midline  (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CONSOLE__ */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/console/stub/include/console/prompt.h
----------------------------------------------------------------------
diff --git a/sys/console/stub/include/console/prompt.h b/sys/console/stub/include/console/prompt.h
index 6f3c3c2..2f0c5e8 100644
--- a/sys/console/stub/include/console/prompt.h
+++ b/sys/console/stub/include/console/prompt.h
@@ -22,6 +22,10 @@
 
 #include <stdarg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* print console prompt */
 void console_print_prompt(void);
 /* set the console prompt character */
@@ -31,4 +35,8 @@ void console_set_prompt(char);
 extern char console_prompt[2];
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CONSOLE_PROMPT_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/id/include/id/id.h
----------------------------------------------------------------------
diff --git a/sys/id/include/id/id.h b/sys/id/include/id/id.h
index b1da40b..0c03f3e 100644
--- a/sys/id/include/id/id.h
+++ b/sys/id/include/id/id.h
@@ -20,6 +20,10 @@
 #ifndef __SYS_ID_H__
 #define __SYS_ID_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Maximum configurable serial number.
  */
@@ -30,4 +34,8 @@
  */
 void id_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/log/include/log/ignore.h
----------------------------------------------------------------------
diff --git a/sys/log/include/log/ignore.h b/sys/log/include/log/ignore.h
index 4a10e1d..70c9200 100644
--- a/sys/log/include/log/ignore.h
+++ b/sys/log/include/log/ignore.h
@@ -20,6 +20,10 @@
 #ifndef H_IGNORE_
 #define H_IGNORE_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * These macros prevent the "set but not used" warnings for log writes below
  * the log level.
@@ -53,4 +57,8 @@
               IGN_14, IGN_13, IGN_12, IGN_11, IGN_10, IGN_9, IGN_8, IGN_7, \
               IGN_6, IGN_5, IGN_4, IGN_3, IGN_2, IGN_1)(__VA_ARGS__)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/log/include/log/log.h
----------------------------------------------------------------------
diff --git a/sys/log/include/log/log.h b/sys/log/include/log/log.h
index d02c44d..a074de8 100644
--- a/sys/log/include/log/log.h
+++ b/sys/log/include/log/log.h
@@ -25,6 +25,10 @@
 
 #include <os/queue.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Global log info */
 struct log_info {
     int64_t li_timestamp;
@@ -203,4 +207,8 @@ extern const struct log_handler log_fcb_handler;
 int log_nmgr_register_group(void);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __LOG_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/reboot/include/reboot/log_reboot.h
----------------------------------------------------------------------
diff --git a/sys/reboot/include/reboot/log_reboot.h b/sys/reboot/include/reboot/log_reboot.h
index f3d84a4..f4c3c5c 100644
--- a/sys/reboot/include/reboot/log_reboot.h
+++ b/sys/reboot/include/reboot/log_reboot.h
@@ -19,6 +19,10 @@
 #ifndef __LOG_REBOOT_H__
 #define __LOG_REBOOT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define  SOFT_REBOOT (0)
 #define  HARD_REBOOT (1)
 #define  GEN_CORE    (2)
@@ -32,4 +36,8 @@
 int reboot_init_handler(int log_store_type, uint8_t entries);
 int log_reboot(int reason);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _LOG_REBOOT_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/shell/include/shell/shell.h
----------------------------------------------------------------------
diff --git a/sys/shell/include/shell/shell.h b/sys/shell/include/shell/shell.h
index 48351a0..a5a4a61 100644
--- a/sys/shell/include/shell/shell.h
+++ b/sys/shell/include/shell/shell.h
@@ -21,6 +21,10 @@
 
 #include <os/os.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef int (*shell_cmd_func_t)(int argc, char **argv);
 struct shell_cmd {
     char *sc_cmd;
@@ -45,4 +49,8 @@ void shell_init(void);
 int shell_cmd_list_lock(void);
 int shell_cmd_list_unlock(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SHELL_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/shell/include/shell/shell_prompt.h
----------------------------------------------------------------------
diff --git a/sys/shell/include/shell/shell_prompt.h b/sys/shell/include/shell/shell_prompt.h
index f0e4dd3..54e88db 100644
--- a/sys/shell/include/shell/shell_prompt.h
+++ b/sys/shell/include/shell/shell_prompt.h
@@ -20,6 +20,14 @@
 #ifndef H_SHELL_PROMPT_
 #define H_SHELL_PROMPT_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int shell_prompt_cmd(int argc, char **argv);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/shell/src/shell_priv.h
----------------------------------------------------------------------
diff --git a/sys/shell/src/shell_priv.h b/sys/shell/src/shell_priv.h
index 4e035e0..3e6242a 100644
--- a/sys/shell/src/shell_priv.h
+++ b/sys/shell/src/shell_priv.h
@@ -20,8 +20,16 @@
 #ifndef __SHELL_PRIV_H_
 #define __SHELL_PRIV_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int shell_os_tasks_display_cmd(int argc, char **argv);
 int shell_os_mpool_display_cmd(int argc, char **argv);
 int shell_os_date_cmd(int argc, char **argv);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SHELL_PRIV_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/stats/include/stats/stats.h
----------------------------------------------------------------------
diff --git a/sys/stats/include/stats/stats.h b/sys/stats/include/stats/stats.h
index 7e5811e..bb047b4 100644
--- a/sys/stats/include/stats/stats.h
+++ b/sys/stats/include/stats/stats.h
@@ -23,6 +23,10 @@
 #include "syscfg/syscfg.h"
 #include "os/queue.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct stats_name_map {
     uint16_t snm_off;
     char *snm_name;
@@ -125,4 +129,8 @@ int stats_nmgr_register_group(void);
 int stats_shell_register(void);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __UTIL_STATS_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/sys/sysinit/include/sysinit/sysinit.h
----------------------------------------------------------------------
diff --git a/sys/sysinit/include/sysinit/sysinit.h b/sys/sysinit/include/sysinit/sysinit.h
index be97186..4b61754 100644
--- a/sys/sysinit/include/sysinit/sysinit.h
+++ b/sys/sysinit/include/sysinit/sysinit.h
@@ -22,6 +22,10 @@
 
 #include "syscfg/syscfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void sysinit_panic_fn(const char *file, int line);
 
 #if !MYNEWT_VAL(SYSINIT_PANIC_FN)
@@ -46,4 +50,8 @@ void sysinit_app(void);
 #define sysinit sysinit_app
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/test/crash_test/include/crash_test/crash_test.h
----------------------------------------------------------------------
diff --git a/test/crash_test/include/crash_test/crash_test.h b/test/crash_test/include/crash_test/crash_test.h
index c96b5ea..c8cd99b 100644
--- a/test/crash_test/include/crash_test/crash_test.h
+++ b/test/crash_test/include/crash_test/crash_test.h
@@ -19,9 +19,17 @@
 #ifndef __CRASH_TEST_H__
 #define __CRASH_TEST_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Adds the crash commands to your shell/newtmgr.
  */
 void crash_test_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CRASH_TEST_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/test/crash_test/src/crash_test_priv.h
----------------------------------------------------------------------
diff --git a/test/crash_test/src/crash_test_priv.h b/test/crash_test/src/crash_test_priv.h
index 09dc5a3..ef4ff67 100644
--- a/test/crash_test/src/crash_test_priv.h
+++ b/test/crash_test/src/crash_test_priv.h
@@ -19,6 +19,10 @@
 #ifndef __CRASH_TEST_PRIV_H__
 #define __CRASH_TEST_PRIV_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if MYNEWT_VAL(CRASH_TEST_CLI)
 extern struct shell_cmd crash_cmd_struct;
 #endif
@@ -28,4 +32,8 @@ extern struct nmgr_group crash_test_nmgr_group;
 
 int crash_device(char *how);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CRASH_TEST_PRIV_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/test/flash_test/include/flash_test/flash_test.h
----------------------------------------------------------------------
diff --git a/test/flash_test/include/flash_test/flash_test.h b/test/flash_test/include/flash_test/flash_test.h
index f38f48c..f4871a3 100644
--- a/test/flash_test/include/flash_test/flash_test.h
+++ b/test/flash_test/include/flash_test/flash_test.h
@@ -19,9 +19,17 @@
 #ifndef __FLASH_TEST_H__ 
 #define __FLASH_TEST_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * adds the flash test commands to your shell */
 int
 flash_test_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __FLASH_TEST_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/test/testreport/include/testreport/testreport.h
----------------------------------------------------------------------
diff --git a/test/testreport/include/testreport/testreport.h b/test/testreport/include/testreport/testreport.h
index 7a0d3e4..7d29cb0 100644
--- a/test/testreport/include/testreport/testreport.h
+++ b/test/testreport/include/testreport/testreport.h
@@ -20,6 +20,10 @@
 #ifndef H_TESTREPORT_
 #define H_TESTREPORT_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct nffs_area_desc;
 
 struct tr_config {
@@ -31,4 +35,8 @@ extern struct tr_config tr_config;
 
 int tr_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/test/testreport/src/testreport_priv.h
----------------------------------------------------------------------
diff --git a/test/testreport/src/testreport_priv.h b/test/testreport/src/testreport_priv.h
index 88576b6..08dd67c 100644
--- a/test/testreport/src/testreport_priv.h
+++ b/test/testreport/src/testreport_priv.h
@@ -23,6 +23,10 @@
 #include <stddef.h>
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int tr_results_mkdir_results(void);
 int tr_results_rmdir_results(void);
 
@@ -45,4 +49,8 @@ int tr_io_delete(const char *path);
 int tr_io_mkdir(const char *path);
 int tr_io_rmdir(const char *path);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/test/testutil/include/testutil/testutil.h
----------------------------------------------------------------------
diff --git a/test/testutil/include/testutil/testutil.h b/test/testutil/include/testutil/testutil.h
index de61394..1579b84 100644
--- a/test/testutil/include/testutil/testutil.h
+++ b/test/testutil/include/testutil/testutil.h
@@ -25,6 +25,10 @@
 
 #include "syscfg/syscfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*****************************************************************************
  * Public declarations                                                       *
  *****************************************************************************/
@@ -171,4 +175,8 @@ extern jmp_buf tu_case_jb;
 #define ASSERT_IF_TEST(expr)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/test/testutil/src/testutil_priv.h
----------------------------------------------------------------------
diff --git a/test/testutil/src/testutil_priv.h b/test/testutil/src/testutil_priv.h
index 3f8cb2d..06e52c2 100644
--- a/test/testutil/src/testutil_priv.h
+++ b/test/testutil/src/testutil_priv.h
@@ -25,10 +25,18 @@
 
 #include "testutil/testutil.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void tu_arch_restart(void);
 void tu_case_abort(void);
 
 extern tu_post_test_fn_t *tu_case_post_test_cb;
 extern void *tu_case_post_test_cb_arg;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/util/cbmem/include/cbmem/cbmem.h
----------------------------------------------------------------------
diff --git a/util/cbmem/include/cbmem/cbmem.h b/util/cbmem/include/cbmem/cbmem.h
index 42decfb..3aec6f8 100644
--- a/util/cbmem/include/cbmem/cbmem.h
+++ b/util/cbmem/include/cbmem/cbmem.h
@@ -21,6 +21,10 @@
 
 #include <os/os.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct cbmem_entry_hdr {
     uint16_t ceh_len;
     uint16_t ceh_flags;
@@ -63,4 +67,8 @@ int cbmem_walk(struct cbmem *cbmem, cbmem_walk_func_t walk_func, void *arg);
 
 int cbmem_flush(struct cbmem *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __UTIL_CBMEM_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/util/cbmem/test/src/util_test_priv.h
----------------------------------------------------------------------
diff --git a/util/cbmem/test/src/util_test_priv.h b/util/cbmem/test/src/util_test_priv.h
index 93289b8..38d3ed1 100644
--- a/util/cbmem/test/src/util_test_priv.h
+++ b/util/cbmem/test/src/util_test_priv.h
@@ -20,6 +20,14 @@
 #ifndef __UTIL_TEST_PRIV_
 #define __UTIL_TEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int cbmem_test_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/util/crc/include/crc/crc16.h
----------------------------------------------------------------------
diff --git a/util/crc/include/crc/crc16.h b/util/crc/include/crc/crc16.h
index b9b965f..3336b49 100644
--- a/util/crc/include/crc/crc16.h
+++ b/util/crc/include/crc/crc16.h
@@ -30,7 +30,15 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define CRC16_INITIAL_CRC       0       /* what to seed crc16 with */
 unsigned short crc16_ccitt(uint16_t initial_crc, const void *buf, int len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _CRC16_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/util/crc/include/crc/crc8.h
----------------------------------------------------------------------
diff --git a/util/crc/include/crc/crc8.h b/util/crc/include/crc/crc8.h
index 336acca..9739972 100644
--- a/util/crc/include/crc/crc8.h
+++ b/util/crc/include/crc/crc8.h
@@ -26,7 +26,15 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 uint8_t crc8_init(void);
 uint8_t crc8_calc(uint8_t val, void *buf, int cnt);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif


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

Posted by ma...@apache.org.
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/libraries/bootloader_dfu/dfu_ble_svc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc.h
index 5e5ae4b..37a6412 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc.h
@@ -40,6 +40,10 @@
 #include "nrf_soc.h"
 #include "nrf_error_sdm.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BOOTLOADER_SVC_BASE     0x0     /**< The number of the lowest SVC number reserved for the bootloader. */
 #define SYSTEM_SERVICE_ATT_SIZE 8       /**< Size of the system service attribute length including CRC-16 at the end. */  
 
@@ -75,6 +79,10 @@ typedef struct
  */
 SVCALL(DFU_BLE_SVC_PEER_DATA_SET, uint32_t, dfu_ble_svc_peer_data_set(dfu_ble_peer_data_t * p_peer_data));
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_BLE_SVC_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/libraries/bootloader_dfu/dfu_ble_svc_internal.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc_internal.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc_internal.h
index 0b6e5d4..f74eeb2 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc_internal.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_ble_svc_internal.h
@@ -28,6 +28,10 @@
 #include "dfu_ble_svc.h"
 #include "ble_gap.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Internal bootloader/DFU function for retrieving peer data provided from application.
  *
  * @param[out] p_peer_data Peer data set by application to be used for DFU connection.
@@ -38,6 +42,10 @@
  */
 uint32_t dfu_ble_peer_data_get(dfu_ble_peer_data_t * p_peer_data);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_BLE_SVC_INTERNAL_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/libraries/bootloader_dfu/dfu_init.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_init.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_init.h
index 059ad0d..edac3ce 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_init.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_init.h
@@ -44,6 +44,10 @@
 #include <stdint.h>
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Structure contained in an init packet. Contains information on device type, revision, and 
  *        supported SoftDevices.
  */
@@ -129,6 +133,10 @@ uint32_t dfu_init_prevalidate(uint8_t * p_init_data, uint32_t init_data_len);
  */
 uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_INIT_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/libraries/bootloader_dfu/dfu_transport.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_transport.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_transport.h
index 4587b2a..6eb7ab6 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_transport.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_transport.h
@@ -23,6 +23,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for starting the update of Device Firmware.
  *
  * @retval NRF_SUCCESS Operation success.   
@@ -35,6 +39,10 @@ uint32_t dfu_transport_update_start(void);
  */
 uint32_t dfu_transport_close(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_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/libraries/bootloader_dfu/dfu_types.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_types.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_types.h
index f460ed4..1415ee1 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_types.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_types.h
@@ -29,6 +29,10 @@
 #include "nrf.h"
 #include "app_util.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NRF_UICR_BOOT_START_ADDRESS         (NRF_UICR_BASE + 0x14)      /**< Register where the bootloader start address is stored in the UICR register. */
 
 #if defined(NRF52)                                                  
@@ -163,6 +167,10 @@ typedef struct
 /**@brief Update complete handler type. */
 typedef void (*dfu_complete_handler_t)(dfu_update_status_t dfu_update_status);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_TYPES_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/libraries/bootloader_dfu/experimental/nrf_sec.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/experimental/nrf_sec.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/experimental/nrf_sec.h
index c2e2d32..fce0ce9 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/experimental/nrf_sec.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/experimental/nrf_sec.h
@@ -16,6 +16,10 @@
 #include "nrf_svc.h"
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NRF_SEC_SVC_BASE 0x8 /**< The lowest SVC number reserved for the nRF Security library. */
 
 /**@brief The SVC numbers used by the SVC functions in the security library. */
@@ -105,4 +109,8 @@ SVCALL(NRF_SEC_SVC_HASH, uint32_t, nrf_sec_svc_hash(nrf_sec_data_t      * p_data
                                                     uint8_t             * p_digest, 
                                                     nrf_sec_hash_func_t   hash_func));
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_SEC_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/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h
index fdfd3fe..596f1b9 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h
@@ -22,11 +22,19 @@
 #ifndef MEM_POOL_INTERNAL_H__
 #define MEM_POOL_INTERNAL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define TX_BUF_SIZE       32u    /**< TX buffer size in bytes. */
 #define RX_BUF_SIZE       600u   /**< RX buffer size in bytes. */
 
 #define RX_BUF_QUEUE_SIZE 2u     /**< RX buffer element size. */
  
+#ifdef __cplusplus
+}
+#endif
+
 #endif // MEM_POOL_INTERNAL_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/libraries/bootloader_dfu/hci_transport/hci_transport_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_transport_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_transport_config.h
index aa6dfc3..5befce3 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_transport_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport/hci_transport_config.h
@@ -23,6 +23,10 @@
 
 #include "boards.h"                                                     /**< Default include for boards.h which means that default pin numbers will be used for RX, TX, CTS, and RTS on the UART. Other pin number can be used if desired. */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** This section covers configurable parameters for the HCI Transport SLIP layer. */
 #define HCI_SLIP_UART_RX_PIN_NUMBER  RX_PIN_NUMBER                      /**< Defines the UART RX pin number. The default pin for the board is chosen, but can be overwritten. */
 
@@ -40,6 +44,10 @@
 #define MAX_PACKET_SIZE_IN_BITS      8000u                              /**< Maximum size of a single application packet in bits. */      
 #define USED_BAUD_RATE               38400u                             /**< The used uart baudrate. */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // HCI_TRANSPORT_CONFIG_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/libraries/button/app_button.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/button/app_button.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/button/app_button.h
index 5d18823..a7b9697 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/button/app_button.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/button/app_button.h
@@ -42,6 +42,10 @@
 #include "app_error.h"
 #include "nrf_gpio.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define APP_BUTTON_PUSH        1                               /**< Indicates that a button is pushed. */
 #define APP_BUTTON_RELEASE     0                               /**< Indicates that a button is released. */
 #define APP_BUTTON_ACTIVE_HIGH 1                               /**< Indicates that a button is active high. */
@@ -107,6 +111,10 @@ uint32_t app_button_disable(void);
  */
 uint32_t app_button_is_pushed(uint8_t button_id, bool * p_is_pushed);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_BUTTON_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/libraries/crc16/crc16.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc16/crc16.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc16/crc16.h
index 63defad..e5bbe26 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc16/crc16.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc16/crc16.h
@@ -25,6 +25,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for calculating CRC-16 in blocks.
  *
  * Feed each consecutive data block into this function, along with the current value of p_crc as
@@ -39,6 +43,10 @@
  */
 uint16_t crc16_compute(uint8_t const * p_data, uint32_t size, uint16_t const * p_crc);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // CRC16_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/libraries/crc32/crc32.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc32/crc32.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc32/crc32.h
index 801eb0b..4ec4e88 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc32/crc32.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/crc32/crc32.h
@@ -24,6 +24,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for calculating CRC-32 in blocks.
  *
  * Feed each consecutive data block into this function, along with the current value of p_crc as
@@ -38,6 +42,10 @@
  */
 uint32_t crc32_compute(uint8_t const * p_data, uint32_t size, uint32_t const * p_crc);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // CRC32_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/libraries/experimental_section_vars/section_vars.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/experimental_section_vars/section_vars.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/experimental_section_vars/section_vars.h
index 7a78b60..ac96a67 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/experimental_section_vars/section_vars.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/experimental_section_vars/section_vars.h
@@ -14,6 +14,10 @@
 #define SECTION_VARS_H__
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup section_vars Section variables
  * @ingroup app_common
@@ -260,4 +264,8 @@
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SECTION_VARS_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/libraries/fds/config/fds_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/config/fds_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/config/fds_config.h
index 32e762f..b158f36 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/config/fds_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/config/fds_config.h
@@ -13,6 +13,10 @@
 #ifndef FDS_CONFIG_H__
 #define FDS_CONFIG_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
  /**
  * @file fds_config.h
  *
@@ -60,4 +64,8 @@
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // FDS_CONFIG_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/libraries/fds/fds.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds.h
index dc37df3..1fe54ec 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds.h
@@ -13,6 +13,10 @@
 #ifndef FDS_H__
 #define FDS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup flash_data_storage Flash Data Storage
  * @ingroup app_common
@@ -730,4 +734,8 @@ ret_code_t fds_verify_crc_on_writes(bool enabled);
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // FDS_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/libraries/fds/fds_internal_defs.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds_internal_defs.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds_internal_defs.h
index 4c2d165..7dd31ea 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds_internal_defs.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds_internal_defs.h
@@ -17,6 +17,10 @@
 #include <stdbool.h>
 #include "fds_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined (FDS_THREADS)
     #include "nrf_soc.h"
     #include "app_util_platform.h"
@@ -302,4 +306,8 @@ typedef struct
 #endif
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // FDS_INTERNAL_DEFS_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/libraries/fifo/app_fifo.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fifo/app_fifo.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fifo/app_fifo.h
index 300adca..2011cab 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fifo/app_fifo.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fifo/app_fifo.h
@@ -25,6 +25,10 @@
 #include <stdint.h>
 #include <stdlib.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief   A FIFO instance structure.
  * @details Keeps track of which bytes to read and write next.
  *          Also, it keeps the information about which memory is allocated for the buffer
@@ -140,6 +144,10 @@ uint32_t app_fifo_read(app_fifo_t * p_fifo, uint8_t * p_byte_array, uint32_t * p
  */
 uint32_t app_fifo_write(app_fifo_t * p_fifo, uint8_t const * p_byte_array, uint32_t * p_size);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_FIFO_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/libraries/fstorage/config/fstorage_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/config/fstorage_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/config/fstorage_config.h
index 1423c01..c552142 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/config/fstorage_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/config/fstorage_config.h
@@ -13,6 +13,10 @@
 #ifndef FS_CONFIG_H__
 #define FS_CONFIG_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup fstorage_config fstorage configuration
  * @ingroup fstorage
@@ -55,5 +59,9 @@
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // FS_CONFIG_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/libraries/fstorage/fstorage.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage.h
index 7e2044b..a078cb8 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage.h
@@ -13,6 +13,10 @@
 #ifndef FSTORAGE_H__
 #define FSTORAGE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup fstorage fstorage
  * @ingroup app_common
@@ -232,4 +236,8 @@ void fs_sys_event_handler(uint32_t sys_evt);
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // FSTORAGE_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/libraries/fstorage/fstorage_internal_defs.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage_internal_defs.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage_internal_defs.h
index 5498c02..148efdf 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage_internal_defs.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/fstorage/fstorage_internal_defs.h
@@ -16,6 +16,10 @@
 #include "nrf.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define FS_FLAG_INITIALIZED         (1 << 0)  // The module has been initialized.
 #define FS_FLAG_PROCESSING          (1 << 1)  // The module is processing flash operations.
 // The module is waiting for a flash operation initiated by another module to complete.
@@ -132,4 +136,8 @@ static uint32_t const * fs_flash_page_end_addr()
 #define FS_PAGE_END_ADDR    (fs_flash_page_end_addr())
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //__FSTORAGE_INTERNAL_DEFS_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/libraries/gpiote/app_gpiote.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/gpiote/app_gpiote.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/gpiote/app_gpiote.h
index e651e80..b67da2a 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/gpiote/app_gpiote.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/gpiote/app_gpiote.h
@@ -46,6 +46,10 @@
 #include "app_error.h"
 #include "app_util.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define GPIOTE_USER_NODE_SIZE   24          /**< Size of app_gpiote.gpiote_user_t (only for use inside APP_GPIOTE_BUF_SIZE()). */
 #define NO_OF_PINS              32          /**< Number of GPIO pins on the \nRFXX chip. */
 
@@ -214,6 +218,10 @@ uint32_t app_gpiote_enable_interrupts(void);
 uint32_t app_gpiote_disable_interrupts(void);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_GPIOTE_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/libraries/hardfault/hardfault.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hardfault/hardfault.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hardfault/hardfault.h
index 3cb099a..98704d1 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hardfault/hardfault.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hardfault/hardfault.h
@@ -13,6 +13,10 @@
 #define HARFAULT_H__
 #include <stdint.h>
 #include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup hardfault_default HardFault exception
  * @{
@@ -56,5 +60,9 @@ typedef struct HardFault_stack
 void HardFault_process(HardFault_stack_t *p_stack);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* HARFAULT_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/libraries/hci/config/hci_mem_pool_internal.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_mem_pool_internal.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_mem_pool_internal.h
index 2027710..90e968f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_mem_pool_internal.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_mem_pool_internal.h
@@ -22,11 +22,19 @@
 #ifndef MEM_POOL_INTERNAL_H__
 #define MEM_POOL_INTERNAL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define TX_BUF_SIZE       600u         /**< TX buffer size in bytes. */
 #define RX_BUF_SIZE       TX_BUF_SIZE  /**< RX buffer size in bytes. */
 
 #define RX_BUF_QUEUE_SIZE 4u           /**< RX buffer element size. */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // MEM_POOL_INTERNAL_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/libraries/hci/config/hci_transport_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_transport_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_transport_config.h
index 7684615..0773118 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_transport_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config/hci_transport_config.h
@@ -18,6 +18,10 @@
 #ifndef HCI_TRANSPORT_CFG_H__
 #define HCI_TRANSPORT_CFG_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** This section covers configurable parameters for the HCI Transport SLIP layer. */
 #define HCI_SLIP_UART_RX_PIN_NUMBER  1                      /**< Defines the UART RX pin number. The default pin for the board is chosen, but can be overwritten. */
 
@@ -35,6 +39,10 @@
 #define MAX_PACKET_SIZE_IN_BITS      8000u                              /**< Maximum size of a single application packet in bits. */      
 #define USED_BAUD_RATE               38400u                             /**< The used uart baudrate. */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // HCI_TRANSPORT_CFG_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/libraries/hci/hci_mem_pool.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_mem_pool.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_mem_pool.h
index 502265e..2516631 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_mem_pool.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_mem_pool.h
@@ -48,6 +48,10 @@
 #include <stdint.h>
 #include "nrf_error.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for opening the module.
  *
  * @retval NRF_SUCCESS          Operation success. 
@@ -127,6 +131,10 @@ uint32_t hci_mem_pool_rx_extract(uint8_t ** pp_buffer, uint32_t * p_length);
  */
 uint32_t hci_mem_pool_rx_consume(uint8_t * p_buffer);
  
+#ifdef __cplusplus
+}
+#endif
+
 #endif // HCI_MEM_POOL_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/libraries/hci/hci_slip.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_slip.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_slip.h
index cc3b415..43c72ea 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_slip.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_slip.h
@@ -33,6 +33,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Event types from the SLIP Layer. */
 typedef enum
 {
@@ -124,6 +128,10 @@ uint32_t hci_slip_write(const uint8_t * p_buffer, uint32_t length);
  */
 uint32_t hci_slip_rx_buffer_register(uint8_t * p_buffer, uint32_t length);
  
+#ifdef __cplusplus
+}
+#endif
+
 #endif // HCI_SLIP_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/libraries/hci/hci_transport.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_transport.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_transport.h
index 85a4d6a..c09203a 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_transport.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/hci_transport.h
@@ -78,6 +78,10 @@
 #include <stdint.h>
 #include "nrf_error.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Generic event callback function events. */
 typedef enum
 {
@@ -215,6 +219,10 @@ uint32_t hci_transport_rx_pkt_extract(uint8_t ** pp_buffer, uint16_t * p_length)
  */
 uint32_t hci_transport_rx_pkt_consume(uint8_t * p_buffer);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // HCI_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/libraries/ic_info/nrf_ic_info.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ic_info/nrf_ic_info.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ic_info/nrf_ic_info.h
index 9c01be0..db40097 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ic_info/nrf_ic_info.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ic_info/nrf_ic_info.h
@@ -25,6 +25,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Enum identifying the IC revision as described in the Compatibility Matrix. */
 typedef enum
 {
@@ -52,6 +56,10 @@ typedef struct
 void nrf_ic_info_get(nrf_ic_info_t*  p_ic_info);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF51_IC_INFO_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/libraries/led_softblink/led_softblink.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/led_softblink/led_softblink.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/led_softblink/led_softblink.h
index 33f62b4..4aa976b 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/led_softblink/led_softblink.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/led_softblink/led_softblink.h
@@ -32,6 +32,10 @@
 #include <stdint.h>
 #include "sdk_errors.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Structure holding the initialization parameters.
  */
@@ -125,6 +129,10 @@ void led_softblink_on_time_set(uint32_t on_time_ticks);
  * @retval NRF_SUCCESS          If LED softblink was uninitialized successfully.
  */
 ret_code_t led_softblink_uninit(void);
+#ifdef __cplusplus
+}
+#endif
+
 #endif // LED_SOFTBLINK_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/libraries/low_power_pwm/low_power_pwm.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/low_power_pwm/low_power_pwm.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/low_power_pwm/low_power_pwm.h
index cf87030..f8175bb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/low_power_pwm/low_power_pwm.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/low_power_pwm/low_power_pwm.h
@@ -34,6 +34,10 @@
 #include "nrf_drv_common.h"
 #include "sdk_errors.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Event types.
  */
@@ -163,6 +167,10 @@ ret_code_t low_power_pwm_stop(low_power_pwm_t * p_pwm_instance);
  */
 ret_code_t low_power_pwm_duty_set(low_power_pwm_t * p_pwm_instance, uint8_t duty_cycle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // LOW_POWER_PWM_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/libraries/mailbox/app_mailbox.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mailbox/app_mailbox.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mailbox/app_mailbox.h
index 1e09b70..e663af4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mailbox/app_mailbox.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mailbox/app_mailbox.h
@@ -28,6 +28,10 @@
 #include "app_util.h"
 #include "nordic_common.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Supported overflow modes.
  */
@@ -139,5 +143,9 @@ uint32_t app_mailbox_length_get (const app_mailbox_t * p_mailbox);
  */
 void app_mailbox_mode_set(const app_mailbox_t * p_mailbox, app_mailbox_overflow_mode_t mode);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_APP_MAILBOX_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/libraries/mem_manager/mem_manager.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mem_manager/mem_manager.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mem_manager/mem_manager.h
index f9218c3..5d009ce 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mem_manager/mem_manager.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/mem_manager/mem_manager.h
@@ -37,6 +37,10 @@
 #include "sdk_common.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Initializes Memory Manager.
  *
  * @details API to initialize the Memory Manager. Always call this API before using any of the other
@@ -135,5 +139,9 @@ void nrf_mem_diagnose(void);
 
 #endif // MEM_MANAGER_ENABLE_DIAGNOSTICS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // MEM_MANAGER_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/libraries/pwm/app_pwm.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/pwm/app_pwm.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/pwm/app_pwm.h
index ebeaa64..eb3c1d4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/pwm/app_pwm.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/pwm/app_pwm.h
@@ -40,6 +40,10 @@
 #include "nrf_drv_ppi.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define APP_PWM_NOPIN                 0xFFFFFFFF
 
 /** @brief Number of channels for one timer instance (fixed to 2 due to timer properties).*/
@@ -290,6 +294,10 @@ app_pwm_duty_t app_pwm_channel_duty_get(app_pwm_t const * const p_instance, uint
 /** @} */
 
 
+#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/libraries/scheduler/app_scheduler.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/scheduler/app_scheduler.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/scheduler/app_scheduler.h
index f52e616..40cb562 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/scheduler/app_scheduler.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/scheduler/app_scheduler.h
@@ -54,6 +54,10 @@
 #include "app_error.h"
 #include "app_util.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define APP_SCHED_EVENT_HEADER_SIZE 8       /**< Size of app_scheduler.event_header_t (only for use inside APP_SCHED_BUF_SIZE()). */
 
 /**@brief Compute number of bytes required to hold the scheduler buffer.
@@ -158,6 +162,10 @@ void app_sched_pause(void);
  */
 void app_sched_resume(void);
 #endif
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_SCHEDULER_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/libraries/sensorsim/sensorsim.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sensorsim/sensorsim.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sensorsim/sensorsim.h
index 3aa278d..b018e30 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sensorsim/sensorsim.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sensorsim/sensorsim.h
@@ -26,6 +26,10 @@
 #include <stdint.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Triangular waveform sensor simulator configuration. */
 typedef struct
 {
@@ -80,6 +84,10 @@ void sensorsim_increment(sensorsim_state_t *     p_state,
 void sensorsim_decrement(sensorsim_state_t *     p_state,
                          const sensorsim_cfg_t * p_cfg);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SENSORSIM_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/libraries/sha256/sha256.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sha256/sha256.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sha256/sha256.h
index acea32b..ae95fc0 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sha256/sha256.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/sha256/sha256.h
@@ -38,6 +38,10 @@
 #include "sdk_errors.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Current state of a hash operation.
  */
 typedef struct {
@@ -86,6 +90,10 @@ ret_code_t sha256_update(sha256_context_t *ctx, const uint8_t * data, const size
  */
 ret_code_t sha256_final(sha256_context_t *ctx, uint8_t * hash);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif   // SHA256_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/libraries/simple_timer/app_simple_timer.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/simple_timer/app_simple_timer.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/simple_timer/app_simple_timer.h
index f72d7ca..9bb6c59 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/simple_timer/app_simple_timer.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/simple_timer/app_simple_timer.h
@@ -29,6 +29,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Timer time-out handler type. */
 typedef void (*app_simple_timer_timeout_handler_t)(void * p_context);
 
@@ -93,6 +97,10 @@ uint32_t app_simple_timer_stop(void);
  */
 uint32_t app_simple_timer_uninit(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // TIMER_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/libraries/slip/slip.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/slip/slip.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/slip/slip.h
index 7c63b81..ac8b7f8 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/slip/slip.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/slip/slip.h
@@ -16,6 +16,10 @@
 #include <stdint.h>
 #include "app_fifo.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** @file
  *
  * @defgroup slip SLIP encoding decoding
@@ -61,6 +65,10 @@ uint32_t slip_encode(uint8_t * p_output,  uint8_t * p_input, uint32_t input_leng
 uint32_t slip_decoding_add_char(uint8_t c, buffer_t * p_buf, slip_state_t * current_state);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SLIP_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/libraries/timer/app_timer.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer.h
index ca46b40..37393eb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer.h
@@ -47,6 +47,10 @@
 #include "app_util.h"
 #include "compiler_abstraction.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define APP_TIMER_CLOCK_FREQ         32768                      /**< Clock frequency of the RTC timer used to implement the app timer module. */
 #define APP_TIMER_MIN_TIMEOUT_TICKS  5                          /**< Minimum value of the timeout_ticks parameter of app_timer_start(). */
 
@@ -282,6 +286,10 @@ uint32_t app_timer_cnt_diff_compute(uint32_t   ticks_to,
 uint16_t app_timer_op_queue_utilization_get(void);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_TIMER_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/libraries/timer/app_timer_appsh.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer_appsh.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer_appsh.h
index f92629b..77a5951 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer_appsh.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/timer/app_timer_appsh.h
@@ -15,6 +15,10 @@
 
 #include "app_timer.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define APP_TIMER_SCHED_EVT_SIZE     sizeof(app_timer_event_t)  /**< Size of button events being passed through the scheduler (is to be used for computing the maximum size of scheduler events). */
 
 /**@brief Macro for initializing the application timer module to use with app_scheduler.
@@ -40,5 +44,9 @@ typedef struct
 
 uint32_t app_timer_evt_schedule(app_timer_timeout_handler_t timeout_handler,
                                 void *                      p_context);
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_TIMER_APPSH_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/libraries/trace/app_trace.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/trace/app_trace.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/trace/app_trace.h
index c746c63..144b15e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/trace/app_trace.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/trace/app_trace.h
@@ -4,6 +4,10 @@
 #include <stdint.h>
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup app_trace Debug Logger
  * @ingroup app_common
@@ -53,4 +57,8 @@ void app_trace_dump(uint8_t * p_buffer, uint32_t len);
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //__DEBUG_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/libraries/twi/app_twi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/twi/app_twi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/twi/app_twi.h
index 1ae2743..65bbf45 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/twi/app_twi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/twi/app_twi.h
@@ -17,6 +17,10 @@
 #include "nrf_drv_twi.h"
 #include "sdk_errors.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup app_twi TWI transaction manager
  * @{
@@ -287,4 +291,8 @@ __STATIC_INLINE bool app_twi_is_idle(app_twi_t * p_app_twi)
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_TWI_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/libraries/uart/app_uart.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/uart/app_uart.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/uart/app_uart.h
index 8988cc8..aea405c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/uart/app_uart.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/uart/app_uart.h
@@ -26,6 +26,10 @@
 #include <stdbool.h>
 #include "app_util_platform.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define  UART_PIN_DISCONNECTED 0xFFFFFFFF /**< Value indicating that no pin is connected to this UART register. */
 
 /**@brief UART Flow Control modes for the peripheral.
@@ -222,6 +226,10 @@ uint32_t app_uart_flush(void);
 uint32_t app_uart_close(void);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //APP_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/libraries/util/app_error.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error.h
index c87a6df..25510c4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error.h
@@ -31,6 +31,10 @@
 #include "nrf_log.h"
 #include "app_error_weak.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NRF_FAULT_ID_SDK_RANGE_START 0x00004000 /**< The start of the range of error IDs defined in the SDK. */
 
 /**@defgroup APP_ERROR_FAULT_IDS Fault ID types
@@ -196,6 +200,10 @@ static __INLINE void app_error_print(uint32_t id, uint32_t pc, uint32_t info)
         }                                                     \
     } while (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_ERROR_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/libraries/util/app_error_weak.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error_weak.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error_weak.h
index 551a431..5607c73 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error_weak.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error_weak.h
@@ -13,6 +13,10 @@
 #ifndef APP_ERROR_WEAK_H__
 #define APP_ERROR_WEAK_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** @file
  *
  * @defgroup app_error Common application error handler
@@ -48,4 +52,8 @@ __WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info);
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_ERROR_WEAK_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/libraries/util/app_util.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util.h
index 774bc28..b418f28 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util.h
@@ -27,6 +27,10 @@
 #include "compiler_abstraction.h"
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 //lint -save -e27 -e10 -e19
 #if defined ( __CC_ARM )
 extern char STACK$$Base;
@@ -488,6 +492,10 @@ static __INLINE bool is_address_from_stack(void * ptr)
     }
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_UTIL_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/libraries/util/app_util_bds.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_bds.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_bds.h
index 7547ad8..677a8b8 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_bds.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_bds.h
@@ -30,6 +30,10 @@
 #include "ble_srv_common.h"
 #include "nordic_common.h"
     
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef uint8_t nibble_t;
 typedef uint32_t uint24_t;
 typedef uint64_t uint40_t;
@@ -408,6 +412,10 @@ static __INLINE uint8_t bds_ble_date_time_decode(const uint8_t   len,
     return pos;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_UTIL_BDS_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/libraries/util/app_util_platform.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_platform.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_platform.h
index e0142ae..7b25e5b 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_platform.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_util_platform.h
@@ -25,6 +25,10 @@
 #include <stdint.h>
 #include "compiler_abstraction.h"
 #include "nrf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef SOFTDEVICE_PRESENT
 #include "nrf_soc.h"
 #include "nrf_nvic.h"
@@ -206,6 +210,10 @@ static __INLINE uint8_t privilege_level_get(void)
 #endif
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_UTIL_PLATFORM_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/libraries/util/common.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/common.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/common.h
index e08d52d..d7dbe62 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/common.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/common.h
@@ -13,6 +13,10 @@
 #ifndef COMMON_H
 #define COMMON_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 #include <stdbool.h>
@@ -35,4 +39,8 @@
 #define PINOUT(p)                PINX_GLUE(PIN,p,OUT)  /*!< gpio out pin number 'p' */
 
 /*lint --flb "Leave library region" */
+#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/libraries/util/nordic_common.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nordic_common.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nordic_common.h
index 4468c0a..b0f8290 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nordic_common.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nordic_common.h
@@ -16,6 +16,10 @@
 #ifndef NORDIC_COMMON_H__
 #define NORDIC_COMMON_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** The upper 8 bits of a 32 bit value */
 //lint -emacro(572,MSB) // Suppress warning 572 "Excessive shift value"
 #define MSB_32(a) (((a) & 0xFF000000) >> 24)
@@ -105,4 +109,8 @@
 #define UNUSED_PARAMETER(X) UNUSED_VARIABLE(X)
 #define UNUSED_RETURN_VALUE(X) UNUSED_VARIABLE(X)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NORDIC_COMMON_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/libraries/util/nrf_assert.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_assert.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_assert.h
index a15b089..08758fd 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_assert.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_assert.h
@@ -18,6 +18,10 @@
 #include "nrf.h"
 #include "app_error.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER)
 
 /** @brief Function for handling assertions.
@@ -57,4 +61,8 @@ else                                                                          \
 __WEAK 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_ */

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/libraries/util/nrf_log.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_log.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_log.h
index 5279d9f..d74af7d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_log.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/nrf_log.h
@@ -1,6 +1,10 @@
 #ifndef NRF_LOG_H_
 #define NRF_LOG_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef DOXYGEN
 
 #include <stdint.h>
@@ -696,4 +700,8 @@ uint32_t NRF_LOG_READ_INPUT(char* p_char);
 
 /** @} */
 #endif // DOXYGEN
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_LOG_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/libraries/util/sdk_common.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_common.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_common.h
index ced9c6c..bab4964 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_common.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_common.h
@@ -32,6 +32,10 @@
 #include "sdk_errors.h"
 #include "app_util.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Macro for verifying that the module is initialized. It will cause the function to return
  *        if not.
  *
@@ -170,5 +174,9 @@ do                                          \
 
 /** @} */
 /** @endcond */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SDK_COMMON_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/libraries/util/sdk_errors.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_errors.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_errors.h
index b72b85e..f3b5997 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_errors.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_errors.h
@@ -45,6 +45,10 @@
 #include <stdint.h>
 #include "nrf_error.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup sdk_err_base Base defined for SDK Modules
  * @{
@@ -111,5 +115,9 @@ typedef uint32_t ret_code_t;
 /** @} */
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SDK_ERRORS_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/libraries/util/sdk_macros.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_macros.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_macros.h
index f916b6e..83e489f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_macros.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_macros.h
@@ -22,6 +22,10 @@
 #ifndef SDK_MACROS_H__
 #define SDK_MACROS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Macro for verifying that the module is initialized. It will cause the function to return
  *        @ref NRF_ERROR_INVALID_STATE if not.
  */
@@ -68,5 +72,9 @@ do                                                  \
 
 /** @} */
 /** @endcond */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SDK_MACROS_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/libraries/util/sdk_mapped_flags.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_mapped_flags.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_mapped_flags.h
index 58474c2..63733bc 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_mapped_flags.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_mapped_flags.h
@@ -18,6 +18,10 @@
 #include "app_util.h"
 #include "compiler_abstraction.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @file
  * @defgroup sdk_mapped_flags Mapped flags
@@ -150,4 +154,8 @@ static __INLINE bool sdk_mapped_flags_any_set(sdk_mapped_flags_t flags)
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SDK_MAPPED_FLAGS_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/libraries/util/sdk_os.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_os.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_os.h
index 5a736c6..3fbbf4b 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_os.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_os.h
@@ -25,6 +25,10 @@
 #ifndef SDK_OS_H__
 #define SDK_OS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define SDK_MUTEX_DEFINE(X)
 #define SDK_MUTEX_INIT(X)
 #define SDK_MUTEX_LOCK(X)
@@ -36,5 +40,9 @@
  
 /** @} */
 /** @endcond */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SDK_OS_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/libraries/util/sdk_resources.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_resources.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_resources.h
index 8d38348..c95a65e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_resources.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/util/sdk_resources.h
@@ -16,6 +16,10 @@
 #ifndef APP_RESOURCES_H__
 #define APP_RESOURCES_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef SOFTDEVICE_PRESENT
 	#include "nrf_sd_def.h"
 #else
@@ -47,4 +51,8 @@
 #define NRF_SWI_USED          (SD_SWI_USED | GZLL_SWI_USED | ESB_SWI_USED)
 #define NRF_TIMERS_USED       (SD_TIMERS_USED | GZLL_TIMERS_USED | ESB_TIMERS_USED)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // APP_RESOURCES_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/application/codecs/common/ble_dtm_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/ble_dtm_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/ble_dtm_app.h
index da5e01c..e47ae2f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/ble_dtm_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/ble_dtm_app.h
@@ -13,6 +13,10 @@
 #ifndef BLE_DTM_APP_H__
 #define BLE_DTM_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -81,4 +85,8 @@ uint32_t ble_dtm_init_rsp_dec(uint8_t const * const p_buf,
 uint32_t ble_dtm_init(app_uart_stream_comm_params_t * p_uart_comm_params);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BLE_DTM_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/application/codecs/common/conn_systemreset.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/conn_systemreset.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/conn_systemreset.h
index 1416b00..a1004aa 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/conn_systemreset.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/common/conn_systemreset.h
@@ -13,6 +13,10 @@
 #ifndef CONN_SYSTEMRESET_H__
 #define CONN_SYSTEMRESET_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -40,4 +44,8 @@
 uint32_t conn_systemreset(void);
 
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // CONN_SYSTEMRESET_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/application/codecs/s130/serializers/app_ble_gap_sec_keys.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_gap_sec_keys.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_gap_sec_keys.h
index 8d547d4..525e939 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_gap_sec_keys.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_gap_sec_keys.h
@@ -12,6 +12,10 @@
 #ifndef _APP_BLE_GAP_SEC_KEYS_H
 #define _APP_BLE_GAP_SEC_KEYS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -78,4 +82,8 @@ uint32_t app_ble_gap_sec_context_destroy(uint16_t conn_handle);
 uint32_t app_ble_gap_sec_context_find(uint16_t conn_handle, uint32_t *p_index);
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_APP_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/application/codecs/s130/serializers/app_ble_user_mem.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_user_mem.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_user_mem.h
index f6bc731..c7ab7ca 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_user_mem.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/app_ble_user_mem.h
@@ -12,6 +12,10 @@
 #ifndef _APP_BLE_USER_MEM_H
 #define _APP_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 app_ble_user_mem_context_destroy(uint16_t conn_handle);
 uint32_t app_ble_user_mem_context_find(uint16_t conn_handle, uint32_t *p_index);
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //_APP_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/application/codecs/s130/serializers/ble_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_app.h
index c5888d6..a0f5c29 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_APP_H__
 #define BLE_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -444,4 +448,8 @@ uint32_t ble_event_dec(uint8_t const * const p_buf,
                        uint32_t * const      p_event_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/application/codecs/s130/serializers/ble_evt_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_evt_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_evt_app.h
index c02a71e..cc42fba 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_evt_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_evt_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_EVT_APP_H__
 #define BLE_EVT_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -108,4 +112,8 @@ uint32_t ble_evt_tx_complete_dec(uint8_t const * const p_buf,
                                        uint32_t * const      p_event_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/application/codecs/s130/serializers/ble_gap_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_app.h
index 2adc32f..0d791eb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GAP_APP_H__
 #define BLE_GAP_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -1317,4 +1321,8 @@ uint32_t ble_gap_lesc_oob_data_get_rsp_dec(uint8_t const * const       p_buf,
                                            ble_gap_lesc_oob_data_t  * *pp_oobd_own,
                                            uint32_t * const            p_result_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/application/codecs/s130/serializers/ble_gap_evt_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_evt_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_evt_app.h
index 7f2f65d..12c1f1b 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_evt_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gap_evt_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GAP_EVT_APP_H__
 #define BLE_GAP_EVT_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -455,4 +459,8 @@ uint32_t ble_gap_evt_lesc_dhkey_request_dec(uint8_t const * const p_buf,
                                             ble_evt_t * const     p_event,
                                             uint32_t * const      p_event_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/application/codecs/s130/serializers/ble_gattc_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_app.h
index 4963897..77cbd59 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTC_APP_H__
 #define BLE_GATTC_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -438,6 +442,10 @@ uint32_t ble_gattc_attr_info_discover_rsp_dec(uint8_t const * const p_buf,
                                               uint32_t              packet_len,
                                               uint32_t * const      p_result_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/application/codecs/s130/serializers/ble_gattc_evt_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_evt_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_evt_app.h
index 14aeb1b..d379807 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_evt_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gattc_evt_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTC_EVT_APP_H__
 #define BLE_GATTC_EVT_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -308,4 +312,8 @@ uint32_t ble_gattc_evt_attr_info_disc_rsp_dec(uint8_t const * const p_buf,
                                               uint32_t * const      p_event_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/application/codecs/s130/serializers/ble_gatts_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_app.h
index 989fd59..c5ed7c2 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTS_APP_H__
 #define BLE_GATTS_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -626,6 +630,10 @@ uint32_t ble_gatts_initial_user_handle_get_rsp_dec(uint8_t const * const  p_buf,
                                                    uint16_t ** pp_handle,
                                                    uint32_t * const       p_result_code);
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif //BLE_GATTS_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/application/codecs/s130/serializers/ble_gatts_evt_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_evt_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_evt_app.h
index 21e9b29..6e8ab02 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_evt_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_gatts_evt_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_GATTS_EVT_APP_H__
 #define BLE_GATTS_EVT_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -183,4 +187,8 @@ uint32_t ble_gatts_evt_write_dec(uint8_t const * const p_buf,
                                  uint32_t * const      p_event_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/application/codecs/s130/serializers/ble_l2cap_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_app.h
index d12e83c..806a53d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_app.h
@@ -34,6 +34,10 @@
 #include "ble_err.h"
 #include "ble_l2cap.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Register a CID with L2CAP.
  *
  * @details This registers a higher protocol layer with the L2CAP multiplexer, and is requried prior to all operations on the CID.
@@ -155,6 +159,10 @@ uint32_t ble_l2cap_tx_rsp_dec(uint8_t const * const p_buf,
                               uint32_t * const      p_result_code);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //BLE_L2CAP_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/application/codecs/s130/serializers/ble_l2cap_evt_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_evt_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_evt_app.h
index 5abc7ba..3c32be8 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_evt_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/ble_l2cap_evt_app.h
@@ -12,6 +12,10 @@
 #ifndef BLE_L2CAP_EVT_APP_H__
 #define BLE_L2CAP_EVT_APP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup ser_codecs Serialization codecs
  * @ingroup ble_sdk_lib_serialization
@@ -58,4 +62,8 @@ uint32_t ble_l2cap_evt_rx_dec(uint8_t const * const p_buf,
                               uint32_t * const      p_event_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/application/codecs/s130/serializers/nrf_soc_app.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/nrf_soc_app.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/nrf_soc_app.h
index 716a59a..bef156e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/nrf_soc_app.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/codecs/s130/serializers/nrf_soc_app.h
@@ -34,6 +34,10 @@
 
 #include <stdint.h>
 #include "nrf_soc.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Encodes @ref sd_power_system_off command request.
  *
  * @sa @ref nrf51_sd_power_off for packet format.
@@ -123,4 +127,8 @@ uint32_t ecb_block_encrypt_rsp_dec(uint8_t const * const  p_buf,
                                    uint32_t * const       p_result_code);
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_SOC_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/application/hal/ser_app_hal.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_hal.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_hal.h
index 358a2a2..1ab75b4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_hal.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_hal.h
@@ -24,6 +24,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void (*ser_app_hal_flash_op_done_handler_t)(bool success);
 /**@brief Function for initializing hw modules.
  *
@@ -76,5 +80,9 @@ void ser_app_hal_nrf_evt_irq_priority_set(void);
 void ser_app_hal_nrf_evt_pending(void);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_APP_HAL_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/application/hal/ser_app_power_system_off.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_power_system_off.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_power_system_off.h
index 490b72d..7a6b095 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_power_system_off.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/hal/ser_app_power_system_off.h
@@ -15,10 +15,18 @@
 
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void ser_app_power_system_off_set(void);
 
 bool ser_app_power_system_off_get(void);
 
 void ser_app_power_system_off_enter(void);
 
+#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/application/transport/ser_sd_transport.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_sd_transport.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_sd_transport.h
index 92a28d4..c6b14c7 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_sd_transport.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_sd_transport.h
@@ -37,6 +37,10 @@
 #include <stdint.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void (*ser_sd_transport_evt_handler_t)(uint8_t * p_buffer, uint16_t length);
 typedef void (*ser_sd_transport_rsp_wait_handler_t)(void);
 typedef void (*ser_sd_transport_rsp_set_handler_t)(void);
@@ -149,5 +153,9 @@ uint32_t ser_sd_transport_cmd_write(const uint8_t *                p_buffer,
                                     uint16_t                       length,
                                     ser_sd_transport_rsp_handler_t cmd_resp_decode_callback);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_SD_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/application/transport/ser_softdevice_handler.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_softdevice_handler.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_softdevice_handler.h
index f9ded53..da9bfb3 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_softdevice_handler.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/application/transport/ser_softdevice_handler.h
@@ -31,6 +31,10 @@
 #include <stdbool.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for checking if there is any more events in the internal mailbox.
  *
  * @param[in] p_mailbox_length Pointer to mailbox length.
@@ -40,5 +44,9 @@
  */
 uint32_t sd_ble_evt_mailbox_length_get(uint32_t * p_mailbox_length);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_SOFTDEVICE_HANDLER_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/ble_serialization.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ble_serialization.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ble_serialization.h
index 39d8f20..b093fcc 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ble_serialization.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ble_serialization.h
@@ -18,6 +18,10 @@
 #include <stdint.h>
 #include <stddef.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief The types of serialization packets. */
 typedef enum
 {
@@ -577,6 +581,10 @@ uint32_t uint8_vector_dec(uint8_t const * const p_buf,
                  uint16_t              dlen);
 
 
+#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/ser_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ser_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ser_config.h
index 67b4f8a..6b387d8 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ser_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/serialization/common/ser_config.h
@@ -17,6 +17,10 @@
 
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /***********************************************************************************************//**
  * General parameters configuration.
  **************************************************************************************************/
@@ -110,4 +114,8 @@
 
 #define SER_MAX_CONNECTIONS 8
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SER_CONFIG_H__ */



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

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/nrf51xxx/include/mcu/cortex_m0.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/include/mcu/cortex_m0.h b/hw/mcu/nordic/nrf51xxx/include/mcu/cortex_m0.h
index ff85dc2..3f41ee3 100644
--- a/hw/mcu/nordic/nrf51xxx/include/mcu/cortex_m0.h
+++ b/hw/mcu/nordic/nrf51xxx/include/mcu/cortex_m0.h
@@ -22,6 +22,10 @@
 
 #include "nrf51.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * The nRF51 microcontroller uses RTC0 for periodic interrupts and it is
  * clocked at 32768Hz. The tick frequency is chosen such that it divides
@@ -29,4 +33,8 @@
  */
 #define OS_TICKS_PER_SEC    (128)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MCU_CORTEX_M0_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h b/hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h
index 09e9c93..e5a6a86 100644
--- a/hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h
+++ b/hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h
@@ -23,10 +23,18 @@
 #include "syscfg/syscfg.h"
 #include "nrf52.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if MYNEWT_VAL(XTAL_32768)
 #define OS_TICKS_PER_SEC    (128)
 #else
 #define OS_TICKS_PER_SEC    (1000)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MCU_CORTEX_M4_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/device/compiler_abstraction.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/compiler_abstraction.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/compiler_abstraction.h
index 6a41e8e..ba5e691 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/compiler_abstraction.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/compiler_abstraction.h
@@ -30,6 +30,10 @@
 #ifndef _COMPILER_ABSTRACTION_H
 #define _COMPILER_ABSTRACTION_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 #if defined ( __CC_ARM )
@@ -123,4 +127,8 @@
 
 /*lint --flb "Leave library region" */
 
+#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/device/nrf.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf.h
index fa24afa..031d4ab 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf.h
@@ -31,6 +31,10 @@
 #ifndef NRF_H
 #define NRF_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* MDK version */
 #define MDK_MAJOR_VERSION   8
 #define MDK_MINOR_VERSION   5
@@ -62,5 +66,9 @@
 
 #endif /* _WIN32 || __unix || __APPLE__ */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_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/device/nrf51_bitfields.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_bitfields.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_bitfields.h
index 5c5af9a..ec7cf01 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_bitfields.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_bitfields.h
@@ -30,6 +30,10 @@
 #ifndef __NRF51_BITS_H
 #define __NRF51_BITS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 /* Peripheral: AAR */
@@ -6889,4 +6893,8 @@
 
 
 /*lint --flb "Leave library region" */
+#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/device/nrf51_deprecated.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_deprecated.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_deprecated.h
index 0c7d7df..8e503ca 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_deprecated.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_deprecated.h
@@ -31,6 +31,10 @@
 #ifndef NRF51_DEPRECATED_H
 #define NRF51_DEPRECATED_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region */
 
 /* This file is given to prevent your SW from not compiling with the updates made to nrf51.h and 
@@ -434,5 +438,9 @@
 
 /*lint --flb "Leave library region" */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF51_DEPRECATED_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/device/nrf51_to_nrf52.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_to_nrf52.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_to_nrf52.h
index 16ae6f7..0d4c2cf 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_to_nrf52.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf51_to_nrf52.h
@@ -31,6 +31,10 @@
 #ifndef NRF51_TO_NRF52_H
 #define NRF51_TO_NRF52_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region */
 
 /* This file is given to prevent your SW from not compiling with the name changes between nRF51 and nRF52 devices.
@@ -931,5 +935,9 @@
 
 /*lint --flb "Leave library region" */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF51_TO_NRF52_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/device/nrf52_bitfields.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_bitfields.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_bitfields.h
index ae959d4..1f4aa88 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_bitfields.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_bitfields.h
@@ -30,6 +30,10 @@
 #ifndef __NRF52_BITS_H
 #define __NRF52_BITS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 /* Peripheral: AAR */
@@ -14858,4 +14862,8 @@
 
 
 /*lint --flb "Leave library region" */
+#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/device/nrf52_name_change.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_name_change.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_name_change.h
index 5ce8ba4..987a145 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_name_change.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf52_name_change.h
@@ -31,6 +31,10 @@
 #ifndef NRF52_NAME_CHANGE_H
 #define NRF52_NAME_CHANGE_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region */
 
 /* This file is given to prevent your SW from not compiling with the updates made to nrf52.h and 
@@ -66,5 +70,9 @@
 
 /*lint --flb "Leave library region" */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF52_NAME_CHANGE_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/drivers_nrf/adc/nrf_drv_adc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/adc/nrf_drv_adc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/adc/nrf_drv_adc.h
index 90f60ac..fac5752 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/adc/nrf_drv_adc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/adc/nrf_drv_adc.h
@@ -72,6 +72,10 @@ typedef struct
 
 /**@brief Macro for initializing the ADC channel with the default configuration. */
 #define NRF_DRV_ADC_DEFAULT_CHANNEL(analog_input)          \
+#ifdef __cplusplus
+extern "C" {
+#endif
+
  {{{                                                       \
     .resolution = NRF_ADC_CONFIG_RES_10BIT,                \
     .input      = NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE, \
@@ -284,5 +288,9 @@ __STATIC_INLINE nrf_adc_config_input_t nrf_drv_adc_gpio_to_ain(uint32_t pin)
         return NRF_ADC_CONFIG_INPUT_DISABLED;
     }
 }
+#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/drivers_nrf/ble_flash/ble_flash.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ble_flash/ble_flash.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ble_flash/ble_flash.h
index 149bf65..080ea5a 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ble_flash/ble_flash.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ble_flash/ble_flash.h
@@ -34,6 +34,10 @@
 #include <stdbool.h>
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BLE_FLASH_PAGE_SIZE     ((uint16_t)NRF_FICR->CODEPAGESIZE)  /**< Size of one flash page. */
 #define BLE_FLASH_MAGIC_NUMBER  0x45DE0000                          /**< Magic value to identify if flash contains valid data. */
 #define BLE_FLASH_EMPTY_MASK    0xFFFFFFFF                          /**< Bit mask that defines an empty address in flash. */
@@ -137,6 +141,10 @@ uint16_t ble_flash_crc16_compute(uint8_t * p_data, uint16_t size, uint16_t * p_c
  */
 void ble_flash_on_radio_active_evt(bool radio_active);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BLE_FLASH_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/drivers_nrf/clock/nrf_drv_clock.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/clock/nrf_drv_clock.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/clock/nrf_drv_clock.h
index 0ad098e..78e13d9 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/clock/nrf_drv_clock.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/clock/nrf_drv_clock.h
@@ -21,6 +21,10 @@
 #include "nrf_drv_config.h"
 #include "nrf_drv_common.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  *
  * @addtogroup nrf_clock Clock HAL and driver
@@ -243,4 +247,8 @@ __STATIC_INLINE uint32_t nrf_drv_clock_ppi_event_addr(nrf_clock_event_t event)
 #endif //SUPPRESS_INLINE_IMPLEMENTATION
 
 /*lint --flb "Leave library region" */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_CLOCK_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/drivers_nrf/common/nrf_drv_common.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/common/nrf_drv_common.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/common/nrf_drv_common.h
index 927f401..356ff72 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/common/nrf_drv_common.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/common/nrf_drv_common.h
@@ -20,6 +20,10 @@
 #include "nrf_drv_config.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Offset of event registers in every peripheral instance
  *
@@ -191,4 +195,8 @@ __STATIC_INLINE bool nrf_drv_is_in_RAM(void const * const ptr)
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_COMMON_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/drivers_nrf/comp/nrf_drv_comp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/comp/nrf_drv_comp.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/comp/nrf_drv_comp.h
index b61e0d3..b1d8d49 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/comp/nrf_drv_comp.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/comp/nrf_drv_comp.h
@@ -19,6 +19,10 @@
 #include "nrf_drv_config.h"
 #include "app_util_platform.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup nrf_comp COMP HAL and driver
  * @ingroup nrf_drivers
@@ -265,4 +269,8 @@ __STATIC_INLINE uint8_t nrf_drv_comp_ain_to_gpio(nrf_comp_input_t ain)
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
  #endif /* NRF_DRV_COMP_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/drivers_nrf/config/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config.h
index 74e18f9..e823d6c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -461,4 +465,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_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/drivers_nrf/config/nrf_drv_config_validation.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config_validation.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config_validation.h
index f2b6adc..fa1bb8f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config_validation.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config/nrf_drv_config_validation.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_VALIDATION_H
 #define NRF_DRV_CONFIG_VALIDATION_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef NRF52
 
 #if (!PERIPHERAL_RESOURCE_SHARING_ENABLED) && \
@@ -80,4 +84,8 @@
 
 #endif //NRF51
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_VALIDATION_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/drivers_nrf/delay/nrf_delay.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/delay/nrf_delay.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/delay/nrf_delay.h
index c41e444..5114df7 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/delay/nrf_delay.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/delay/nrf_delay.h
@@ -3,6 +3,10 @@
 
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Function for delaying execution for number of microseconds.
  *
@@ -239,4 +243,8 @@ __ASM volatile (
 
 void nrf_delay_ms(uint32_t volatile number_of_ms);
 
+#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/drivers_nrf/gpiote/nrf_drv_gpiote.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/gpiote/nrf_drv_gpiote.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/gpiote/nrf_drv_gpiote.h
index e8345d1..efb8bb8 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/gpiote/nrf_drv_gpiote.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/gpiote/nrf_drv_gpiote.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_GPIOTE__
 #define NRF_DRV_GPIOTE__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup nrf_gpiote GPIOTE abstraction and driver
  * @ingroup nrf_drivers
@@ -306,4 +310,8 @@ void nrf_drv_gpiote_out_task_trigger(nrf_drv_gpiote_pin_t pin);
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //NRF_DRV_GPIOTE__

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/drivers_nrf/hal/nrf_adc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_adc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_adc.h
index 66da0e6..56fce31 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_adc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_adc.h
@@ -13,6 +13,10 @@
 #ifndef NRF_ADC_H_
 #define NRF_ADC_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_adc_hal ADC HAL
  * @{
@@ -413,4 +417,8 @@ __STATIC_INLINE void nrf_adc_disable(void)
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_ADC_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/drivers_nrf/hal/nrf_clock.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_clock.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_clock.h
index 902442c..b9839dc 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_clock.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_clock.h
@@ -18,6 +18,10 @@
  
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_clock_hal Clock HAL
  * @{
@@ -411,4 +415,8 @@ __STATIC_INLINE void nrf_clock_cal_timer_timeout_set(uint32_t interval)
 /**
  *@}
  **/
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_CLOCK_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/drivers_nrf/hal/nrf_comp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_comp.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_comp.h
index b4c83b8..b1a3b71 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_comp.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_comp.h
@@ -18,6 +18,10 @@
 #ifndef NRF_COMP_H_
 #define NRF_COMP_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_comp_hal COMP HAL
  * @{
@@ -466,4 +470,8 @@ __STATIC_INLINE bool nrf_comp_event_check(nrf_comp_event_t comp_event)
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_COMP_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/drivers_nrf/hal/nrf_ecb.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ecb.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ecb.h
index 4c88f60..7c3f3d2 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ecb.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ecb.h
@@ -19,6 +19,10 @@
 #ifndef NRF_ECB_H__
 #define NRF_ECB_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_ecb AES ECB encryption
  * @{
@@ -61,6 +65,10 @@ bool nrf_ecb_crypt(uint8_t * dst, const uint8_t * src);
  */
 void nrf_ecb_set_key(const uint8_t * key);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  // NRF_ECB_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/drivers_nrf/hal/nrf_egu.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_egu.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_egu.h
index 1ffe714..105839c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_egu.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_egu.h
@@ -13,6 +13,10 @@
 #ifndef NRF_EGU_H__
 #define NRF_EGU_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef NRF52
     #error EGU is not supported on your chip.
 #endif
@@ -283,4 +287,8 @@ __STATIC_INLINE nrf_egu_int_mask_t nrf_egu_int_get(uint8_t channel)
 
 /** @} */
 
+#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/drivers_nrf/hal/nrf_gpio.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpio.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpio.h
index 0d2de6b..3e8b2d7 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpio.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpio.h
@@ -15,6 +15,10 @@
 #include "nrf.h"
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_gpio GPIO abstraction
  * @{
@@ -644,4 +648,8 @@ __STATIC_INLINE void nrf_gpio_port_clear(nrf_gpio_port_select_t port, uint8_t cl
 #endif //SUPPRESS_INLINE_IMPLEMENTATION
 /** @} */
 
+#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/drivers_nrf/hal/nrf_gpiote.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpiote.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpiote.h
index a525f6e..e493f44 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpiote.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_gpiote.h
@@ -17,6 +17,10 @@
 #include <stddef.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
 * @defgroup nrf_gpiote_abs GPIOTE abstraction
 * @{
@@ -388,4 +392,8 @@ __STATIC_INLINE void nrf_gpiote_te_default(uint32_t idx)
 #endif //SUPPRESS_INLINE_IMPLEMENTATION
 /** @} */
 
+#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/drivers_nrf/hal/nrf_i2s.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_i2s.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_i2s.h
index f464dbc..2dca3a2 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_i2s.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_i2s.h
@@ -28,6 +28,10 @@
 #include "nrf.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief This value can be provided as a parameter for the @ref nrf_i2s_pins_set
  *        function call to specify that a given I2S signal (SDOUT, SDIN, or MCK)
@@ -518,6 +522,10 @@ __STATIC_INLINE uint32_t * nrf_i2s_tx_buffer_get(NRF_I2S_Type const * p_i2s)
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_I2S_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/drivers_nrf/hal/nrf_lpcomp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_lpcomp.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_lpcomp.h
index 8aadb15..7056dfb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_lpcomp.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_lpcomp.h
@@ -18,6 +18,10 @@
 #ifndef NRF_LPCOMP_H_
 #define NRF_LPCOMP_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_lpcomp_hal LPCOMP HAL
  * @{
@@ -364,4 +368,8 @@ __STATIC_INLINE bool nrf_lpcomp_event_check(nrf_lpcomp_event_t lpcomp_event)
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_LPCOMP_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/drivers_nrf/hal/nrf_nvmc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_nvmc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_nvmc.h
index 95ff228..a975f5f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_nvmc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_nvmc.h
@@ -22,6 +22,10 @@
 #include <stdint.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_nvmc Non-volatile memory controller
  * @{
@@ -84,6 +88,10 @@ void nrf_nvmc_write_bytes(uint32_t  address, const uint8_t * src, uint32_t num_b
 void nrf_nvmc_write_words(uint32_t address, const uint32_t * src, uint32_t num_words);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_NVMC_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/drivers_nrf/hal/nrf_pdm.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pdm.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pdm.h
index 2b7a4ec..9b07545 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pdm.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pdm.h
@@ -14,6 +14,10 @@
 #ifndef NRF_PDM_H_
 #define NRF_PDM_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_pdm_hal PDM HAL
  * @{
@@ -356,4 +360,8 @@ __STATIC_INLINE uint32_t * nrf_pdm_buffer_get()
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_PDM_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/drivers_nrf/hal/nrf_ppi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ppi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ppi.h
index 60541db..c7d8dbe 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ppi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_ppi.h
@@ -16,6 +16,10 @@
 #include <stddef.h>
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_ppi_hal PPI HAL
  * @{
@@ -399,4 +403,8 @@ __STATIC_INLINE uint32_t * nrf_ppi_task_group_disable_address_get(nrf_ppi_channe
  **/
 
 /*lint --flb "Leave library region" */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_PPI_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/drivers_nrf/hal/nrf_pwm.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pwm.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pwm.h
index 13296d7..8fc4bbb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pwm.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_pwm.h
@@ -30,6 +30,10 @@
 #include "nrf_assert.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief This value can be provided as a parameter for the @ref nrf_pwm_pins_set
  *        function call to specify that a given output channel shall not be
@@ -656,6 +660,10 @@ __STATIC_INLINE void nrf_pwm_loop_set(NRF_PWM_Type * p_pwm,
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_PWM_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/drivers_nrf/hal/nrf_qdec.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_qdec.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_qdec.h
index 92de8fc..499df98 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_qdec.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_qdec.h
@@ -16,6 +16,10 @@
 #include "nrf_error.h"
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 /**
@@ -465,4 +469,8 @@ __STATIC_INLINE uint32_t nrf_qdec_ledpol_get(void)
  **/
 
 /*lint --flb "Leave library region" */
+#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/drivers_nrf/hal/nrf_rng.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rng.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rng.h
index b696588..415fad6 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rng.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rng.h
@@ -17,6 +17,10 @@
 
 #ifndef NRF_RNG_H__
 #define NRF_RNG_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_rng_hal RNG HAL
  * @{
@@ -208,4 +212,8 @@ __STATIC_INLINE void nrf_rng_error_correction_disable(void)
 /**
  *@}
  **/
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_RNG_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/drivers_nrf/hal/nrf_rtc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rtc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rtc.h
index 814da83..ad05f61 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rtc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_rtc.h
@@ -18,6 +18,10 @@
 #ifndef NRF_RTC_H
 #define NRF_RTC_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_rtc_hal RTC HAL
  * @{
@@ -301,4 +305,8 @@ __STATIC_INLINE void nrf_rtc_event_disable(NRF_RTC_Type * p_rtc, uint32_t mask)
 }
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* NRF_RTC_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/drivers_nrf/hal/nrf_saadc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_saadc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_saadc.h
index 6824c30..f2b6805 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_saadc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_saadc.h
@@ -14,6 +14,10 @@
 #ifndef NRF_SAADC_H_
 #define NRF_SAADC_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_saadc_hal SAADC HAL
  * @{
@@ -551,4 +555,8 @@ void nrf_saadc_channel_init(uint8_t channel, nrf_saadc_channel_config_t const *
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_SAADC_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/drivers_nrf/hal/nrf_spi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spi.h
index a571ed1..98dd662 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spi.h
@@ -28,6 +28,10 @@
 #include "nrf.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief This value can be used as a parameter for the @ref nrf_spi_pins_set
  *        function to specify that a given SPI signal (SCK, MOSI, or MISO)
@@ -329,6 +333,10 @@ __STATIC_INLINE void nrf_spi_configure(NRF_SPI_Type * p_spi,
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_SPI_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/drivers_nrf/hal/nrf_spim.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spim.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spim.h
index f76aaad..7c05956 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spim.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spim.h
@@ -28,6 +28,10 @@
 #include "nrf.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief This value can be used as a parameter for the @ref nrf_spim_pins_set
  *        function to specify that a given SPI signal (SCK, MOSI, or MISO)
@@ -515,6 +519,10 @@ __STATIC_INLINE void nrf_spim_rx_list_disable(NRF_SPIM_Type * p_spim)
 #endif
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_SPIM_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/drivers_nrf/hal/nrf_spis.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spis.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spis.h
index 1f250b5..273e048 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spis.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_spis.h
@@ -28,6 +28,10 @@
 #include "nrf.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief This value can be used as a parameter for the @ref nrf_spis_pins_set
  *        function to specify that a given SPI signal (SCK, MOSI, or MISO)
@@ -507,6 +511,10 @@ __STATIC_INLINE void nrf_spis_def_set(NRF_SPIS_Type * p_spis,
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_SPIS_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/drivers_nrf/hal/nrf_temp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_temp.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_temp.h
index d108072..2075bd6 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_temp.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_temp.h
@@ -15,6 +15,10 @@
 
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
 * @defgroup nrf_temperature TEMP (temperature) abstraction
 * @{
@@ -52,4 +56,8 @@ static __INLINE int32_t nrf_temp_read(void)
 
 /** @} */
 
+#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/drivers_nrf/hal/nrf_timer.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_timer.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_timer.h
index 2568d5f..c252506 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_timer.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_timer.h
@@ -29,6 +29,10 @@
 #include "nrf_assert.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Macro for validating the correctness of the BIT_WIDTH setting.
  */
@@ -571,6 +575,10 @@ __STATIC_INLINE uint32_t nrf_timer_ms_to_ticks(uint32_t time_ms,
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_TIMER_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/drivers_nrf/hal/nrf_twi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twi.h
index 4f38df2..b5ddaeb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twi.h
@@ -13,6 +13,10 @@
 #ifndef NRF_TWI_H__
 #define NRF_TWI_H__
  
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_twi_hal TWI HAL
  * @{
@@ -399,4 +403,8 @@ __STATIC_INLINE void nrf_twi_shorts_set(NRF_TWI_Type * p_twi,
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_TWI_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/drivers_nrf/hal/nrf_twim.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twim.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twim.h
index f54d6c6..7d4e5cc 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twim.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twim.h
@@ -13,6 +13,10 @@
 #ifndef NRF_TWIM_H__
 #define NRF_TWIM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_twim_hal TWIM HAL
  * @{
@@ -475,4 +479,8 @@ __STATIC_INLINE void nrf_twim_rx_list_disable(NRF_TWIM_Type * p_twim)
 }
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_TWIM_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/drivers_nrf/hal/nrf_twis.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twis.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twis.h
index 0e568f7..a7b7a1d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twis.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_twis.h
@@ -27,6 +27,10 @@
 #include <stddef.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief TWIS tasks
  */
@@ -672,5 +676,9 @@ uint8_t nrf_twis_orc_get(NRF_TWIS_Type const * const p_twis)
 
 #endif /* SUPPRESS_INLINE_IMPLEMENTATION */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_TWIS_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/drivers_nrf/hal/nrf_uart.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uart.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uart.h
index 87ca963..cc82f40 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uart.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uart.h
@@ -17,6 +17,10 @@
 #include <stddef.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup nrf_uart_hal UART HAL
  * @{
@@ -468,4 +472,8 @@ __STATIC_INLINE void nrf_uart_baudrate_set(NRF_UART_Type   * p_reg, nrf_uart_bau
 }
 #endif //SUPPRESS_INLINE_IMPLEMENTATION
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif //NRF_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/drivers_nrf/hal/nrf_uarte.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uarte.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uarte.h
index 26784d9..b1c560d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uarte.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_uarte.h
@@ -17,6 +17,10 @@
 #include <stddef.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NRF_UARTE_PSEL_DISCONNECTED 0xFFFFFFFF
 
 /**
@@ -531,4 +535,8 @@ __STATIC_INLINE uint32_t nrf_uarte_rx_amount_get(NRF_UARTE_Type * p_reg)
 }
 #endif //SUPPRESS_INLINE_IMPLEMENTATION
 /** @} */
+#ifdef __cplusplus
+}
+#endif
+
 #endif //NRF_UARTE_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/drivers_nrf/hal/nrf_wdt.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_wdt.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_wdt.h
index f2b067a..63bc2fb 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_wdt.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal/nrf_wdt.h
@@ -27,6 +27,10 @@
 
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NRF_WDT_CHANNEL_NUMBER 0x8UL
 #define NRF_WDT_RR_VALUE       0x6E524635UL /* Fixed value, shouldn't be modified.*/
 
@@ -294,6 +298,10 @@ __STATIC_INLINE void nrf_wdt_reload_request_set(nrf_wdt_rr_register_t rr_registe
 }
 
 
+#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/drivers_nrf/i2s/nrf_drv_i2s.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/i2s/nrf_drv_i2s.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/i2s/nrf_drv_i2s.h
index 71e0eb6..b732f64 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/i2s/nrf_drv_i2s.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/i2s/nrf_drv_i2s.h
@@ -31,6 +31,10 @@
 #include "sdk_errors.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief This value can be provided instead of a pin number for the signals
  *        SDOUT, SDIN, and MCK to specify that a given signal is not used
@@ -214,6 +218,10 @@ ret_code_t nrf_drv_i2s_start(uint32_t * p_rx_buffer,
  */
 void       nrf_drv_i2s_stop(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_I2S_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/drivers_nrf/lpcomp/nrf_drv_lpcomp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/lpcomp/nrf_drv_lpcomp.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/lpcomp/nrf_drv_lpcomp.h
index ffb78ad..eed52d5 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/lpcomp/nrf_drv_lpcomp.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/lpcomp/nrf_drv_lpcomp.h
@@ -18,6 +18,10 @@
 #include "nrf_drv_common.h"
 #include "nrf_drv_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup nrf_lpcomp LPCOMP HAL and driver
  * @ingroup nrf_drivers
@@ -104,4 +108,8 @@ void nrf_drv_lpcomp_disable(void);
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
  #endif /* NRF_DRV_LPCOMP_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/drivers_nrf/nrf_soc_nosd/nrf_error.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_error.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_error.h
index 30ab2ec..bff2053 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_error.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_error.h
@@ -11,6 +11,10 @@
 #ifndef NRF_ERROR_H__
 #define NRF_ERROR_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /// @cond Make doxygen skip this file 
 
 /** @defgroup NRF_ERRORS_BASE Error Codes Base number definitions
@@ -40,6 +44,10 @@
 #define NRF_ERROR_INVALID_ADDR                (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address
 #define NRF_ERROR_BUSY                        (NRF_ERROR_BASE_NUM + 17) ///< Busy
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_ERROR_H__
 
 /// @endcond 

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/drivers_nrf/nrf_soc_nosd/nrf_nvic.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_nvic.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_nvic.h
index 284b8db..f429d9f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_nvic.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_nvic.h
@@ -16,6 +16,10 @@
 #include <stdint.h>
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Enable External Interrupt.
  * @note Corresponds to NVIC_EnableIRQ in CMSIS.
  *
@@ -127,4 +131,8 @@ uint32_t sd_nvic_critical_region_enter(uint8_t * p_is_nested_critical_region);
  */
 uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_SOC_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/drivers_nrf/nrf_soc_nosd/nrf_soc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_soc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_soc.h
index f34f15c..b64326d 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_soc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/nrf_soc_nosd/nrf_soc.h
@@ -16,6 +16,10 @@
 #include <stdint.h>
 #include "nrf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Waits for an application event.
  *
  * An application event is either an application interrupt or a pended interrupt when the
@@ -41,4 +45,8 @@
  */
 uint32_t sd_app_evt_wait(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_SOC_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/drivers_nrf/pdm/nrf_drv_pdm.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pdm/nrf_drv_pdm.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pdm/nrf_drv_pdm.h
index f1b7e53..623785e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pdm/nrf_drv_pdm.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pdm/nrf_drv_pdm.h
@@ -34,6 +34,10 @@
 #include "sdk_errors.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NRF_PDM_MAX_BUFFER_SIZE 32768
 
 
@@ -162,6 +166,10 @@ ret_code_t nrf_drv_pdm_start(void);
 ret_code_t nrf_drv_pdm_stop(void);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_PDM_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/drivers_nrf/ppi/nrf_drv_ppi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ppi/nrf_drv_ppi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ppi/nrf_drv_ppi.h
index 1aadbf1..27cea57 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ppi/nrf_drv_ppi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/ppi/nrf_drv_ppi.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_PPI_H
 #define NRF_DRV_PPI_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 #include "sdk_errors.h"
 #include "nrf_ppi.h"
@@ -281,4 +285,8 @@ __STATIC_INLINE uint32_t nrf_drv_ppi_task_addr_group_disable_get(nrf_ppi_channel
  **/
 
 /*lint --flb "Leave library region" */
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_PPI_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/drivers_nrf/pstorage/config/pstorage_platform.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/config/pstorage_platform.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/config/pstorage_platform.h
index 184e415..5dd217a 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/config/pstorage_platform.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/config/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;
@@ -66,6 +70,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/drivers_nrf/pstorage/pstorage.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/pstorage.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/pstorage.h
index f7d2f43..ac713dd 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/pstorage.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage/pstorage.h
@@ -28,6 +28,10 @@
 #include "pstorage_platform.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@defgroup ps_opcode Persistent Storage Access Operation Codes
  * @{
  * @brief    Persistent Storage Access Operation Codes. 
@@ -377,5 +381,9 @@ uint32_t pstorage_raw_clear(pstorage_handle_t * p_dest, pstorage_size_t size);
 /**@} */
 /**@} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // PSTORAGE_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/drivers_nrf/pwm/nrf_drv_pwm.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pwm/nrf_drv_pwm.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pwm/nrf_drv_pwm.h
index 3794992..a1ffc86 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pwm/nrf_drv_pwm.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pwm/nrf_drv_pwm.h
@@ -31,6 +31,10 @@
 #include "sdk_errors.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief PWM driver instance data structure.
  */
@@ -421,6 +425,10 @@ __STATIC_INLINE uint32_t nrf_drv_pwm_event_address_get(
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_PWM_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/drivers_nrf/qdec/nrf_drv_qdec.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/qdec/nrf_drv_qdec.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/qdec/nrf_drv_qdec.h
index 84dbf5d..df20f38 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/qdec/nrf_drv_qdec.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/qdec/nrf_drv_qdec.h
@@ -19,6 +19,10 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup nrf_qdec QDEC HAL and driver
  * @ingroup nrf_drivers
@@ -146,4 +150,8 @@ void nrf_drv_qdec_event_address_get(nrf_qdec_event_t event, uint32_t * p_event);
 /**
    *@}
  **/
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_DRV_QDEC_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/drivers_nrf/radio_config/radio_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/radio_config/radio_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/radio_config/radio_config.h
index 7bb3551..9181aaf 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/radio_config/radio_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/radio_config/radio_config.h
@@ -12,10 +12,18 @@
 #ifndef RADIO_CONFIG_H
 #define RADIO_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define PACKET_BASE_ADDRESS_LENGTH  (4UL)                   //!< Packet base address length field size in bytes
 #define PACKET_STATIC_LENGTH        (1UL)                   //!< Packet static length in bytes
 #define PACKET_PAYLOAD_MAXSIZE      (PACKET_STATIC_LENGTH)  //!< Packet payload maximum size in bytes
 
 void radio_configure(void);
 
+#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/drivers_nrf/rng/nrf_drv_rng.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rng/nrf_drv_rng.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rng/nrf_drv_rng.h
index 756eb43..684ad39 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rng/nrf_drv_rng.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rng/nrf_drv_rng.h
@@ -20,6 +20,10 @@
 #include "sdk_errors.h"
 #include "nrf_drv_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup nrf_rng RNG HAL and driver
  * @ingroup nrf_drivers
@@ -112,4 +116,8 @@ ret_code_t nrf_drv_rng_block_rand(uint8_t * p_buff, uint32_t length);
 /**
  *@}
  **/
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_RNG_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/drivers_nrf/rtc/nrf_drv_rtc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rtc/nrf_drv_rtc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rtc/nrf_drv_rtc.h
index a1f31ae..72e639f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rtc/nrf_drv_rtc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/rtc/nrf_drv_rtc.h
@@ -20,6 +20,10 @@
 #include "nrf_rtc.h"
 #include "sdk_errors.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @addtogroup nrf_rtc RTC HAL and driver
  * @ingroup nrf_drivers
@@ -322,4 +326,8 @@ __STATIC_INLINE uint32_t nrf_drv_rtc_event_address_get(nrf_drv_rtc_t const * con
 /**
  *@}
  **/
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_DRV_RTC_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/drivers_nrf/saadc/nrf_drv_saadc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/saadc/nrf_drv_saadc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/saadc/nrf_drv_saadc.h
index 50780d0..35fdc01 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/saadc/nrf_drv_saadc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/saadc/nrf_drv_saadc.h
@@ -31,6 +31,10 @@
 #include "nrf_saadc.h"
 #include "sdk_errors.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Value that should be set as high limit to disable limit detection.
  */
@@ -298,6 +302,10 @@ __STATIC_INLINE nrf_saadc_input_t nrf_drv_saadc_gpio_to_ain(uint32_t pin)
     }
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_SAADC_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/drivers_nrf/sdio/config/sdio_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/config/sdio_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/config/sdio_config.h
index f8e3dc1..715280b 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/config/sdio_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/config/sdio_config.h
@@ -12,7 +12,15 @@
 #ifndef SDIO_CONFIG_H
 #define SDIO_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define SDIO_CONFIG_CLOCK_PIN_NUMBER 24
 #define SDIO_CONFIG_DATA_PIN_NUMBER 25
 
+#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/drivers_nrf/sdio/sdio.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/sdio.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/sdio.h
index 16b5358..ffbde5c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/sdio.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/sdio/sdio.h
@@ -13,6 +13,10 @@
 #ifndef SDIO_H
 #define SDIO_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 #include <stdbool.h>
@@ -66,4 +70,8 @@ void sdio_write_byte(uint8_t address, uint8_t data_byte);
  **/
 
 /*lint --flb "Leave library region" */ 
+#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/drivers_nrf/spi_master/nrf_drv_spi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/nrf_drv_spi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/nrf_drv_spi.h
index 6ae31fb..1e0c900 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/nrf_drv_spi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/nrf_drv_spi.h
@@ -30,6 +30,10 @@
 #include "nrf_spim.h"
 #include "sdk_errors.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(NRF52)
     #define NRF_DRV_SPI_PERIPHERAL(id)           \
         (CONCAT_3(SPI, id, _USE_EASY_DMA) == 1 ? \
@@ -363,6 +367,10 @@ uint32_t nrf_drv_spi_start_task_get(nrf_drv_spi_t const * p_instance);
  * @return     END event address.
  */
 uint32_t nrf_drv_spi_end_event_get(nrf_drv_spi_t const * p_instance);
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_SPI_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/drivers_nrf/spi_master/spi_5W_master.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/spi_5W_master.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/spi_5W_master.h
index e8814fb..501eeff 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/spi_5W_master.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_master/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/drivers_nrf/spi_slave/nrf_drv_spis.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_slave/nrf_drv_spis.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_slave/nrf_drv_spis.h
index 684e20d..9734466 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_slave/nrf_drv_spis.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/spi_slave/nrf_drv_spis.h
@@ -30,6 +30,10 @@
 #include "sdk_common.h"
 #include "app_util_platform.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(NRF52)
     #define SPIS2_IRQ            SPIM2_SPIS2_SPI2_IRQn
     #define SPIS2_IRQ_HANDLER    SPIM2_SPIS2_SPI2_IRQHandler
@@ -218,6 +222,10 @@ ret_code_t nrf_drv_spis_buffers_set(nrf_drv_spis_t const * const  p_instance,
                                     uint8_t * p_rx_buffer, 
                                     uint8_t   rx_buffer_length);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // SPI_SLAVE_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/drivers_nrf/swi/nrf_drv_swi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/swi/nrf_drv_swi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/swi/nrf_drv_swi.h
index 58e7791..9ce71a0 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/swi/nrf_drv_swi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/swi/nrf_drv_swi.h
@@ -30,6 +30,10 @@
 #include "nrf_drv_config.h"
 #include "sdk_errors.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef EGU_ENABLED
     #define EGU_ENABLED 0
 #endif
@@ -162,6 +166,10 @@ uint32_t nrf_drv_swi_event_triggered_address_get(nrf_swi_t swi, uint8_t channel)
 #endif // EGU_ENABLED > 0
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_SWI_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/drivers_nrf/timer/nrf_drv_timer.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/timer/nrf_drv_timer.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/timer/nrf_drv_timer.h
index 6aa10ca..f0ab9b4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/timer/nrf_drv_timer.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/timer/nrf_drv_timer.h
@@ -32,6 +32,10 @@
 #include "sdk_errors.h"
 #include "nrf_assert.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Timer driver instance data structure.
  */
@@ -367,6 +371,10 @@ __STATIC_INLINE uint32_t nrf_drv_timer_ms_to_ticks(
 
 #endif // SUPPRESS_INLINE_IMPLEMENTATION
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_TIMER_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/drivers_nrf/twi_master/deprecated/config/twi_master_config.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/config/twi_master_config.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/config/twi_master_config.h
index 912ef1a..7d2b169 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/config/twi_master_config.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/config/twi_master_config.h
@@ -12,7 +12,15 @@
 #ifndef TWI_MASTER_CONFIG
 #define TWI_MASTER_CONFIG
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER (24U)
 #define TWI_MASTER_CONFIG_DATA_PIN_NUMBER (25U)
 
+#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/drivers_nrf/twi_master/deprecated/twi_master.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/twi_master.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/twi_master.h
index e2209cd..2ac62cc 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/twi_master.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/deprecated/twi_master.h
@@ -13,6 +13,10 @@
 #ifndef TWI_MASTER_H
 #define TWI_MASTER_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*lint ++flb "Enter library region" */
 
 #include <stdbool.h>
@@ -98,4 +102,8 @@ bool twi_master_transfer(uint8_t address, uint8_t *data, uint8_t data_length, bo
  **/
 
 /*lint --flb "Leave library region" */
+#ifdef __cplusplus
+}
+#endif
+
 #endif //TWI_MASTER_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/drivers_nrf/twi_master/nrf_drv_twi.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/nrf_drv_twi.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/nrf_drv_twi.h
index e4e67ec..229006e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/nrf_drv_twi.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twi_master/nrf_drv_twi.h
@@ -31,6 +31,10 @@
 #include "nordic_common.h"
 #include "nrf_drv_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 // This set of macros makes it possible to exclude parts of code when one type
 // of supported peripherals is not used.
 #if ((TWI0_ENABLED == 1 && TWI0_USE_EASY_DMA == 1) || \
@@ -381,4 +385,8 @@ uint32_t nrf_drv_twi_stopped_event_get(nrf_drv_twi_t const * p_instance);
  *@}
  **/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_TWI_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/drivers_nrf/twis_slave/nrf_drv_twis.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twis_slave/nrf_drv_twis.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twis_slave/nrf_drv_twis.h
index 08ac9c2..c8d95f6 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twis_slave/nrf_drv_twis.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/twis_slave/nrf_drv_twis.h
@@ -18,6 +18,10 @@
 #include "nrf_twis.h"
 #include <stdint.h>
 #include "app_util.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @ingroup  nrf_twi
  * @defgroup nrf_twis TWI slave HAL and driver
@@ -395,4 +399,8 @@ bool nrf_drv_twis_is_pending_tx(nrf_drv_twis_t const * const p_inst);
 bool nrf_drv_twis_is_pending_rx(nrf_drv_twis_t const * const p_inst);
 
 /** @} */ /* End of lib_twis_drv group */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NRF_DRV_TWIS_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/drivers_nrf/uart/nrf_drv_uart.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/uart/nrf_drv_uart.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/uart/nrf_drv_uart.h
index ed49f14..0aec80f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/uart/nrf_drv_uart.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/uart/nrf_drv_uart.h
@@ -27,6 +27,10 @@
 #define NRF_DRV_UART_H
 
 #include "nrf_uart.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef NRF52
 #include "nrf_uarte.h"
 #endif
@@ -289,5 +293,9 @@ __STATIC_INLINE uint32_t nrf_drv_uart_event_address_get(nrf_uart_event_t event)
     return nrf_uart_event_address_get(NRF_UART0, event);
 }
 #endif //SUPPRESS_INLINE_IMPLEMENTATION
+#ifdef __cplusplus
+}
+#endif
+
 #endif //NRF_DRV_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/drivers_nrf/wdt/nrf_drv_wdt.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/wdt/nrf_drv_wdt.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/wdt/nrf_drv_wdt.h
index 338d5bc..7d3779c 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/wdt/nrf_drv_wdt.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/wdt/nrf_drv_wdt.h
@@ -32,6 +32,10 @@
 #include "nrf_wdt.h"
 #include "nrf_drv_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Struct for WDT initialization. */
 typedef struct
 {
@@ -119,6 +123,10 @@ __STATIC_INLINE uint32_t nrf_drv_wdt_ppi_event_addr(nrf_wdt_event_t event)
 {
     return nrf_wdt_event_address_get(event);
 }
+#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/libraries/ant_fs/antfs.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/antfs.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/antfs.h
index 4cb17fc..1b3140f 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/antfs.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/antfs.h
@@ -25,6 +25,10 @@ All rights reserved.
 #include "defines.h"
 #include "antfs_config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define ANTFS_VERSION_MAJOR               1u                                                                                             /**< Version major number. */
 #define ANTFS_VERSION_MINOR               0                                                                                              /**< Version minor number. */
 #define ANTFS_VERSION_ITERATION           0                                                                                              /**< Version iteration. */
@@ -343,6 +347,10 @@ void antfs_message_process(uint8_t * p_message);
  */
 void antfs_channel_setup(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // ANTFS_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/libraries/ant_fs/crc.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/crc.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/crc.h
index 54eb774..59642e8 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/crc.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/crc.h
@@ -21,6 +21,10 @@ All rights reserved.
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for calculating CRC-16 in blocks.
  *
  * Feed each consecutive data block into this function, along with the current value of current_crc
@@ -35,6 +39,10 @@ All rights reserved.
  */
 uint16_t crc_crc16_update(uint16_t current_crc, const volatile void * p_data, uint32_t size);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // CRC_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/libraries/ant_fs/defines.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/defines.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/defines.h
index 8420747..2ddc8c1 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/defines.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/ant_fs/defines.h
@@ -21,6 +21,10 @@ All rights reserved.
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define MAX_ULONG 0xFFFFFFFFu                 /**< The Max value for the type. */
 
 /**@brief uint16_t type presentation as an union. */
@@ -53,6 +57,10 @@ typedef union
 
 #define APP_TIMER_PRESCALER 0                 /**< Value of the RTC1 PRESCALER register. */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DEFINES_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/libraries/bootloader_dfu/ble_transport/hci_mem_pool_internal.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/ble_transport/hci_mem_pool_internal.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/ble_transport/hci_mem_pool_internal.h
index 945365e..b8ca3d4 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/ble_transport/hci_mem_pool_internal.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/ble_transport/hci_mem_pool_internal.h
@@ -22,11 +22,19 @@
 #ifndef MEM_POOL_INTERNAL_H__
 #define MEM_POOL_INTERNAL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define TX_BUF_SIZE       4u    /**< TX buffer size in bytes. */
 #define RX_BUF_SIZE       32u   /**< RX buffer size in bytes. */
 
 #define RX_BUF_QUEUE_SIZE 8u    /**< RX buffer element size. */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // MEM_POOL_INTERNAL_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/libraries/bootloader_dfu/bootloader.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader.h
index 900c98f..44ee6f0 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader.h
@@ -26,6 +26,10 @@
 #include "bootloader_types.h"
 #include <dfu_types.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for initializing the Bootloader.
  * 
  * @retval     NRF_SUCCESS If bootloader was succesfully initialized. 
@@ -92,6 +96,10 @@ uint32_t bootloader_dfu_sd_update_continue(void);
  */
 uint32_t bootloader_dfu_sd_update_finalize(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BOOTLOADER_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/libraries/bootloader_dfu/bootloader_settings.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_settings.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_settings.h
index 27e05d3..c55cf21 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_settings.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_settings.h
@@ -24,12 +24,20 @@
 #include <stdint.h>
 #include "bootloader_types.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for getting the bootloader settings.
  * 
  * @param[out] pp_bootloader_settings Bootloader settings. 
  */
 void bootloader_util_settings_get(const bootloader_settings_t ** pp_bootloader_settings);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BOOTLOADER_SETTINGS_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/libraries/bootloader_dfu/bootloader_types.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_types.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_types.h
index a6ce32d..c062c9a 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_types.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_types.h
@@ -25,6 +25,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BOOTLOADER_DFU_START 0xB1
 
 #define BOOTLOADER_SVC_APP_DATA_PTR_GET 0x02
@@ -54,6 +58,10 @@ typedef struct
     uint32_t               sd_image_start;  /**< Location in flash where SoftDevice image is stored for SoftDevice update. */
 } bootloader_settings_t;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BOOTLOADER_TYPES_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/libraries/bootloader_dfu/bootloader_util.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_util.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_util.h
index aefd764..ca92415 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_util.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/bootloader_util.h
@@ -24,6 +24,10 @@
 #include <stdint.h>
 #include "bootloader_types.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for starting the application (or bootloader) at the provided address.
  * 
  * @param[in]  start_addr             Start address.
@@ -33,6 +37,10 @@
  */
 void bootloader_util_app_start(uint32_t start_addr);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BOOTLOADER_UTIL_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/libraries/bootloader_dfu/dfu.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu.h
index 8916b7a..716dcce 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu.h
@@ -26,6 +26,10 @@
 #include <stdint.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief DFU event callback for asynchronous calls.
  *
  * @param[in] packet  Packet type for which this callback is related. START_PACKET, DATA_PACKET.
@@ -129,6 +133,10 @@ uint32_t dfu_sd_image_swap(void);
  */
 uint32_t dfu_init_pkt_complete(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_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/libraries/bootloader_dfu/dfu_app_handler.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_app_handler.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_app_handler.h
index b93bd26..d25172e 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_app_handler.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_app_handler.h
@@ -39,6 +39,10 @@
 #include "bootloader_types.h"
 #include "device_manager.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define DFU_APP_ATT_TABLE_POS     0                     /**< Position for the ATT table changed setting. */
 #define DFU_APP_ATT_TABLE_CHANGED 1                     /**< Value indicating that the ATT table might have changed. This value will be set in the application-specific context in Device Manager when entering DFU mode. */
 
@@ -81,6 +85,10 @@ void dfu_app_reset_prepare_set(dfu_app_reset_prepare_t reset_prepare_func);
  */
 void dfu_app_dm_appl_instance_set(dm_application_instance_t app_instance);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_APP_HANDLER_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/libraries/bootloader_dfu/dfu_bank_internal.h
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_bank_internal.h b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_bank_internal.h
index 4e524b4..5d759c0 100644
--- a/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_bank_internal.h
+++ b/hw/mcu/nordic/src/ext/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/dfu_bank_internal.h
@@ -27,6 +27,10 @@
 
 #include <dfu_types.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief States of the DFU state machine. */
 typedef enum
 {
@@ -82,6 +86,10 @@ typedef struct
     dfu_bank_activate_t activate;                                                   /**< Function pointer to the activate function called on finalizing the update procedure. */
 } dfu_bank_func_t;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // DFU_BANK_INTERNAL_H__
 
 /** @} */



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

Posted by ma...@apache.org.
Add #ifdef __cplusplus guards

This commit adds them to almost every header. There are a few that don't have any normal header include guards because they don't define anything.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/d69b0798
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/d69b0798
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/d69b0798

Branch: refs/heads/develop
Commit: d69b07986397dfc841ee6618301af5ba08ddc058
Parents: 6ae852c
Author: Tim Hutt <td...@gmail.com>
Authored: Sat Oct 1 15:25:27 2016 +0100
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Oct 3 13:28:15 2016 -0700

----------------------------------------------------------------------
 apps/blecent/src/blecent.h                                   | 8 ++++++++
 apps/bleprph/src/bleprph.h                                   | 8 ++++++++
 apps/bletest/src/bletest_priv.h                              | 8 ++++++++
 apps/bletiny/src/bletiny.h                                   | 8 ++++++++
 boot/boot_serial/include/boot_serial/boot_serial.h           | 8 ++++++++
 boot/boot_serial/src/boot_serial_priv.h                      | 8 ++++++++
 boot/bootutil/include/bootutil/bootutil_misc.h               | 8 ++++++++
 boot/bootutil/include/bootutil/bootutil_test.h               | 8 ++++++++
 boot/bootutil/include/bootutil/image.h                       | 8 ++++++++
 boot/bootutil/include/bootutil/loader.h                      | 8 ++++++++
 boot/bootutil/include/bootutil/sign_key.h                    | 8 ++++++++
 boot/bootutil/src/bootutil_priv.h                            | 8 ++++++++
 boot/split/include/split/split.h                             | 8 ++++++++
 boot/split/include/split/split_priv.h                        | 8 ++++++++
 crypto/mbedtls/include/mbedtls/bn_mul.h                      | 8 ++++++++
 crypto/mbedtls/include/mbedtls/check_config.h                | 8 ++++++++
 crypto/mbedtls/include/mbedtls/compat-1.3.h                  | 8 ++++++++
 crypto/mbedtls/include/mbedtls/config.h                      | 8 ++++++++
 crypto/mbedtls/include/mbedtls/config_mynewt.h               | 8 ++++++++
 crypto/mbedtls/include/mbedtls/mbedtls_test.h                | 8 ++++++++
 crypto/mbedtls/include/mbedtls/pk_internal.h                 | 8 ++++++++
 encoding/base64/include/base64/base64.h                      | 8 ++++++++
 encoding/base64/include/base64/hex.h                         | 8 ++++++++
 encoding/base64/test/src/encoding_test_priv.h                | 8 ++++++++
 encoding/json/include/json/json.h                            | 8 ++++++++
 encoding/json/test/src/test_json.h                           | 8 ++++++++
 encoding/tinycbor/include/tinycbor/cborconstants_p.h         | 8 ++++++++
 encoding/tinycbor/include/tinycbor/compilersupport_p.h       | 8 ++++++++
 encoding/tinycbor/include/tinycbor/math_support_p.h          | 8 ++++++++
 fs/fcb/include/fcb/fcb.h                                     | 8 ++++++++
 fs/fcb/src/fcb_priv.h                                        | 8 ++++++++
 fs/fs/include/fs/fs.h                                        | 8 ++++++++
 fs/fs/include/fs/fs_if.h                                     | 8 ++++++++
 fs/fs/include/fs/fsutil.h                                    | 8 ++++++++
 fs/fs/src/fs_priv.h                                          | 8 ++++++++
 fs/nffs/include/nffs/nffs.h                                  | 8 ++++++++
 fs/nffs/include/nffs/nffs_test.h                             | 8 ++++++++
 fs/nffs/src/nffs_priv.h                                      | 8 ++++++++
 fs/nffs/test/src/arch/sim/nffs_test_priv.h                   | 8 ++++++++
 hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h      | 8 ++++++++
 hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h               | 8 ++++++++
 hw/bsp/native/include/bsp/bsp_sysid.h                        | 8 ++++++++
 hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h        | 8 ++++++++
 hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h            | 8 ++++++++
 hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h               | 3 ++-
 hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h          | 8 ++++++++
 hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h                  | 8 ++++++++
 hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h                  | 8 ++++++++
 hw/cmsis-core/src/ext/core_caFunc.h                          | 8 ++++++++
 hw/cmsis-core/src/ext/core_caInstr.h                         | 8 ++++++++
 hw/cmsis-core/src/ext/core_cmFunc.h                          | 8 ++++++++
 hw/cmsis-core/src/ext/core_cmInstr.h                         | 8 ++++++++
 hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h       | 8 ++++++++
 hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h       | 8 ++++++++
 hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h | 8 ++++++++
 hw/drivers/adc/include/adc/adc.h                             | 8 ++++++++
 hw/drivers/nimble/native/include/ble/xcvr.h                  | 8 ++++++++
 hw/drivers/nimble/nrf51/include/ble/xcvr.h                   | 8 ++++++++
 hw/drivers/nimble/nrf52/include/ble/xcvr.h                   | 8 ++++++++
 hw/drivers/uart/include/uart/uart.h                          | 8 ++++++++
 .../uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h    | 8 ++++++++
 hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h         | 8 ++++++++
 hw/hal/include/hal/hal_watchdog.h                            | 8 ++++++++
 hw/mcu/native/include/mcu/mcu_sim.h                          | 8 ++++++++
 hw/mcu/native/include/mcu/native_bsp.h                       | 8 ++++++++
 hw/mcu/nordic/nrf51xxx/include/mcu/cortex_m0.h               | 8 ++++++++
 hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h               | 8 ++++++++
 .../components/device/compiler_abstraction.h                 | 8 ++++++++
 .../src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf.h  | 8 ++++++++
 .../components/device/nrf51_bitfields.h                      | 8 ++++++++
 .../components/device/nrf51_deprecated.h                     | 8 ++++++++
 .../components/device/nrf51_to_nrf52.h                       | 8 ++++++++
 .../components/device/nrf52_bitfields.h                      | 8 ++++++++
 .../components/device/nrf52_name_change.h                    | 8 ++++++++
 .../components/drivers_nrf/adc/nrf_drv_adc.h                 | 8 ++++++++
 .../components/drivers_nrf/ble_flash/ble_flash.h             | 8 ++++++++
 .../components/drivers_nrf/clock/nrf_drv_clock.h             | 8 ++++++++
 .../components/drivers_nrf/common/nrf_drv_common.h           | 8 ++++++++
 .../components/drivers_nrf/comp/nrf_drv_comp.h               | 8 ++++++++
 .../components/drivers_nrf/config/nrf_drv_config.h           | 8 ++++++++
 .../drivers_nrf/config/nrf_drv_config_validation.h           | 8 ++++++++
 .../components/drivers_nrf/delay/nrf_delay.h                 | 8 ++++++++
 .../components/drivers_nrf/gpiote/nrf_drv_gpiote.h           | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_adc.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_clock.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_comp.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_ecb.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_egu.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_gpio.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_gpiote.h                  | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_i2s.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_lpcomp.h                  | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_nvmc.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_pdm.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_ppi.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_pwm.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_qdec.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_rng.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_rtc.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_saadc.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_spi.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_spim.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_spis.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_temp.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_timer.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_twi.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_twim.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_twis.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_uart.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_uarte.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_wdt.h                     | 8 ++++++++
 .../components/drivers_nrf/i2s/nrf_drv_i2s.h                 | 8 ++++++++
 .../components/drivers_nrf/lpcomp/nrf_drv_lpcomp.h           | 8 ++++++++
 .../components/drivers_nrf/nrf_soc_nosd/nrf_error.h          | 8 ++++++++
 .../components/drivers_nrf/nrf_soc_nosd/nrf_nvic.h           | 8 ++++++++
 .../components/drivers_nrf/nrf_soc_nosd/nrf_soc.h            | 8 ++++++++
 .../components/drivers_nrf/pdm/nrf_drv_pdm.h                 | 8 ++++++++
 .../components/drivers_nrf/ppi/nrf_drv_ppi.h                 | 8 ++++++++
 .../drivers_nrf/pstorage/config/pstorage_platform.h          | 8 ++++++++
 .../components/drivers_nrf/pstorage/pstorage.h               | 8 ++++++++
 .../components/drivers_nrf/pwm/nrf_drv_pwm.h                 | 8 ++++++++
 .../components/drivers_nrf/qdec/nrf_drv_qdec.h               | 8 ++++++++
 .../components/drivers_nrf/radio_config/radio_config.h       | 8 ++++++++
 .../components/drivers_nrf/rng/nrf_drv_rng.h                 | 8 ++++++++
 .../components/drivers_nrf/rtc/nrf_drv_rtc.h                 | 8 ++++++++
 .../components/drivers_nrf/saadc/nrf_drv_saadc.h             | 8 ++++++++
 .../components/drivers_nrf/sdio/config/sdio_config.h         | 8 ++++++++
 .../components/drivers_nrf/sdio/sdio.h                       | 8 ++++++++
 .../components/drivers_nrf/spi_master/nrf_drv_spi.h          | 8 ++++++++
 .../components/drivers_nrf/spi_master/spi_5W_master.h        | 8 ++++++++
 .../components/drivers_nrf/spi_slave/nrf_drv_spis.h          | 8 ++++++++
 .../components/drivers_nrf/swi/nrf_drv_swi.h                 | 8 ++++++++
 .../components/drivers_nrf/timer/nrf_drv_timer.h             | 8 ++++++++
 .../twi_master/deprecated/config/twi_master_config.h         | 8 ++++++++
 .../drivers_nrf/twi_master/deprecated/twi_master.h           | 8 ++++++++
 .../components/drivers_nrf/twi_master/nrf_drv_twi.h          | 8 ++++++++
 .../components/drivers_nrf/twis_slave/nrf_drv_twis.h         | 8 ++++++++
 .../components/drivers_nrf/uart/nrf_drv_uart.h               | 8 ++++++++
 .../components/drivers_nrf/wdt/nrf_drv_wdt.h                 | 8 ++++++++
 .../components/libraries/ant_fs/antfs.h                      | 8 ++++++++
 .../components/libraries/ant_fs/crc.h                        | 8 ++++++++
 .../components/libraries/ant_fs/defines.h                    | 8 ++++++++
 .../bootloader_dfu/ble_transport/hci_mem_pool_internal.h     | 8 ++++++++
 .../components/libraries/bootloader_dfu/bootloader.h         | 8 ++++++++
 .../libraries/bootloader_dfu/bootloader_settings.h           | 8 ++++++++
 .../components/libraries/bootloader_dfu/bootloader_types.h   | 8 ++++++++
 .../components/libraries/bootloader_dfu/bootloader_util.h    | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu.h                | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_app_handler.h    | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_bank_internal.h  | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_ble_svc.h        | 8 ++++++++
 .../libraries/bootloader_dfu/dfu_ble_svc_internal.h          | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_init.h           | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_transport.h      | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_types.h          | 8 ++++++++
 .../libraries/bootloader_dfu/experimental/nrf_sec.h          | 8 ++++++++
 .../bootloader_dfu/hci_transport/hci_mem_pool_internal.h     | 8 ++++++++
 .../bootloader_dfu/hci_transport/hci_transport_config.h      | 8 ++++++++
 .../components/libraries/button/app_button.h                 | 8 ++++++++
 .../components/libraries/crc16/crc16.h                       | 8 ++++++++
 .../components/libraries/crc32/crc32.h                       | 8 ++++++++
 .../libraries/experimental_section_vars/section_vars.h       | 8 ++++++++
 .../components/libraries/fds/config/fds_config.h             | 8 ++++++++
 .../nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds.h   | 8 ++++++++
 .../components/libraries/fds/fds_internal_defs.h             | 8 ++++++++
 .../components/libraries/fifo/app_fifo.h                     | 8 ++++++++
 .../components/libraries/fstorage/config/fstorage_config.h   | 8 ++++++++
 .../components/libraries/fstorage/fstorage.h                 | 8 ++++++++
 .../components/libraries/fstorage/fstorage_internal_defs.h   | 8 ++++++++
 .../components/libraries/gpiote/app_gpiote.h                 | 8 ++++++++
 .../components/libraries/hardfault/hardfault.h               | 8 ++++++++
 .../components/libraries/hci/config/hci_mem_pool_internal.h  | 8 ++++++++
 .../components/libraries/hci/config/hci_transport_config.h   | 8 ++++++++
 .../components/libraries/hci/hci_mem_pool.h                  | 8 ++++++++
 .../components/libraries/hci/hci_slip.h                      | 8 ++++++++
 .../components/libraries/hci/hci_transport.h                 | 8 ++++++++
 .../components/libraries/ic_info/nrf_ic_info.h               | 8 ++++++++
 .../components/libraries/led_softblink/led_softblink.h       | 8 ++++++++
 .../components/libraries/low_power_pwm/low_power_pwm.h       | 8 ++++++++
 .../components/libraries/mailbox/app_mailbox.h               | 8 ++++++++
 .../components/libraries/mem_manager/mem_manager.h           | 8 ++++++++
 .../components/libraries/pwm/app_pwm.h                       | 8 ++++++++
 .../components/libraries/scheduler/app_scheduler.h           | 8 ++++++++
 .../components/libraries/sensorsim/sensorsim.h               | 8 ++++++++
 .../components/libraries/sha256/sha256.h                     | 8 ++++++++
 .../components/libraries/simple_timer/app_simple_timer.h     | 8 ++++++++
 .../nRF5_SDK_11.0.0_89a8197/components/libraries/slip/slip.h | 8 ++++++++
 .../components/libraries/timer/app_timer.h                   | 8 ++++++++
 .../components/libraries/timer/app_timer_appsh.h             | 8 ++++++++
 .../components/libraries/trace/app_trace.h                   | 8 ++++++++
 .../components/libraries/twi/app_twi.h                       | 8 ++++++++
 .../components/libraries/uart/app_uart.h                     | 8 ++++++++
 .../components/libraries/util/app_error.h                    | 8 ++++++++
 .../components/libraries/util/app_error_weak.h               | 8 ++++++++
 .../components/libraries/util/app_util.h                     | 8 ++++++++
 .../components/libraries/util/app_util_bds.h                 | 8 ++++++++
 .../components/libraries/util/app_util_platform.h            | 8 ++++++++
 .../components/libraries/util/common.h                       | 8 ++++++++
 .../components/libraries/util/nordic_common.h                | 8 ++++++++
 .../components/libraries/util/nrf_assert.h                   | 8 ++++++++
 .../components/libraries/util/nrf_log.h                      | 8 ++++++++
 .../components/libraries/util/sdk_common.h                   | 8 ++++++++
 .../components/libraries/util/sdk_errors.h                   | 8 ++++++++
 .../components/libraries/util/sdk_macros.h                   | 8 ++++++++
 .../components/libraries/util/sdk_mapped_flags.h             | 8 ++++++++
 .../components/libraries/util/sdk_os.h                       | 8 ++++++++
 .../components/libraries/util/sdk_resources.h                | 8 ++++++++
 .../serialization/application/codecs/common/ble_dtm_app.h    | 8 ++++++++
 .../application/codecs/common/conn_systemreset.h             | 8 ++++++++
 .../codecs/s130/serializers/app_ble_gap_sec_keys.h           | 8 ++++++++
 .../application/codecs/s130/serializers/app_ble_user_mem.h   | 8 ++++++++
 .../application/codecs/s130/serializers/ble_app.h            | 8 ++++++++
 .../application/codecs/s130/serializers/ble_evt_app.h        | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gap_app.h        | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gap_evt_app.h    | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gattc_app.h      | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gattc_evt_app.h  | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gatts_app.h      | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gatts_evt_app.h  | 8 ++++++++
 .../application/codecs/s130/serializers/ble_l2cap_app.h      | 8 ++++++++
 .../application/codecs/s130/serializers/ble_l2cap_evt_app.h  | 8 ++++++++
 .../application/codecs/s130/serializers/nrf_soc_app.h        | 8 ++++++++
 .../components/serialization/application/hal/ser_app_hal.h   | 8 ++++++++
 .../serialization/application/hal/ser_app_power_system_off.h | 8 ++++++++
 .../serialization/application/transport/ser_sd_transport.h   | 8 ++++++++
 .../application/transport/ser_softdevice_handler.h           | 8 ++++++++
 .../components/serialization/common/ble_serialization.h      | 8 ++++++++
 .../components/serialization/common/ser_config.h             | 8 ++++++++
 .../common/struct_ser/s130/ble_gattc_struct_serialization.h  | 8 ++++++++
 .../common/struct_ser/s130/ble_gatts_struct_serialization.h  | 8 ++++++++
 .../common/transport/debug/debug_hci_config_nrf6310.h        | 8 ++++++++
 .../serialization/common/transport/dtm_uart_params.h         | 8 ++++++++
 .../serialization/common/transport/ser_hal_transport.h       | 8 ++++++++
 .../common/transport/ser_phy/config/ser_config_5W_app.h      | 8 ++++++++
 .../transport/ser_phy/config/ser_phy_config_app_nrf51.h      | 8 ++++++++
 .../transport/ser_phy/config/ser_phy_config_conn_nrf51.h     | 8 ++++++++
 .../common/transport/ser_phy/config/ser_phy_debug_app.h      | 8 ++++++++
 .../common/transport/ser_phy/config/ser_phy_debug_conn.h     | 8 ++++++++
 .../serialization/common/transport/ser_phy/ser_phy.h         | 8 ++++++++
 .../serialization/common/transport/ser_phy/ser_phy_hci.h     | 8 ++++++++
 .../serialization/common/transport/ser_phy/spi_5W_master.h   | 8 ++++++++
 .../serialization/common/transport/ser_phy_debug_comm.h      | 8 ++++++++
 .../serialization/connectivity/codecs/common/ble_dtm_conn.h  | 8 ++++++++
 .../serialization/connectivity/codecs/common/conn_mw.h       | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw.h            | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble.h        | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_gap.h    | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_gattc.h  | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_gatts.h  | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_l2cap.h  | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_nrf_soc.h    | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_conn.h          | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_evt_conn.h      | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gap_conn.h      | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gap_evt_conn.h  | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gattc_conn.h    | 8 ++++++++
 .../codecs/s130/serializers/ble_gattc_evt_conn.h             | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gatts_conn.h    | 8 ++++++++
 .../codecs/s130/serializers/ble_gatts_evt_conn.h             | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_l2cap_conn.h    | 8 ++++++++
 .../codecs/s130/serializers/ble_l2cap_evt_conn.h             | 8 ++++++++
 .../codecs/s130/serializers/conn_ble_gap_sec_keys.h          | 8 ++++++++
 .../connectivity/codecs/s130/serializers/conn_ble_user_mem.h | 8 ++++++++
 .../connectivity/codecs/s130/serializers/nrf_soc_conn.h      | 8 ++++++++
 .../components/serialization/connectivity/hal/dtm_uart.h     | 8 ++++++++
 .../serialization/connectivity/pstorage_platform.h           | 8 ++++++++
 .../serialization/connectivity/ser_conn_cmd_decoder.h        | 8 ++++++++
 .../serialization/connectivity/ser_conn_dtm_cmd_decoder.h    | 8 ++++++++
 .../serialization/connectivity/ser_conn_event_encoder.h      | 8 ++++++++
 .../serialization/connectivity/ser_conn_handlers.h           | 8 ++++++++
 .../serialization/connectivity/ser_conn_pkt_decoder.h        | 8 ++++++++
 .../serialization/connectivity/ser_conn_reset_cmd_decoder.h  | 8 ++++++++
 .../components/toolchain/arm/uicr_config.h                   | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/cortex_m4.h                 | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/stm32f4_bsp.h               | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_conf.h            | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_mynewt_hal.h      | 8 ++++++++
 kernel/os/include/os/arch/cortex_m0/os/os_arch.h             | 8 ++++++++
 kernel/os/include/os/arch/cortex_m4/os/os_arch.h             | 8 ++++++++
 kernel/os/include/os/arch/sim/os/os_arch.h                   | 8 ++++++++
 kernel/os/include/os/endian.h                                | 8 ++++++++
 kernel/os/include/os/os.h                                    | 8 ++++++++
 kernel/os/include/os/os_callout.h                            | 8 ++++++++
 kernel/os/include/os/os_cfg.h                                | 8 ++++++++
 kernel/os/include/os/os_dev.h                                | 8 ++++++++
 kernel/os/include/os/os_eventq.h                             | 8 ++++++++
 kernel/os/include/os/os_heap.h                               | 8 ++++++++
 kernel/os/include/os/os_malloc.h                             | 8 ++++++++
 kernel/os/include/os/os_mbuf.h                               | 8 ++++++++
 kernel/os/include/os/os_mempool.h                            | 8 ++++++++
 kernel/os/include/os/os_mutex.h                              | 8 ++++++++
 kernel/os/include/os/os_sanity.h                             | 8 ++++++++
 kernel/os/include/os/os_sched.h                              | 8 ++++++++
 kernel/os/include/os/os_sem.h                                | 8 ++++++++
 kernel/os/include/os/os_task.h                               | 8 ++++++++
 kernel/os/include/os/os_test.h                               | 8 ++++++++
 kernel/os/include/os/os_time.h                               | 8 ++++++++
 kernel/os/include/os/queue.h                                 | 8 ++++++++
 kernel/os/src/os_priv.h                                      | 8 ++++++++
 kernel/os/test/src/os_test_priv.h                            | 8 ++++++++
 libc/baselibc/include/assert.h                               | 8 ++++++++
 libc/baselibc/include/ctype.h                                | 8 ++++++++
 libc/baselibc/include/inttypes.h                             | 8 ++++++++
 libc/baselibc/include/klibc/extern.h                         | 8 ++++++++
 libc/baselibc/include/klibc/inline.h                         | 8 ++++++++
 libc/baselibc/include/stdio.h                                | 8 ++++++++
 libc/baselibc/include/stdlib.h                               | 8 ++++++++
 libc/baselibc/include/string.h                               | 8 ++++++++
 libc/baselibc/src/baselibc_test/unittests.h                  | 8 ++++++++
 libc/baselibc/src/malloc.h                                   | 8 ++++++++
 libs/imgmgr/include/imgmgr/imgmgr.h                          | 8 ++++++++
 libs/imgmgr/src/imgmgr_priv.h                                | 8 ++++++++
 libs/iotivity/include/iotivity/oc_api.h                      | 8 ++++++++
 libs/iotivity/include/iotivity/oc_buffer.h                   | 8 ++++++++
 libs/iotivity/include/iotivity/oc_client_state.h             | 8 ++++++++
 libs/iotivity/include/iotivity/oc_constants.h                | 8 ++++++++
 libs/iotivity/include/iotivity/oc_core_res.h                 | 8 ++++++++
 libs/iotivity/include/iotivity/oc_discovery.h                | 8 ++++++++
 libs/iotivity/include/iotivity/oc_helpers.h                  | 8 ++++++++
 libs/iotivity/include/iotivity/oc_network_events.h           | 8 ++++++++
 libs/iotivity/include/iotivity/oc_rep.h                      | 8 ++++++++
 libs/iotivity/include/iotivity/oc_ri.h                       | 8 ++++++++
 libs/iotivity/include/iotivity/oc_uuid.h                     | 8 ++++++++
 libs/iotivity/src/api/oc_events.h                            | 8 ++++++++
 libs/iotivity/src/messaging/coap/coap.h                      | 8 ++++++++
 libs/iotivity/src/messaging/coap/conf.h                      | 8 ++++++++
 libs/iotivity/src/messaging/coap/constants.h                 | 8 ++++++++
 libs/iotivity/src/messaging/coap/engine.h                    | 8 ++++++++
 libs/iotivity/src/messaging/coap/observe.h                   | 8 ++++++++
 libs/iotivity/src/messaging/coap/oc_coap.h                   | 8 ++++++++
 libs/iotivity/src/messaging/coap/separate.h                  | 8 ++++++++
 libs/iotivity/src/messaging/coap/transactions.h              | 8 ++++++++
 libs/iotivity/src/port/mynewt/config.h                       | 8 ++++++++
 libs/iotivity/src/port/oc_assert.h                           | 8 ++++++++
 libs/iotivity/src/port/oc_clock.h                            | 8 ++++++++
 libs/iotivity/src/port/oc_connectivity.h                     | 8 ++++++++
 libs/iotivity/src/port/oc_log.h                              | 8 ++++++++
 libs/iotivity/src/port/oc_network_events_mutex.h             | 8 ++++++++
 libs/iotivity/src/port/oc_random.h                           | 8 ++++++++
 libs/iotivity/src/port/oc_signal_main_loop.h                 | 8 ++++++++
 libs/iotivity/src/port/oc_storage.h                          | 8 ++++++++
 libs/iotivity/src/security/oc_acl.h                          | 8 ++++++++
 libs/iotivity/src/security/oc_cred.h                         | 8 ++++++++
 libs/iotivity/src/security/oc_doxm.h                         | 8 ++++++++
 libs/iotivity/src/security/oc_dtls.h                         | 8 ++++++++
 libs/iotivity/src/security/oc_pstat.h                        | 8 ++++++++
 libs/iotivity/src/security/oc_store.h                        | 8 ++++++++
 libs/iotivity/src/security/oc_svr.h                          | 8 ++++++++
 libs/iotivity/src/util/oc_etimer.h                           | 8 ++++++++
 libs/iotivity/src/util/oc_list.h                             | 8 ++++++++
 libs/iotivity/src/util/oc_memb.h                             | 8 ++++++++
 libs/iotivity/src/util/oc_mmem.h                             | 8 ++++++++
 libs/iotivity/src/util/oc_process.h                          | 8 ++++++++
 libs/iotivity/src/util/oc_timer.h                            | 8 ++++++++
 libs/iotivity/src/util/pt/lc-addrlabels.h                    | 8 ++++++++
 libs/iotivity/src/util/pt/lc-switch.h                        | 8 ++++++++
 libs/iotivity/src/util/pt/lc.h                               | 8 ++++++++
 libs/iotivity/src/util/pt/pt-sem.h                           | 8 ++++++++
 libs/iotivity/src/util/pt/pt.h                               | 8 ++++++++
 libs/newtmgr/include/newtmgr/newtmgr.h                       | 8 ++++++++
 libs/newtmgr/nmgr_os/include/nmgr_os/nmgr_os.h               | 8 ++++++++
 libs/newtmgr/transport/ble/include/nmgrble/newtmgr_ble.h     | 8 ++++++++
 libs/newtmgr_oic/include/newtmgr/newtmgr.h                   | 8 ++++++++
 libs/util/include/util/datetime.h                            | 8 ++++++++
 libs/util/include/util/mem.h                                 | 8 ++++++++
 libs/util/include/util/util.h                                | 8 ++++++++
 net/ip/include/arch/cc.h                                     | 8 ++++++++
 net/ip/include/arch/sys_arch.h                               | 8 ++++++++
 net/ip/include/ip/init.h                                     | 8 ++++++++
 net/ip/include/ip/os_queue.h                                 | 8 ++++++++
 net/ip/include/lwipopts.h                                    | 8 ++++++++
 .../include/inet_def_service/inet_def_service.h              | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/httpd_opts.h              | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/mdns.h                    | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/mdns_opts.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/mdns_priv.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/netbiosns.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/netbiosns_opts.h          | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/snmp_opts.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/snmpv3.h                  | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/sntp_opts.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/debug.h                        | 8 ++++++++
 net/ip/lwip_base/include/lwip/dhcp6.h                        | 8 ++++++++
 net/ip/lwip_base/include/lwip/opt.h                          | 8 ++++++++
 net/ip/lwip_base/include/lwip/priv/memp_std.h                | 8 ++++++++
 net/ip/lwip_base/include/lwip/prot/ip.h                      | 8 ++++++++
 net/ip/lwip_base/include/netif/lowpan6_opts.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ccp.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/chap-new.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/chap_ms.h                 | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/eui64.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/fsm.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ipcp.h                    | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ipv6cp.h                  | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/lcp.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/magic.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/mppe.h                    | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ppp.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ppp_impl.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ppp_opts.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppcrypt.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppdebug.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppoe.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppol2tp.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppos.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/upap.h                    | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/vj.h                      | 8 ++++++++
 net/ip/lwip_base/src/apps/httpd/fsdata.h                     | 8 ++++++++
 net/ip/lwip_base/src/apps/httpd/httpd_structs.h              | 8 ++++++++
 net/ip/lwip_base/src/apps/snmp/snmpv3_priv.h                 | 8 ++++++++
 net/ip/lwip_base/test/unit/core/test_mem.h                   | 8 ++++++++
 net/ip/lwip_base/test/unit/core/test_pbuf.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/dhcp/test_dhcp.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/etharp/test_etharp.h              | 8 ++++++++
 net/ip/lwip_base/test/unit/lwip_check.h                      | 8 ++++++++
 net/ip/lwip_base/test/unit/lwipopts.h                        | 8 ++++++++
 net/ip/lwip_base/test/unit/mdns/test_mdns.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/tcp/tcp_helper.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/tcp/test_tcp.h                    | 8 ++++++++
 net/ip/lwip_base/test/unit/tcp/test_tcp_oos.h                | 8 ++++++++
 net/ip/lwip_base/test/unit/udp/test_udp.h                    | 8 ++++++++
 net/ip/mn_socket/include/mn_socket/arch/sim/native_sock.h    | 8 ++++++++
 net/ip/mn_socket/include/mn_socket/mn_socket.h               | 8 ++++++++
 net/ip/mn_socket/include/mn_socket/mn_socket_ops.h           | 8 ++++++++
 net/ip/mn_socket/src/arch/sim/native_sock_priv.h             | 8 ++++++++
 net/ip/src/ip_priv.h                                         | 8 ++++++++
 net/nimble/controller/include/controller/ble_hw.h            | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll.h            | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_adv.h        | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_conn.h       | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_ctrl.h       | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_hci.h        | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_resolv.h     | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_scan.h       | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_sched.h      | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_whitelist.h  | 8 ++++++++
 net/nimble/controller/include/controller/ble_phy.h           | 8 ++++++++
 net/nimble/controller/src/ble_ll_conn_priv.h                 | 8 ++++++++
 net/nimble/host/include/host/ble_att.h                       | 8 ++++++++
 net/nimble/host/include/host/ble_eddystone.h                 | 8 ++++++++
 net/nimble/host/include/host/ble_gap.h                       | 8 ++++++++
 net/nimble/host/include/host/ble_gatt.h                      | 8 ++++++++
 net/nimble/host/include/host/ble_hs.h                        | 8 ++++++++
 net/nimble/host/include/host/ble_hs_adv.h                    | 8 ++++++++
 net/nimble/host/include/host/ble_hs_id.h                     | 8 ++++++++
 net/nimble/host/include/host/ble_hs_log.h                    | 8 ++++++++
 net/nimble/host/include/host/ble_hs_mbuf.h                   | 8 ++++++++
 net/nimble/host/include/host/ble_hs_test.h                   | 8 ++++++++
 net/nimble/host/include/host/ble_ibeacon.h                   | 8 ++++++++
 net/nimble/host/include/host/ble_l2cap.h                     | 8 ++++++++
 net/nimble/host/include/host/ble_sm.h                        | 8 ++++++++
 net/nimble/host/include/host/ble_store.h                     | 8 ++++++++
 net/nimble/host/include/host/ble_uuid.h                      | 8 ++++++++
 .../host/profiles/lls/include/profiles/lls/ble_svc_lls.h     | 8 ++++++++
 net/nimble/host/services/bleuart/include/bleuart/bleuart.h   | 8 ++++++++
 .../host/services/gap/include/services/gap/ble_svc_gap.h     | 8 ++++++++
 .../host/services/gatt/include/services/gatt/ble_svc_gatt.h  | 8 ++++++++
 .../host/services/lls/include/services/lls/ble_svc_lls.h     | 8 ++++++++
 net/nimble/host/src/ble_att_cmd_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_att_priv.h                           | 8 ++++++++
 net/nimble/host/src/ble_gap_priv.h                           | 8 ++++++++
 net/nimble/host/src/ble_gatt_priv.h                          | 8 ++++++++
 net/nimble/host/src/ble_hs_adv_priv.h                        | 8 ++++++++
 net/nimble/host/src/ble_hs_atomic_priv.h                     | 8 ++++++++
 net/nimble/host/src/ble_hs_conn_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_hs_dbg_priv.h                        | 8 ++++++++
 net/nimble/host/src/ble_hs_endian_priv.h                     | 8 ++++++++
 net/nimble/host/src/ble_hs_hci_priv.h                        | 8 ++++++++
 net/nimble/host/src/ble_hs_id_priv.h                         | 8 ++++++++
 net/nimble/host/src/ble_hs_mbuf_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_hs_priv.h                            | 8 ++++++++
 net/nimble/host/src/ble_hs_pvcy_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_hs_startup_priv.h                    | 8 ++++++++
 net/nimble/host/src/ble_l2cap_priv.h                         | 8 ++++++++
 net/nimble/host/src/ble_l2cap_sig_priv.h                     | 8 ++++++++
 net/nimble/host/src/ble_sm_priv.h                            | 8 ++++++++
 net/nimble/host/src/ble_uuid_priv.h                          | 8 ++++++++
 net/nimble/host/store/ram/include/store/ram/ble_store_ram.h  | 8 ++++++++
 net/nimble/host/test/src/ble_hs_test_util.h                  | 8 ++++++++
 net/nimble/host/test/src/ble_hs_test_util_store.h            | 8 ++++++++
 net/nimble/host/test/src/ble_sm_test_util.h                  | 8 ++++++++
 net/nimble/include/nimble/ble.h                              | 8 ++++++++
 net/nimble/include/nimble/ble_hci_trans.h                    | 8 ++++++++
 net/nimble/include/nimble/hci_common.h                       | 8 ++++++++
 net/nimble/include/nimble/nimble_opt.h                       | 8 ++++++++
 net/nimble/include/nimble/nimble_opt_auto.h                  | 8 ++++++++
 net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h | 8 ++++++++
 .../transport/uart/include/transport/uart/ble_hci_uart.h     | 8 ++++++++
 net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt.h             | 8 ++++++++
 net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt_if.h          | 8 ++++++++
 net/wifi/wifi_mgmt/src/wifi_priv.h                           | 8 ++++++++
 sys/config/include/config/config.h                           | 8 ++++++++
 sys/config/include/config/config_fcb.h                       | 8 ++++++++
 sys/config/include/config/config_file.h                      | 8 ++++++++
 sys/config/src/config_priv.h                                 | 8 ++++++++
 sys/config/test/src/conf_test.h                              | 8 ++++++++
 sys/config/test/src/config_test.h                            | 8 ++++++++
 sys/console/full/include/console/console.h                   | 8 ++++++++
 sys/console/full/include/console/prompt.h                    | 8 ++++++++
 sys/console/stub/include/console/console.h                   | 8 ++++++++
 sys/console/stub/include/console/prompt.h                    | 8 ++++++++
 sys/id/include/id/id.h                                       | 8 ++++++++
 sys/log/include/log/ignore.h                                 | 8 ++++++++
 sys/log/include/log/log.h                                    | 8 ++++++++
 sys/reboot/include/reboot/log_reboot.h                       | 8 ++++++++
 sys/shell/include/shell/shell.h                              | 8 ++++++++
 sys/shell/include/shell/shell_prompt.h                       | 8 ++++++++
 sys/shell/src/shell_priv.h                                   | 8 ++++++++
 sys/stats/include/stats/stats.h                              | 8 ++++++++
 sys/sysinit/include/sysinit/sysinit.h                        | 8 ++++++++
 test/crash_test/include/crash_test/crash_test.h              | 8 ++++++++
 test/crash_test/src/crash_test_priv.h                        | 8 ++++++++
 test/flash_test/include/flash_test/flash_test.h              | 8 ++++++++
 test/testreport/include/testreport/testreport.h              | 8 ++++++++
 test/testreport/src/testreport_priv.h                        | 8 ++++++++
 test/testutil/include/testutil/testutil.h                    | 8 ++++++++
 test/testutil/src/testutil_priv.h                            | 8 ++++++++
 util/cbmem/include/cbmem/cbmem.h                             | 8 ++++++++
 util/cbmem/test/src/util_test_priv.h                         | 8 ++++++++
 util/crc/include/crc/crc16.h                                 | 8 ++++++++
 util/crc/include/crc/crc8.h                                  | 8 ++++++++
 521 files changed, 4162 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/blecent/src/blecent.h
----------------------------------------------------------------------
diff --git a/apps/blecent/src/blecent.h b/apps/blecent/src/blecent.h
index 4731eb9..83f1c2c 100644
--- a/apps/blecent/src/blecent.h
+++ b/apps/blecent/src/blecent.h
@@ -22,6 +22,10 @@
 
 #include "os/queue.h"
 #include "log/log.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_adv_fields;
 struct ble_gap_conn_desc;
 struct ble_hs_cfg;
@@ -114,4 +118,8 @@ int peer_delete(uint16_t conn_handle);
 int peer_add(uint16_t conn_handle);
 int peer_init(int max_peers, int max_svcs, int max_chrs, int max_dscs);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/bleprph/src/bleprph.h
----------------------------------------------------------------------
diff --git a/apps/bleprph/src/bleprph.h b/apps/bleprph/src/bleprph.h
index 8db1dc7..0d75c84 100644
--- a/apps/bleprph/src/bleprph.h
+++ b/apps/bleprph/src/bleprph.h
@@ -21,6 +21,10 @@
 #define H_BLEPRPH_
 
 #include "log/log.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_cfg;
 struct ble_gatt_register_ctxt;
 
@@ -48,4 +52,8 @@ int gatt_svr_init(void);
 void print_bytes(const uint8_t *bytes, int len);
 void print_addr(const void *addr);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/bletest/src/bletest_priv.h
----------------------------------------------------------------------
diff --git a/apps/bletest/src/bletest_priv.h b/apps/bletest/src/bletest_priv.h
index 05d03d1..268071a 100644
--- a/apps/bletest/src/bletest_priv.h
+++ b/apps/bletest/src/bletest_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_BLETEST_PRIV_
 #define H_BLETEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void bletest_send_conn_update(uint16_t handle);
 
 #if (MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION) == 1)
@@ -63,4 +67,8 @@ int bletest_hci_le_add_resolv_list(uint8_t *local_irk, uint8_t *peer_irk,
 int bletest_hci_le_enable_resolv_list(uint8_t enable);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* H_BLETEST_PRIV_*/

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/bletiny/src/bletiny.h
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/bletiny.h b/apps/bletiny/src/bletiny.h
index 5b447a7..f840c69 100644
--- a/apps/bletiny/src/bletiny.h
+++ b/apps/bletiny/src/bletiny.h
@@ -26,6 +26,10 @@
 #include "os/queue.h"
 
 #include "host/ble_gatt.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_gap_white_entry;
 struct ble_hs_adv_fields;
 struct ble_gap_upd_params;
@@ -204,4 +208,8 @@ uint16_t chr_end_handle(const struct bletiny_svc *svc,
 int chr_is_empty(const struct bletiny_svc *svc, const struct bletiny_chr *chr);
 void print_conn_desc(const struct ble_gap_conn_desc *desc);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/boot_serial/include/boot_serial/boot_serial.h
----------------------------------------------------------------------
diff --git a/boot/boot_serial/include/boot_serial/boot_serial.h b/boot/boot_serial/include/boot_serial/boot_serial.h
index 67fa415..b9f6f6f 100644
--- a/boot/boot_serial/include/boot_serial/boot_serial.h
+++ b/boot/boot_serial/include/boot_serial/boot_serial.h
@@ -20,6 +20,10 @@
 #ifndef __BOOT_SERIAL_H__
 #define __BOOT_SERIAL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Create a task for uploading image0 over serial.
  *
@@ -30,4 +34,8 @@
 int boot_serial_task_init(struct os_task *task, uint8_t prio,
   os_stack_t *stack, uint16_t stack_size, int max_input);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*  __BOOT_SERIAL_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/boot_serial/src/boot_serial_priv.h
----------------------------------------------------------------------
diff --git a/boot/boot_serial/src/boot_serial_priv.h b/boot/boot_serial/src/boot_serial_priv.h
index d1da24f..d2eddb6 100644
--- a/boot/boot_serial/src/boot_serial_priv.h
+++ b/boot/boot_serial/src/boot_serial_priv.h
@@ -20,6 +20,10 @@
 #ifndef __BOOTUTIL_SERIAL_PRIV_H__
 #define __BOOTUTIL_SERIAL_PRIV_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * From shell.h
  */
@@ -61,4 +65,8 @@ struct nmgr_hdr {
 
 void boot_serial_input(char *buf, int len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*  __BOOTUTIL_SERIAL_PRIV_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/bootutil_misc.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/bootutil_misc.h b/boot/bootutil/include/bootutil/bootutil_misc.h
index 2e3049d..784820e 100644
--- a/boot/bootutil/include/bootutil/bootutil_misc.h
+++ b/boot/bootutil/include/bootutil/bootutil_misc.h
@@ -20,9 +20,17 @@
 #ifndef __BOOTUTIL_MISC_H_
 #define __BOOTUTIL_MISC_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int boot_vect_read_test(int *slot);
 int boot_vect_read_main(int *slot);
 int boot_vect_write_test(int slot);
 int boot_vect_write_main(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*  __BOOTUTIL_MISC_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/bootutil_test.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/bootutil_test.h b/boot/bootutil/include/bootutil/bootutil_test.h
index 55c8a67..c463b1b 100644
--- a/boot/bootutil/include/bootutil/bootutil_test.h
+++ b/boot/bootutil/include/bootutil/bootutil_test.h
@@ -20,6 +20,14 @@
 #ifndef H_BOOTUTIL_TEST_
 #define H_BOOTUTIL_TEST_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int boot_test_all(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/image.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/image.h b/boot/bootutil/include/bootutil/image.h
index 0974d5b..67e56e0 100644
--- a/boot/bootutil/include/bootutil/image.h
+++ b/boot/bootutil/include/bootutil/image.h
@@ -22,6 +22,10 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define IMAGE_MAGIC                 0x96f3b83c
 #define IMAGE_MAGIC_NONE            0xffffffff
 
@@ -86,4 +90,8 @@ int bootutil_img_validate(struct image_header *hdr, uint8_t flash_id,
                         uint32_t addr, uint8_t *tmp_buf, uint32_t tmp_buf_sz,
                         uint8_t *seed, int seed_len, uint8_t *out_hash);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/loader.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/loader.h b/boot/bootutil/include/bootutil/loader.h
index 75e0d01..ec1619a 100644
--- a/boot/bootutil/include/bootutil/loader.h
+++ b/boot/bootutil/include/bootutil/loader.h
@@ -21,6 +21,10 @@
 #define H_LOADER_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct image_header;
 
 /** A request object instructing the boot loader how to proceed. */
@@ -81,4 +85,8 @@ boot_go(const struct boot_req *req, struct boot_rsp *rsp);
 int
 split_go(int loader_slot, int split_slot, void **entry);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/sign_key.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/sign_key.h b/boot/bootutil/include/bootutil/sign_key.h
index 5ccda90..7aa807a 100644
--- a/boot/bootutil/include/bootutil/sign_key.h
+++ b/boot/bootutil/include/bootutil/sign_key.h
@@ -22,6 +22,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct bootutil_key {
     const uint8_t *key;
     const unsigned int *len;
@@ -30,4 +34,8 @@ struct bootutil_key {
 extern const struct bootutil_key bootutil_keys[];
 extern const int bootutil_key_cnt;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __BOOTUTIL_SIGN_KEY_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/src/bootutil_priv.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/src/bootutil_priv.h b/boot/bootutil/src/bootutil_priv.h
index e5b231c..d24a671 100644
--- a/boot/bootutil/src/bootutil_priv.h
+++ b/boot/bootutil/src/bootutil_priv.h
@@ -22,6 +22,10 @@
 
 #include "bootutil/image.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BOOT_EFLASH     1
 #define BOOT_EFILE      2
 #define BOOT_EBADIMAGE  3
@@ -71,5 +75,9 @@ void boot_scratch_magic(struct boot_img_trailer *bit);
 struct boot_req;
 void boot_req_set(struct boot_req *req);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/split/include/split/split.h
----------------------------------------------------------------------
diff --git a/boot/split/include/split/split.h b/boot/split/include/split/split.h
index 0cf78e3..ede0f28 100644
--- a/boot/split/include/split/split.h
+++ b/boot/split/include/split/split.h
@@ -20,6 +20,10 @@
 #ifndef _SPLIT_H__
 #define _SPLIT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define SPLIT_NMGR_OP_SPLIT 0
 
 typedef enum {
@@ -54,4 +58,8 @@ void split_app_init(void);
  * @Returns zero on success, non-zero on failures */
 int split_app_go(void **entry, int toboot);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _SPLIT_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/split/include/split/split_priv.h
----------------------------------------------------------------------
diff --git a/boot/split/include/split/split_priv.h b/boot/split/include/split/split_priv.h
index 0478b75..d051587 100644
--- a/boot/split/include/split/split_priv.h
+++ b/boot/split/include/split/split_priv.h
@@ -20,11 +20,19 @@
 #ifndef SPLIT_PRIV_H
 #define SPLIT_PRIV_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int split_conf_init(void);
 int split_nmgr_register(void);
 int split_read_split(split_mode_t *split);
 int split_write_split(split_mode_t mode);
 split_status_t split_check_status(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SPLIT_PRIV_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/bn_mul.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/bn_mul.h b/crypto/mbedtls/include/mbedtls/bn_mul.h
index 5408d41..269ecb4 100644
--- a/crypto/mbedtls/include/mbedtls/bn_mul.h
+++ b/crypto/mbedtls/include/mbedtls/bn_mul.h
@@ -39,6 +39,10 @@
 
 #include "bignum.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(MBEDTLS_HAVE_ASM)
 
 #ifndef asm
@@ -873,4 +877,8 @@
 #endif /* C (generic)  */
 #endif /* C (longlong) */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* bn_mul.h */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/check_config.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/check_config.h b/crypto/mbedtls/include/mbedtls/check_config.h
index b6448ec..a2e4f4b 100644
--- a/crypto/mbedtls/include/mbedtls/check_config.h
+++ b/crypto/mbedtls/include/mbedtls/check_config.h
@@ -29,6 +29,10 @@
 #ifndef MBEDTLS_CHECK_CONFIG_H
 #define MBEDTLS_CHECK_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * We assume CHAR_BIT is 8 in many places. In practice, this is true on our
  * target platforms, so not an issue, but let's just be extra sure.
@@ -537,4 +541,8 @@
  */
 typedef int mbedtls_iso_c_forbids_empty_translation_units;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_CHECK_CONFIG_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/compat-1.3.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/compat-1.3.h b/crypto/mbedtls/include/mbedtls/compat-1.3.h
index 27abbd9..2180374 100644
--- a/crypto/mbedtls/include/mbedtls/compat-1.3.h
+++ b/crypto/mbedtls/include/mbedtls/compat-1.3.h
@@ -33,6 +33,10 @@
 #ifndef MBEDTLS_COMPAT13_H
 #define MBEDTLS_COMPAT13_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * config.h options
  */
@@ -2631,4 +2635,8 @@
 #define xtea_setup mbedtls_xtea_setup
 
 #endif /* compat-1.3.h */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_DEPRECATED_REMOVED */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/config.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/config.h b/crypto/mbedtls/include/mbedtls/config.h
index 11ca32f..f180aae 100644
--- a/crypto/mbedtls/include/mbedtls/config.h
+++ b/crypto/mbedtls/include/mbedtls/config.h
@@ -28,6 +28,10 @@
 #ifndef MBEDTLS_CONFIG_H
 #define MBEDTLS_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
 #define _CRT_SECURE_NO_DEPRECATE 1
 #endif
@@ -2520,4 +2524,8 @@
 
 #include "check_config.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_CONFIG_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/config_mynewt.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/config_mynewt.h b/crypto/mbedtls/include/mbedtls/config_mynewt.h
index a18ac6f..9de0d31 100644
--- a/crypto/mbedtls/include/mbedtls/config_mynewt.h
+++ b/crypto/mbedtls/include/mbedtls/config_mynewt.h
@@ -28,6 +28,10 @@
 #ifndef MBEDTLS_CONFIG_MYNEWT_H
 #define MBEDTLS_CONFIG_MYNEWT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #undef MBEDTLS_HAVE_TIME /* we have no time.h */
 #undef MBEDTLS_HAVE_TIME_DATE
 #define MBEDTLS_PLATFORM_PRINTF_ALT	console_print
@@ -136,4 +140,8 @@
 /* \} name SECTION: Module configuration options */
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_CONFIG_MYNEWT_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/mbedtls_test.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/mbedtls_test.h b/crypto/mbedtls/include/mbedtls/mbedtls_test.h
index 9f4b67c..7a3bc40 100644
--- a/crypto/mbedtls/include/mbedtls/mbedtls_test.h
+++ b/crypto/mbedtls/include/mbedtls/mbedtls_test.h
@@ -19,6 +19,14 @@
 #ifndef _MBEDTLS_TEST_H_
 #define _MBEDTLS_TEST_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int mbedtls_test_all();
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/pk_internal.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/pk_internal.h b/crypto/mbedtls/include/mbedtls/pk_internal.h
index 01d0f21..f04e8ec 100644
--- a/crypto/mbedtls/include/mbedtls/pk_internal.h
+++ b/crypto/mbedtls/include/mbedtls/pk_internal.h
@@ -24,6 +24,10 @@
 #ifndef MBEDTLS_PK_WRAP_H
 #define MBEDTLS_PK_WRAP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if !defined(MBEDTLS_CONFIG_FILE)
 #include "config.h"
 #else
@@ -111,4 +115,8 @@ extern const mbedtls_pk_info_t mbedtls_ecdsa_info;
 extern const mbedtls_pk_info_t mbedtls_rsa_alt_info;
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_PK_WRAP_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/base64/include/base64/base64.h
----------------------------------------------------------------------
diff --git a/encoding/base64/include/base64/base64.h b/encoding/base64/include/base64/base64.h
index 8e0c045..538e069 100644
--- a/encoding/base64/include/base64/base64.h
+++ b/encoding/base64/include/base64/base64.h
@@ -22,6 +22,10 @@
 #include <stdint.h>
 #include <string.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int base64_encode(const void *, int, char *, uint8_t);
 int base64_decode(const char *, void *buf);
 int base64_pad(char *, int);
@@ -29,4 +33,8 @@ int base64_decode_len(const char *str);
 
 #define BASE64_ENCODE_SIZE(__size) ((((__size) * 4) / 3) + 4)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __UTIL_BASE64_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/base64/include/base64/hex.h
----------------------------------------------------------------------
diff --git a/encoding/base64/include/base64/hex.h b/encoding/base64/include/base64/hex.h
index 1e9d8c8..63ebc97 100644
--- a/encoding/base64/include/base64/hex.h
+++ b/encoding/base64/include/base64/hex.h
@@ -19,7 +19,15 @@
 #ifndef _UTIL_HEX_H_
 #define _UTIL_HEX_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 char *hex_format(void *src_v, int src_len, char *dst, int dst_len);
 int hex_parse(char *src, int src_len, void *dst_v, int dst_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _UTIL_HEX_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/base64/test/src/encoding_test_priv.h
----------------------------------------------------------------------
diff --git a/encoding/base64/test/src/encoding_test_priv.h b/encoding/base64/test/src/encoding_test_priv.h
index fc2fcac..424bb28 100644
--- a/encoding/base64/test/src/encoding_test_priv.h
+++ b/encoding/base64/test/src/encoding_test_priv.h
@@ -20,6 +20,14 @@
 #ifndef __ENCODING_TEST_PRIV_
 #define __ENCODING_TEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int hex_fmt_test_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/json/include/json/json.h
----------------------------------------------------------------------
diff --git a/encoding/json/include/json/json.h b/encoding/json/include/json/json.h
index ecf098a..7c2939d 100644
--- a/encoding/json/include/json/json.h
+++ b/encoding/json/include/json/json.h
@@ -27,6 +27,10 @@
 #include <sys/types.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define JSON_VALUE_TYPE_BOOL   (0)
 #define JSON_VALUE_TYPE_UINT64 (1)
 #define JSON_VALUE_TYPE_INT64  (2)
@@ -242,4 +246,8 @@ int json_read_array(struct json_buffer *, const struct json_array_t *);
         .addr.array.count = n, \
         .addr.array.maxlen = (int)(sizeof(a)/sizeof(a[0]))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _JSON_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/json/test/src/test_json.h
----------------------------------------------------------------------
diff --git a/encoding/json/test/src/test_json.h b/encoding/json/test/src/test_json.h
index ea5efcf..b7b9742 100644
--- a/encoding/json/test/src/test_json.h
+++ b/encoding/json/test/src/test_json.h
@@ -20,8 +20,16 @@
 #ifndef TEST_JSON_H
 #define TEST_JSON_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 TEST_CASE_DECL(test_json_simple_encode);
 TEST_CASE_DECL(test_json_simple_decode);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* TEST_JSON_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/tinycbor/include/tinycbor/cborconstants_p.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/cborconstants_p.h b/encoding/tinycbor/include/tinycbor/cborconstants_p.h
index d5808c3..2dc0394 100644
--- a/encoding/tinycbor/include/tinycbor/cborconstants_p.h
+++ b/encoding/tinycbor/include/tinycbor/cborconstants_p.h
@@ -1,6 +1,10 @@
 #ifndef CBORCONSTANTS_P_H
 #define CBORCONSTANTS_P_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * CBOR Major types
  * Encoded in the high 3 bits of the descriptor byte
@@ -49,4 +53,8 @@ enum {
     BreakByte               = (unsigned)Break | (SimpleTypesType << MajorTypeShift)
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* CBORCONSTANTS_P_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/tinycbor/include/tinycbor/compilersupport_p.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/compilersupport_p.h b/encoding/tinycbor/include/tinycbor/compilersupport_p.h
index 4e0dbe3..d4227f6 100644
--- a/encoding/tinycbor/include/tinycbor/compilersupport_p.h
+++ b/encoding/tinycbor/include/tinycbor/compilersupport_p.h
@@ -27,6 +27,10 @@
 
 #include "cbor.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef _BSD_SOURCE
 #  define _BSD_SOURCE
 #endif
@@ -214,5 +218,9 @@ static inline unsigned short encode_half(double val)
 #endif
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* COMPILERSUPPORT_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/tinycbor/include/tinycbor/math_support_p.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/math_support_p.h b/encoding/tinycbor/include/tinycbor/math_support_p.h
index 676f781..f09a07e 100644
--- a/encoding/tinycbor/include/tinycbor/math_support_p.h
+++ b/encoding/tinycbor/include/tinycbor/math_support_p.h
@@ -27,6 +27,10 @@
 
 #include <math.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* this function was copied & adapted from RFC 7049 Appendix D */
 static inline double decode_half(unsigned short half)
 {
@@ -43,5 +47,9 @@ static inline double decode_half(unsigned short half)
 #endif
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // MATH_SUPPORT_H
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fcb/include/fcb/fcb.h
----------------------------------------------------------------------
diff --git a/fs/fcb/include/fcb/fcb.h b/fs/fcb/include/fcb/fcb.h
index a6b3f88..2632f4a 100644
--- a/fs/fcb/include/fcb/fcb.h
+++ b/fs/fcb/include/fcb/fcb.h
@@ -19,6 +19,10 @@
 #ifndef __SYS_FCB_H_
 #define __SYS_FCB_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Flash circular buffer.
  */
@@ -131,4 +135,8 @@ fcb_offset_last_n(struct fcb *fcb, uint8_t entries, uint32_t *last_n_off);
  */
 int fcb_clear(struct fcb *fcb);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SYS_FLASHVAR_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fcb/src/fcb_priv.h
----------------------------------------------------------------------
diff --git a/fs/fcb/src/fcb_priv.h b/fs/fcb/src/fcb_priv.h
index b7a9e0b..6506e12 100644
--- a/fs/fcb/src/fcb_priv.h
+++ b/fs/fcb/src/fcb_priv.h
@@ -19,6 +19,10 @@
 #ifndef __SYS_FCB_PRIV_H_
 #define __SYS_FCB_PRIV_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define FCB_CRC_SZ	sizeof(uint8_t)
 #define FCB_TMP_BUF_SZ	32
 
@@ -54,4 +58,8 @@ int fcb_sector_hdr_init(struct fcb *, struct flash_area *fap, uint16_t id);
 int fcb_sector_hdr_read(struct fcb *, struct flash_area *fap,
   struct fcb_disk_area *fdap);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/include/fs/fs.h
----------------------------------------------------------------------
diff --git a/fs/fs/include/fs/fs.h b/fs/fs/include/fs/fs.h
index e29f7f3..c57735f 100644
--- a/fs/fs/include/fs/fs.h
+++ b/fs/fs/include/fs/fs.h
@@ -23,6 +23,10 @@
 #include <stddef.h>
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Common interface to access files.
  */
@@ -75,4 +79,8 @@ int fs_dirent_is_dir(const struct fs_dirent *);
 #define FS_EACCESS      12  /* Operation prohibited by file open mode */
 #define FS_EUNINIT      13  /* File system not initialized */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/include/fs/fs_if.h
----------------------------------------------------------------------
diff --git a/fs/fs/include/fs/fs_if.h b/fs/fs/include/fs/fs_if.h
index a2d4af4..c82b78e 100644
--- a/fs/fs/include/fs/fs_if.h
+++ b/fs/fs/include/fs/fs_if.h
@@ -20,6 +20,10 @@
 #ifndef __FS_IF_H__
 #define __FS_IF_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Common interface filesystem(s) provide.
  */
@@ -55,4 +59,8 @@ struct fs_ops {
  */
 int fs_register(const struct fs_ops *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/include/fs/fsutil.h
----------------------------------------------------------------------
diff --git a/fs/fs/include/fs/fsutil.h b/fs/fs/include/fs/fsutil.h
index 44c8b1e..f00e3c6 100644
--- a/fs/fs/include/fs/fsutil.h
+++ b/fs/fs/include/fs/fsutil.h
@@ -22,8 +22,16 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int fsutil_read_file(const char *path, uint32_t offset, uint32_t len,
                      void *dst, uint32_t *out_len);
 int fsutil_write_file(const char *path, const void *data, uint32_t len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/src/fs_priv.h
----------------------------------------------------------------------
diff --git a/fs/fs/src/fs_priv.h b/fs/fs/src/fs_priv.h
index f8f092d..dfef7d1 100644
--- a/fs/fs/src/fs_priv.h
+++ b/fs/fs/src/fs_priv.h
@@ -21,6 +21,10 @@
 
 #include "syscfg/syscfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct fs_ops;
 extern const struct fs_ops *fs_root_ops;
 
@@ -28,4 +32,8 @@ extern const struct fs_ops *fs_root_ops;
 void fs_cli_init(void);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/include/nffs/nffs.h
----------------------------------------------------------------------
diff --git a/fs/nffs/include/nffs/nffs.h b/fs/nffs/include/nffs/nffs.h
index 4a608cb..4099e14 100644
--- a/fs/nffs/include/nffs/nffs.h
+++ b/fs/nffs/include/nffs/nffs.h
@@ -24,6 +24,10 @@
 #include <inttypes.h>
 #include "fs/fs.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NFFS_FILENAME_MAX_LEN   256  /* Does not require null terminator. */
 #define NFFS_MAX_AREAS          256
 
@@ -61,4 +65,8 @@ int nffs_format(const struct nffs_area_desc *area_descs);
 
 int nffs_misc_desc_from_flash_area(int idx, int *cnt, struct nffs_area_desc *nad);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/include/nffs/nffs_test.h
----------------------------------------------------------------------
diff --git a/fs/nffs/include/nffs/nffs_test.h b/fs/nffs/include/nffs/nffs_test.h
index cee58bb..3cc0747 100644
--- a/fs/nffs/include/nffs/nffs_test.h
+++ b/fs/nffs/include/nffs/nffs_test.h
@@ -20,6 +20,14 @@
 #ifndef H_NFFS_TEST_
 #define H_NFFS_TEST_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int nffs_test_all(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/src/nffs_priv.h
----------------------------------------------------------------------
diff --git a/fs/nffs/src/nffs_priv.h b/fs/nffs/src/nffs_priv.h
index 27c284b..360194d 100644
--- a/fs/nffs/src/nffs_priv.h
+++ b/fs/nffs/src/nffs_priv.h
@@ -29,6 +29,10 @@
 #include "crc/crc16.h"
 #include "stats/stats.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NFFS_HASH_SIZE               256
 
 #define NFFS_ID_DIR_MIN              0
@@ -516,4 +520,8 @@ int nffs_write_to_file(struct nffs_file *file, const void *data, int len);
     LOG_ ## lvl(&nffs_log, LOG_MODULE_NFFS, __VA_ARGS__)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/test/src/arch/sim/nffs_test_priv.h
----------------------------------------------------------------------
diff --git a/fs/nffs/test/src/arch/sim/nffs_test_priv.h b/fs/nffs/test/src/arch/sim/nffs_test_priv.h
index a3508c1..e0b7ff0 100644
--- a/fs/nffs/test/src/arch/sim/nffs_test_priv.h
+++ b/fs/nffs/test/src/arch/sim/nffs_test_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_NFFS_TEST_PRIV_
 #define H_NFFS_TEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct nffs_test_block_desc {
     const char *data;
     int data_len;
@@ -38,5 +42,9 @@ int nffs_test(void);
 extern const struct nffs_test_file_desc *nffs_test_system_01;
 extern const struct nffs_test_file_desc *nffs_test_system_01_rm_1014_mk10;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h b/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
index d90fc99..643d968 100644
--- a/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -461,4 +465,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h b/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
index 653a4de..5341c32 100644
--- a/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -460,4 +464,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/native/include/bsp/bsp_sysid.h
----------------------------------------------------------------------
diff --git a/hw/bsp/native/include/bsp/bsp_sysid.h b/hw/bsp/native/include/bsp/bsp_sysid.h
index b9094c2..c102f09 100644
--- a/hw/bsp/native/include/bsp/bsp_sysid.h
+++ b/hw/bsp/native/include/bsp/bsp_sysid.h
@@ -19,6 +19,10 @@
 #ifndef __NATIVE_BSP_SYSID_H
 #define __NATIVE_BSP_SYSID_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* This file defines the system device descriptors for this BSP.
  * System device descriptors are any HAL devies */
 
@@ -45,4 +49,8 @@ enum system_device_id {
     /* TODO -- add other hals here */    
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* __NATIVE_BSP_SYSID_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h b/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
index f97fb5c..d111ac3 100644
--- a/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -463,4 +467,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h b/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
index feac50b..187bbb1 100644
--- a/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -461,4 +465,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h b/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
index 7b0a24b..63959e5 100644
--- a/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
+++ b/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
@@ -33,4 +33,5 @@ enum system_device_id
 }
 #endif
 
-#endif /* BSP_SYSID_H */
\ No newline at end of file
+#endif /* BSP_SYSID_H */
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h b/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
index f97fb5c..d111ac3 100644
--- a/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -463,4 +467,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h b/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
index feac50b..187bbb1 100644
--- a/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -461,4 +465,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h b/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
index 653a4de..5341c32 100644
--- a/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -460,4 +464,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_caFunc.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_caFunc.h b/hw/cmsis-core/src/ext/core_caFunc.h
index 3f40094..255c683 100644
--- a/hw/cmsis-core/src/ext/core_caFunc.h
+++ b/hw/cmsis-core/src/ext/core_caFunc.h
@@ -39,6 +39,10 @@
 #define __CORE_CAFUNC_H__
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* ###########################  Core Function Access  ########################### */
 /** \ingroup  CMSIS_Core_FunctionInterface
     \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
@@ -1158,4 +1162,8 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_clean_inv_dcache_al
 /*@} end of CMSIS_Core_RegAccFunctions */
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CORE_CAFUNC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_caInstr.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_caInstr.h b/hw/cmsis-core/src/ext/core_caInstr.h
index b1d3435..41c4938 100644
--- a/hw/cmsis-core/src/ext/core_caInstr.h
+++ b/hw/cmsis-core/src/ext/core_caInstr.h
@@ -37,9 +37,17 @@
 #ifndef __CORE_CAINSTR_H__
 #define __CORE_CAINSTR_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define __CORTEX_M 0x3
 #include "core_cmInstr.h"
 #undef  __CORTEX_M
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_cmFunc.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_cmFunc.h b/hw/cmsis-core/src/ext/core_cmFunc.h
index 0a18faf..a2c5ad9 100644
--- a/hw/cmsis-core/src/ext/core_cmFunc.h
+++ b/hw/cmsis-core/src/ext/core_cmFunc.h
@@ -39,6 +39,10 @@
 #define __CORE_CMFUNC_H
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* ###########################  Core Function Access  ########################### */
 /** \ingroup  CMSIS_Core_FunctionInterface
     \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
@@ -633,4 +637,8 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint32_t fps
 /*@} end of CMSIS_Core_RegAccFunctions */
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CORE_CMFUNC_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_cmInstr.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_cmInstr.h b/hw/cmsis-core/src/ext/core_cmInstr.h
index d213f0e..544f97d 100644
--- a/hw/cmsis-core/src/ext/core_cmInstr.h
+++ b/hw/cmsis-core/src/ext/core_cmInstr.h
@@ -39,6 +39,10 @@
 #define __CORE_CMINSTR_H
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* ##########################  Core Instruction Access  ######################### */
 /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
   Access to dedicated instructions
@@ -685,4 +689,8 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t __CLZ(uint32_t value)
 
 /*@}*/ /* end of group CMSIS_Core_InstructionInterface */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CORE_CMINSTR_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h b/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
index 0006b89..e70ac88 100644
--- a/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
+++ b/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
@@ -25,6 +25,14 @@
 #include <nrf.h>
 #include <nrf_adc.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int nrf51_adc_dev_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_NRF51_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h b/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
index f356f89..5325d96 100644
--- a/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
+++ b/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
@@ -25,6 +25,14 @@
 #include <nrf.h>
 #include <nrf_saadc.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int nrf52_adc_dev_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h b/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
index 31f0bb4..51596a7 100644
--- a/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
+++ b/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
@@ -22,6 +22,10 @@
 
 #include <adc/adc.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Mynewt HAL Port pin mapping */
 #define ADC123_CH0_PIN    0
 #define ADC123_CH1_PIN    1
@@ -59,4 +63,8 @@ struct stm32f4_adc_dev_cfg {
 
 int stm32f4_adc_dev_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/include/adc/adc.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/include/adc/adc.h b/hw/drivers/adc/include/adc/adc.h
index 2ffb6cd..ad1ab7d 100644
--- a/hw/drivers/adc/include/adc/adc.h
+++ b/hw/drivers/adc/include/adc/adc.h
@@ -22,6 +22,10 @@
 
 #include <os/os_dev.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct adc_dev;
 
 /**
@@ -274,4 +278,8 @@ adc_result_mv(struct adc_dev *dev, uint8_t cnum, int val)
     return (ret);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/nimble/native/include/ble/xcvr.h
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/native/include/ble/xcvr.h b/hw/drivers/nimble/native/include/ble/xcvr.h
index 54b580c..c765a6a 100644
--- a/hw/drivers/nimble/native/include/ble/xcvr.h
+++ b/hw/drivers/nimble/native/include/ble/xcvr.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_XCVR_
 #define H_BLE_XCVR_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Transceiver specific defintions */
 #define XCVR_RX_START_DELAY_USECS     (140)
 #define XCVR_TX_START_DELAY_USECS     (140)
@@ -35,4 +39,8 @@
  */
 #define BLE_HW_WHITE_LIST_SIZE        (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_XCVR_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/nimble/nrf51/include/ble/xcvr.h
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/nrf51/include/ble/xcvr.h b/hw/drivers/nimble/nrf51/include/ble/xcvr.h
index 7041d8d..c4425d2 100644
--- a/hw/drivers/nimble/nrf51/include/ble/xcvr.h
+++ b/hw/drivers/nimble/nrf51/include/ble/xcvr.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_XCVR_
 #define H_BLE_XCVR_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Transceiver specific defintions */
 #define XCVR_RX_START_DELAY_USECS     (140)
 #define XCVR_TX_START_DELAY_USECS     (140)
@@ -35,4 +39,8 @@
  */
 #define BLE_HW_WHITE_LIST_SIZE        (8)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_XCVR_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/nimble/nrf52/include/ble/xcvr.h
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/nrf52/include/ble/xcvr.h b/hw/drivers/nimble/nrf52/include/ble/xcvr.h
index a05a0c7..a3e31c0 100644
--- a/hw/drivers/nimble/nrf52/include/ble/xcvr.h
+++ b/hw/drivers/nimble/nrf52/include/ble/xcvr.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_XCVR_
 #define H_BLE_XCVR_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Transceiver specific definitions */
 #define XCVR_RX_START_DELAY_USECS     (140)
 #define XCVR_TX_START_DELAY_USECS     (140)
@@ -35,4 +39,8 @@
  */
 #define BLE_HW_WHITE_LIST_SIZE        (8)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_XCVR_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/uart/include/uart/uart.h
----------------------------------------------------------------------
diff --git a/hw/drivers/uart/include/uart/uart.h b/hw/drivers/uart/include/uart/uart.h
index e889722..442518d 100644
--- a/hw/drivers/uart/include/uart/uart.h
+++ b/hw/drivers/uart/include/uart/uart.h
@@ -23,6 +23,10 @@
 #include <inttypes.h>
 #include <os/os_dev.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct uart_dev;
 
 /*
@@ -136,4 +140,8 @@ uart_blocking_tx(struct uart_dev *dev, uint8_t byte)
     dev->ud_funcs.uf_blocking_tx(dev, byte);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __DRIVERS_UART_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
----------------------------------------------------------------------
diff --git a/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h b/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
index 23e2f80..3f6f2dd 100644
--- a/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
+++ b/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
@@ -20,6 +20,10 @@
 #ifndef __UART_BITBANG_H__
 #define __UART_BITBANG_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct uart_bitbang_conf {
     int ubc_rxpin;
     int ubc_txpin;
@@ -29,4 +33,8 @@ struct uart_bitbang_conf {
 struct os_dev;
 int uart_bitbang_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __UART_BITBANG_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
----------------------------------------------------------------------
diff --git a/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h b/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
index 702e91d..f430d91 100644
--- a/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
+++ b/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
@@ -20,7 +20,15 @@
 #ifndef __DRIVERS_UART_HAL_H_
 #define __DRIVERS_UART_HAL_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_dev;
 int uart_hal_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __DRIVERS_UART_HAL_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/hal/include/hal/hal_watchdog.h
----------------------------------------------------------------------
diff --git a/hw/hal/include/hal/hal_watchdog.h b/hw/hal/include/hal/hal_watchdog.h
index d84d932..141e99b 100644
--- a/hw/hal/include/hal/hal_watchdog.h
+++ b/hw/hal/include/hal/hal_watchdog.h
@@ -21,6 +21,10 @@
 #define _HAL_WATCHDOG_H_
 
 #include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Set a recurring watchdog timer to fire no sooner than in 'expire_secs'
  * seconds. Watchdog should be tickled periodically with a frequency
@@ -44,4 +48,8 @@ void hal_watchdog_enable(void);
  */
 void hal_watchdog_tickle(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _HAL_WATCHDOG_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/native/include/mcu/mcu_sim.h
----------------------------------------------------------------------
diff --git a/hw/mcu/native/include/mcu/mcu_sim.h b/hw/mcu/native/include/mcu/mcu_sim.h
index 105ba9d..1b143ae 100644
--- a/hw/mcu/native/include/mcu/mcu_sim.h
+++ b/hw/mcu/native/include/mcu/mcu_sim.h
@@ -19,6 +19,10 @@
 #ifndef __MCU_SIM_H__
 #define __MCU_SIM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define OS_TICKS_PER_SEC    (100)
 
 extern char *native_flash_file;
@@ -26,4 +30,8 @@ extern char *native_uart_log_file;
 
 void mcu_sim_parse_args(int argc, char **argv);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MCU_SIM_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/native/include/mcu/native_bsp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/native/include/mcu/native_bsp.h b/hw/mcu/native/include/mcu/native_bsp.h
index 9a4850f..0ed35da 100644
--- a/hw/mcu/native/include/mcu/native_bsp.h
+++ b/hw/mcu/native/include/mcu/native_bsp.h
@@ -19,6 +19,14 @@
 #ifndef H_NATIVE_BSP_
 #define H_NATIVE_BSP_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern const struct hal_flash native_flash_dev;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_NATIVE_BSP_ */



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

Posted by ma...@apache.org.
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 */



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

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_core_res.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_core_res.h b/libs/iotivity/include/iotivity/oc_core_res.h
index 69e5879..baf9fe8 100644
--- a/libs/iotivity/include/iotivity/oc_core_res.h
+++ b/libs/iotivity/include/iotivity/oc_core_res.h
@@ -19,6 +19,10 @@
 
 #include "oc_ri.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void (*oc_core_init_platform_cb_t)(void *data);
 typedef void (*oc_core_add_device_cb_t)(void *data);
 
@@ -49,4 +53,8 @@ void oc_core_populate_resource(
   oc_request_handler_t get, oc_request_handler_t put, oc_request_handler_t post,
   oc_request_handler_t delete, int device);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_CORE_RES_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_discovery.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_discovery.h b/libs/iotivity/include/iotivity/oc_discovery.h
index 6fd3f29..5b59a06 100644
--- a/libs/iotivity/include/iotivity/oc_discovery.h
+++ b/libs/iotivity/include/iotivity/oc_discovery.h
@@ -17,6 +17,14 @@
 #ifndef OC_DISCOVERY_H
 #define OC_DISCOVERY_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void oc_create_discovery_resource(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_DISCOVERY_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_helpers.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_helpers.h b/libs/iotivity/include/iotivity/oc_helpers.h
index 0f730bb..7520c7b 100644
--- a/libs/iotivity/include/iotivity/oc_helpers.h
+++ b/libs/iotivity/include/iotivity/oc_helpers.h
@@ -24,6 +24,10 @@
 #include <stdio.h>
 #include <string.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct oc_mmem oc_handle_t, oc_string_t, oc_array_t, oc_string_array_t;
 
 #define oc_cast(block, type) ((type *)(OC_MMEM_PTR(&(block))))
@@ -75,4 +79,8 @@ void oc_join_string_array(oc_string_array_t *ocstringarray,
 #define oc_string_array_get_allocated_size(ocstringarray)                      \
   ((ocstringarray).size / STRING_ARRAY_ITEM_MAX_LEN)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_HELPERS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_network_events.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_network_events.h b/libs/iotivity/include/iotivity/oc_network_events.h
index f8b98ca..d0f5d41 100644
--- a/libs/iotivity/include/iotivity/oc_network_events.h
+++ b/libs/iotivity/include/iotivity/oc_network_events.h
@@ -20,10 +20,18 @@
 #include "../../src/port/oc_network_events_mutex.h"
 #include "../../src/util/oc_process.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 OC_PROCESS_NAME(oc_network_events);
 
 typedef struct oc_message_s oc_message_t;
 
 void oc_network_event(oc_message_t *message);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_NETWORK_EVENTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_rep.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_rep.h b/libs/iotivity/include/iotivity/oc_rep.h
index 713abb5..f0f80a6 100644
--- a/libs/iotivity/include/iotivity/oc_rep.h
+++ b/libs/iotivity/include/iotivity/oc_rep.h
@@ -24,6 +24,10 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern CborEncoder g_encoder, root_map, links_array;
 extern CborError g_err;
 
@@ -225,4 +229,8 @@ uint16_t oc_parse_rep(const uint8_t *payload, uint16_t payload_size,
 
 void oc_free_rep(oc_rep_t *rep);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_REP_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_ri.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_ri.h b/libs/iotivity/include/iotivity/oc_ri.h
index b836f70..a5bce1d 100644
--- a/libs/iotivity/include/iotivity/oc_ri.h
+++ b/libs/iotivity/include/iotivity/oc_ri.h
@@ -23,6 +23,10 @@
 #include "../../src/port/oc_connectivity.h"
 #include "../../src/util/oc_etimer.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum { OC_GET = 1, OC_POST, OC_PUT, OC_DELETE } oc_method_t;
 
 typedef enum {
@@ -173,4 +177,8 @@ int oc_ri_get_query_value(const char *query, int query_len, const char *key,
 
 oc_interface_mask_t oc_ri_get_interface_mask(char *iface, int if_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_RI_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/include/iotivity/oc_uuid.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/include/iotivity/oc_uuid.h b/libs/iotivity/include/iotivity/oc_uuid.h
index b1e5b26..03a8740 100644
--- a/libs/iotivity/include/iotivity/oc_uuid.h
+++ b/libs/iotivity/include/iotivity/oc_uuid.h
@@ -19,6 +19,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct
 {
   uint8_t id[16];
@@ -28,4 +32,8 @@ void oc_str_to_uuid(const char *str, oc_uuid_t *uuid);
 void oc_uuid_to_str(const oc_uuid_t *uuid, char *buffer, int buflen);
 void oc_gen_uuid(oc_uuid_t *uuid);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_UUID_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/api/oc_events.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/api/oc_events.h b/libs/iotivity/src/api/oc_events.h
index d79c22b..19de52c 100644
--- a/libs/iotivity/src/api/oc_events.h
+++ b/libs/iotivity/src/api/oc_events.h
@@ -19,6 +19,10 @@
 
 #include "util/oc_process.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum {
   INBOUND_NETWORK_EVENT,
   UDP_TO_DTLS_EVENT,
@@ -31,4 +35,8 @@ typedef enum {
 
 oc_process_event_t oc_events[__NUM_OC_EVENT_TYPES__];
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_EVENTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/coap.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/coap.h b/libs/iotivity/src/messaging/coap/coap.h
index 2d946fa..c8f5083 100644
--- a/libs/iotivity/src/messaging/coap/coap.h
+++ b/libs/iotivity/src/messaging/coap/coap.h
@@ -39,6 +39,10 @@
 #include <stddef.h> /* for size_t */
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* OIC stack headers */
 #include "../src/port/mynewt/config.h"
 #include "../../../include/iotivity/oc_buffer.h"
@@ -294,4 +298,8 @@ int coap_set_header_size1(void *packet, uint32_t size);
 int coap_get_payload(void *packet, const uint8_t **payload);
 int coap_set_payload(void *packet, const void *payload, size_t length);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* COAP_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/conf.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/conf.h b/libs/iotivity/src/messaging/coap/conf.h
index ebac670..39575b2 100644
--- a/libs/iotivity/src/messaging/coap/conf.h
+++ b/libs/iotivity/src/messaging/coap/conf.h
@@ -36,6 +36,10 @@
 
 #include "../../port/mynewt/config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Features that can be disabled to achieve smaller memory footprint */
 #define COAP_LINK_FORMAT_FILTERING 0
 #define COAP_PROXY_OPTION_PROCESSING 0
@@ -68,4 +72,8 @@
  * check client. */
 #define COAP_OBSERVE_REFRESH_INTERVAL 20
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* CONF_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/constants.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/constants.h b/libs/iotivity/src/messaging/coap/constants.h
index 9e9f3b3..6cb37bc 100644
--- a/libs/iotivity/src/messaging/coap/constants.h
+++ b/libs/iotivity/src/messaging/coap/constants.h
@@ -34,6 +34,10 @@
 #ifndef CONSTANTS_H
 #define CONSTANTS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define COAP_DEFAULT_PORT 5683
 
 #define COAP_DEFAULT_MAX_AGE 60
@@ -155,4 +159,8 @@ typedef enum {
   APPLICATION_CBOR = 60
 } coap_content_format_t;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* CONSTANTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/engine.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/engine.h b/libs/iotivity/src/messaging/coap/engine.h
index 73b6114..781f4f2 100644
--- a/libs/iotivity/src/messaging/coap/engine.h
+++ b/libs/iotivity/src/messaging/coap/engine.h
@@ -39,10 +39,18 @@
 #include "separate.h"
 #include "transactions.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 OC_PROCESS_NAME(coap_engine);
 
 void coap_init_engine(void);
 /*---------------------------------------------------------------------------*/
 int coap_receive(oc_message_t *message);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* ENGINE_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/observe.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/observe.h b/libs/iotivity/src/messaging/coap/observe.h
index 6d73c27..31f6d59 100644
--- a/libs/iotivity/src/messaging/coap/observe.h
+++ b/libs/iotivity/src/messaging/coap/observe.h
@@ -38,6 +38,10 @@
 #include "transactions.h"
 #include "../../util/oc_list.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* OIC stack headers */
 #include "../../../include/iotivity/oc_ri.h"
 
@@ -77,4 +81,8 @@ int coap_notify_observers(oc_resource_t *resource,
 int coap_observe_handler(void *request, void *response, oc_resource_t *resource,
                          oc_endpoint_t *endpoint);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OBSERVE_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/oc_coap.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/oc_coap.h b/libs/iotivity/src/messaging/coap/oc_coap.h
index ccd14c8..a94b926 100644
--- a/libs/iotivity/src/messaging/coap/oc_coap.h
+++ b/libs/iotivity/src/messaging/coap/oc_coap.h
@@ -20,6 +20,10 @@
 #include "separate.h"
 #include "../../util/oc_list.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct oc_separate_response_s
 {
   OC_LIST_STRUCT(requests);
@@ -36,4 +40,8 @@ typedef struct oc_response_buffer_s
   int code;
 } oc_response_buffer_t;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_COAP_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/separate.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/separate.h b/libs/iotivity/src/messaging/coap/separate.h
index c91a6ea..9517ff3 100644
--- a/libs/iotivity/src/messaging/coap/separate.h
+++ b/libs/iotivity/src/messaging/coap/separate.h
@@ -37,6 +37,10 @@
 #include "coap.h"
 #include "transactions.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* OIC stack headers */
 #include "oc_coap.h"
 #include "../../../include/iotivity/oc_ri.h"
@@ -68,4 +72,8 @@ void coap_separate_resume(void *response, coap_separate_t *separate_store,
 void coap_separate_clear(oc_separate_response_t *separate_response,
                          coap_separate_t *separate_store);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SEPARATE_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/messaging/coap/transactions.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/messaging/coap/transactions.h b/libs/iotivity/src/messaging/coap/transactions.h
index 8807363..1bb6c33 100644
--- a/libs/iotivity/src/messaging/coap/transactions.h
+++ b/libs/iotivity/src/messaging/coap/transactions.h
@@ -37,6 +37,10 @@
 #include "coap.h"
 #include "../../util/oc_etimer.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Modulo mask (thus +1) for a random number to get the tick number for the
  * random
@@ -72,4 +76,8 @@ coap_transaction_t *coap_get_transaction_by_mid(uint16_t mid);
 
 void coap_check_transactions(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* TRANSACTIONS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/mynewt/config.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/mynewt/config.h b/libs/iotivity/src/port/mynewt/config.h
index 5f8ba53..1e057b3 100644
--- a/libs/iotivity/src/port/mynewt/config.h
+++ b/libs/iotivity/src/port/mynewt/config.h
@@ -2,6 +2,10 @@
 #define CONFIG_H
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Time resolution */
 #include <stdint.h>
 #include <os/os.h>
@@ -70,4 +74,8 @@ typedef os_time_t oc_clock_time_t;
 /* Max inactivity timeout before tearing down DTLS connection */
 //#define DTLS_INACTIVITY_TIMEOUT (10)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* CONFIG_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_assert.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_assert.h b/libs/iotivity/src/port/oc_assert.h
index 069866b..6361c66 100644
--- a/libs/iotivity/src/port/oc_assert.h
+++ b/libs/iotivity/src/port/oc_assert.h
@@ -19,6 +19,10 @@
 
 #include "oc_log.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef __linux__
 #include <stdlib.h>
 #define abort_impl() abort()
@@ -39,4 +43,8 @@ void abort_impl(void);
     }                                                                          \
   } while (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_ASSERT_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_clock.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_clock.h b/libs/iotivity/src/port/oc_clock.h
index 8c958a9..16b0b7a 100644
--- a/libs/iotivity/src/port/oc_clock.h
+++ b/libs/iotivity/src/port/oc_clock.h
@@ -53,6 +53,10 @@
 #include "mynewt/config.h"
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * A second, measured in system clock time.
  *
@@ -99,4 +103,8 @@ unsigned long oc_clock_seconds(void);
  */
 void oc_clock_wait(oc_clock_time_t t);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_CLOCK_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_connectivity.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_connectivity.h b/libs/iotivity/src/port/oc_connectivity.h
index 9b3b185..203f2b0 100644
--- a/libs/iotivity/src/port/oc_connectivity.h
+++ b/libs/iotivity/src/port/oc_connectivity.h
@@ -23,6 +23,10 @@
 #include "../util/oc_process.h"
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct
 {
   uint16_t port;
@@ -82,4 +86,8 @@ void oc_connectivity_shutdown(void);
 
 void oc_send_multicast_message(oc_message_t *message);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_CONNECTIVITY_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_log.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_log.h b/libs/iotivity/src/port/oc_log.h
index 6744499..e77575b 100644
--- a/libs/iotivity/src/port/oc_log.h
+++ b/libs/iotivity/src/port/oc_log.h
@@ -20,6 +20,10 @@
 #include <stdio.h>
 #include "mynewt/config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define PRINT(...) printf(__VA_ARGS__)
 
 #define PRINTipaddr(endpoint)                                                  \
@@ -71,4 +75,8 @@ int oc_log_init(void);
 #define oc_log_init()   0
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_LOG_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_network_events_mutex.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_network_events_mutex.h b/libs/iotivity/src/port/oc_network_events_mutex.h
index 40c1b09..715be7f 100644
--- a/libs/iotivity/src/port/oc_network_events_mutex.h
+++ b/libs/iotivity/src/port/oc_network_events_mutex.h
@@ -17,10 +17,18 @@
 #ifndef OC_NETWORK_EVENTS_MUTEX_H
 #define OC_NETWORK_EVENTS_MUTEX_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void oc_network_event_handler_mutex_init(void);
 
 void oc_network_event_handler_mutex_lock(void);
 
 void oc_network_event_handler_mutex_unlock(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_NETWORK_EVENTS_MUTEX_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_random.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_random.h b/libs/iotivity/src/port/oc_random.h
index 758ed19..4e377a5 100644
--- a/libs/iotivity/src/port/oc_random.h
+++ b/libs/iotivity/src/port/oc_random.h
@@ -34,6 +34,10 @@
 #ifndef OC_RANDOM_H
 #define OC_RANDOM_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Initialize the pseudo-random generator.
  *
@@ -53,4 +57,8 @@ unsigned short oc_random_rand(void);
 
 void oc_random_destroy(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_RANDOM_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_signal_main_loop.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_signal_main_loop.h b/libs/iotivity/src/port/oc_signal_main_loop.h
index 7f18f9a..8a3251b 100644
--- a/libs/iotivity/src/port/oc_signal_main_loop.h
+++ b/libs/iotivity/src/port/oc_signal_main_loop.h
@@ -17,6 +17,14 @@
 #ifndef OC_SIGNAL_MAIN_LOOP_H
 #define OC_SIGNAL_MAIN_LOOP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void oc_signal_main_loop(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_SIGNAL_MAIN_LOOP_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/port/oc_storage.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/port/oc_storage.h b/libs/iotivity/src/port/oc_storage.h
index 48ec0c8..e8127fa 100644
--- a/libs/iotivity/src/port/oc_storage.h
+++ b/libs/iotivity/src/port/oc_storage.h
@@ -20,8 +20,16 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int oc_storage_config(const char *store);
 long oc_storage_read(const char *store, uint8_t *buf, size_t size);
 long oc_storage_write(const char *store, uint8_t *buf, size_t size);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_STORAGE_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/security/oc_acl.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/security/oc_acl.h b/libs/iotivity/src/security/oc_acl.h
index 5315506..17f5560 100644
--- a/libs/iotivity/src/security/oc_acl.h
+++ b/libs/iotivity/src/security/oc_acl.h
@@ -24,6 +24,10 @@
 #include "util/oc_memb.h"
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum {
   OC_PERM_CREATE = (1 << 0),
   OC_PERM_RETRIEVE = (1 << 1),
@@ -60,4 +64,8 @@ void post_acl(oc_request_t *request, oc_interface_mask_t interface);
 bool oc_sec_check_acl(oc_method_t method, oc_resource_t *resource,
                       oc_endpoint_t *endpoint);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_ACL_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/security/oc_cred.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/security/oc_cred.h b/libs/iotivity/src/security/oc_cred.h
index 81e64c5..106f18a 100644
--- a/libs/iotivity/src/security/oc_cred.h
+++ b/libs/iotivity/src/security/oc_cred.h
@@ -21,6 +21,10 @@
 #include "oc_uuid.h"
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct oc_sec_cred_s
 {
   struct oc_sec_cred_s *next;
@@ -37,4 +41,8 @@ oc_sec_cred_t *oc_sec_get_cred(oc_uuid_t *subjectuuid);
 void put_cred(oc_request_t *request, oc_interface_mask_t interface);
 void post_cred(oc_request_t *request, oc_interface_mask_t interface);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_CRED_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/security/oc_doxm.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/security/oc_doxm.h b/libs/iotivity/src/security/oc_doxm.h
index 17d9b5d..7c7586d 100644
--- a/libs/iotivity/src/security/oc_doxm.h
+++ b/libs/iotivity/src/security/oc_doxm.h
@@ -25,6 +25,10 @@
 #include "oc_ri.h"
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct
 {
   int oxmsel;
@@ -42,4 +46,8 @@ oc_sec_doxm_t *oc_sec_get_doxm(void);
 void oc_sec_doxm_default(void);
 void get_doxm(oc_request_t *request, oc_interface_mask_t interface);
 void post_doxm(oc_request_t *request, oc_interface_mask_t interface);
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_DOXM_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/security/oc_dtls.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/security/oc_dtls.h b/libs/iotivity/src/security/oc_dtls.h
index 5cb0aa0..21885c0 100644
--- a/libs/iotivity/src/security/oc_dtls.h
+++ b/libs/iotivity/src/security/oc_dtls.h
@@ -23,6 +23,10 @@
 #include "util/oc_process.h"
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 OC_PROCESS_NAME(oc_dtls_handler);
 
 void oc_sec_dtls_close_init(oc_endpoint_t *endpoint);
@@ -47,4 +51,8 @@ typedef struct oc_sec_dtls_peer_s
   oc_clock_time_t timestamp;
 } oc_sec_dtls_peer_t;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_DTLS_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/security/oc_pstat.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/security/oc_pstat.h b/libs/iotivity/src/security/oc_pstat.h
index 77daa52..7189d52 100644
--- a/libs/iotivity/src/security/oc_pstat.h
+++ b/libs/iotivity/src/security/oc_pstat.h
@@ -19,6 +19,10 @@
 
 #include "oc_ri.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct
 {
   bool isop;
@@ -36,4 +40,8 @@ void oc_sec_pstat_default(void);
 void get_pstat(oc_request_t *request, oc_interface_mask_t interface);
 void post_pstat(oc_request_t *request, oc_interface_mask_t interface);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_PSTAT_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/security/oc_store.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/security/oc_store.h b/libs/iotivity/src/security/oc_store.h
index bf684e3..077290d 100644
--- a/libs/iotivity/src/security/oc_store.h
+++ b/libs/iotivity/src/security/oc_store.h
@@ -17,10 +17,18 @@
 #ifndef OC_STORE_H_
 #define OC_STORE_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void oc_sec_load_pstat(void);
 void oc_sec_load_doxm(void);
 void oc_sec_load_cred(void);
 void oc_sec_load_acl(void);
 void oc_sec_dump_state(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_STORE_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/security/oc_svr.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/security/oc_svr.h b/libs/iotivity/src/security/oc_svr.h
index 51b4106..70164ec 100644
--- a/libs/iotivity/src/security/oc_svr.h
+++ b/libs/iotivity/src/security/oc_svr.h
@@ -17,6 +17,14 @@
 #ifndef OC_SVR_H
 #define OC_SVR_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void oc_sec_create_svr(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_SVR_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/oc_etimer.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/oc_etimer.h b/libs/iotivity/src/util/oc_etimer.h
index edce777..703b557 100644
--- a/libs/iotivity/src/util/oc_etimer.h
+++ b/libs/iotivity/src/util/oc_etimer.h
@@ -57,6 +57,10 @@
 #include "oc_process.h"
 #include "oc_timer.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * A timer.
  *
@@ -242,6 +246,10 @@ oc_clock_time_t oc_etimer_next_expiration_time(void);
 /** @} */
 
 OC_PROCESS_NAME(oc_etimer_process);
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_ETIMER_H */
 /** @} */
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/oc_list.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/oc_list.h b/libs/iotivity/src/util/oc_list.h
index 1ff9e15..c0f5db8 100644
--- a/libs/iotivity/src/util/oc_list.h
+++ b/libs/iotivity/src/util/oc_list.h
@@ -56,6 +56,10 @@
 #ifndef OC_LIST_H
 #define OC_LIST_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define OC_LIST_CONCAT2(s1, s2) s1##s2
 #define OC_LIST_CONCAT(s1, s2) OC_LIST_CONCAT2(s1, s2)
 
@@ -141,4 +145,8 @@ void oc_list_insert(oc_list_t list, void *previtem, void *newitem);
 
 void *oc_list_item_next(void *item);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_LIST_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/oc_memb.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/oc_memb.h b/libs/iotivity/src/util/oc_memb.h
index f329dfe..37ecca6 100644
--- a/libs/iotivity/src/util/oc_memb.h
+++ b/libs/iotivity/src/util/oc_memb.h
@@ -47,6 +47,10 @@
 #ifndef OC_MEMB_H
 #define OC_MEMB_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define CC_CONCAT2(s1, s2) s1##s2
 /**
  * A C preprocessing macro for concatenating two preprocessor tokens.
@@ -124,4 +128,8 @@ int oc_memb_inmemb(struct oc_memb *m, void *ptr);
 
 int oc_memb_numfree(struct oc_memb *m);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_MEMB_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/oc_mmem.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/oc_mmem.h b/libs/iotivity/src/util/oc_mmem.h
index fdabfa4..bcd170f 100644
--- a/libs/iotivity/src/util/oc_mmem.h
+++ b/libs/iotivity/src/util/oc_mmem.h
@@ -35,6 +35,10 @@
 #ifndef OC_MMEM_H
 #define OC_MMEM_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define OC_MMEM_PTR(m) (struct oc_mmem *)(m)->ptr
 
 struct oc_mmem
@@ -50,4 +54,8 @@ int oc_mmem_alloc(struct oc_mmem *m, unsigned int size, pool pool_type);
 void oc_mmem_free(struct oc_mmem *, pool pool_type);
 void oc_mmem_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_MMEM_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/oc_process.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/oc_process.h b/libs/iotivity/src/util/oc_process.h
index 27179d7..b81e217 100644
--- a/libs/iotivity/src/util/oc_process.h
+++ b/libs/iotivity/src/util/oc_process.h
@@ -44,6 +44,10 @@
 #define OC_PROCESS_H
 #include "pt/pt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef NULL
 #define NULL 0
 #endif /* NULL */
@@ -524,4 +528,8 @@ extern struct oc_process *oc_process_list;
 
 #define OC_PROCESS_LIST() oc_process_list
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_PROCESS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/oc_timer.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/oc_timer.h b/libs/iotivity/src/util/oc_timer.h
index bff0a49..fd6c826 100644
--- a/libs/iotivity/src/util/oc_timer.h
+++ b/libs/iotivity/src/util/oc_timer.h
@@ -65,6 +65,10 @@
 
 #include "../port/oc_clock.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * A timer.
  *
@@ -85,4 +89,8 @@ void oc_timer_restart(struct oc_timer *t);
 int oc_timer_expired(struct oc_timer *t);
 oc_clock_time_t oc_timer_remaining(struct oc_timer *t);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OC_TIMER_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/pt/lc-addrlabels.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/pt/lc-addrlabels.h b/libs/iotivity/src/util/pt/lc-addrlabels.h
index a0dedf0..68a043e 100644
--- a/libs/iotivity/src/util/pt/lc-addrlabels.h
+++ b/libs/iotivity/src/util/pt/lc-addrlabels.h
@@ -59,6 +59,10 @@
 #ifndef LC_ADDRLABELS_H_
 #define LC_ADDRLABELS_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** \hideinitializer */
 typedef void *lc_t;
 
@@ -82,5 +86,9 @@ typedef void *lc_t;
 
 #define LC_END(s)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LC_ADDRLABELS_H_ */
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/pt/lc-switch.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/pt/lc-switch.h b/libs/iotivity/src/util/pt/lc-switch.h
index 3f7e819..7521c25 100644
--- a/libs/iotivity/src/util/pt/lc-switch.h
+++ b/libs/iotivity/src/util/pt/lc-switch.h
@@ -56,6 +56,10 @@
 #ifndef LC_SWITCH_H_
 #define LC_SWITCH_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* WARNING! lc implementation using switch() does not work if an
    LC_SET() is done within another switch() statement! */
 
@@ -74,6 +78,10 @@ typedef unsigned short lc_t;
 
 #define LC_END(s) }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LC_SWITCH_H_ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/pt/lc.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/pt/lc.h b/libs/iotivity/src/util/pt/lc.h
index f787f51..1d2c254 100644
--- a/libs/iotivity/src/util/pt/lc.h
+++ b/libs/iotivity/src/util/pt/lc.h
@@ -69,6 +69,10 @@
  */
 #define LC_INIT(lc)
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Set a local continuation.
  *
@@ -124,6 +128,10 @@
 #include "lc-switch.h"
 #endif /* LC_CONF_INCLUDE */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LC_H_ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/pt/pt-sem.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/pt/pt-sem.h b/libs/iotivity/src/util/pt/pt-sem.h
index 85bdd17..ad87c0d 100644
--- a/libs/iotivity/src/util/pt/pt-sem.h
+++ b/libs/iotivity/src/util/pt/pt-sem.h
@@ -63,6 +63,10 @@
 #include "pt-sem.h"
 
 #define NUM_ITEMS 32
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BUFSIZE 8
 
 static struct pt_sem mutex, full, empty;
@@ -227,6 +231,10 @@ struct pt_sem
  */
 #define PT_SEM_SIGNAL(pt, s) (++(s)->head)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PT_SEM_H_ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/iotivity/src/util/pt/pt.h
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/util/pt/pt.h b/libs/iotivity/src/util/pt/pt.h
index 87d8173..43d1ab7 100644
--- a/libs/iotivity/src/util/pt/pt.h
+++ b/libs/iotivity/src/util/pt/pt.h
@@ -50,6 +50,10 @@
 
 #include "lc.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct pt
 {
   lc_t lc;
@@ -328,6 +332,10 @@ struct pt
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PT_H_ */
 
 /** @} */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/newtmgr/include/newtmgr/newtmgr.h
----------------------------------------------------------------------
diff --git a/libs/newtmgr/include/newtmgr/newtmgr.h b/libs/newtmgr/include/newtmgr/newtmgr.h
index 43450ae..d731c90 100644
--- a/libs/newtmgr/include/newtmgr/newtmgr.h
+++ b/libs/newtmgr/include/newtmgr/newtmgr.h
@@ -24,6 +24,10 @@
 #include <inttypes.h>
 #include <os/os.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* MTU for newtmgr responses */
 #define NMGR_MAX_MTU 1024
 
@@ -126,4 +130,8 @@ int nmgr_rx_req(struct nmgr_transport *nt, struct os_mbuf *req);
 int nmgr_rsp_extend(struct nmgr_hdr *, struct os_mbuf *, void *data, uint16_t);
 int nmgr_group_register(struct nmgr_group *group);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _NETMGR_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/newtmgr/nmgr_os/include/nmgr_os/nmgr_os.h
----------------------------------------------------------------------
diff --git a/libs/newtmgr/nmgr_os/include/nmgr_os/nmgr_os.h b/libs/newtmgr/nmgr_os/include/nmgr_os/nmgr_os.h
index 43de227..5da2f6d 100644
--- a/libs/newtmgr/nmgr_os/include/nmgr_os/nmgr_os.h
+++ b/libs/newtmgr/nmgr_os/include/nmgr_os/nmgr_os.h
@@ -20,6 +20,10 @@
 #ifndef _NMGR_OS_H_
 #define _NMGR_OS_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Id's for OS group commands
  */
@@ -33,4 +37,8 @@
 struct os_eventq;
 int nmgr_os_groups_register(struct os_eventq *nmgr_evq);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _NMGR_OS_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/newtmgr/transport/ble/include/nmgrble/newtmgr_ble.h
----------------------------------------------------------------------
diff --git a/libs/newtmgr/transport/ble/include/nmgrble/newtmgr_ble.h b/libs/newtmgr/transport/ble/include/nmgrble/newtmgr_ble.h
index 6046e21..252cb5f 100644
--- a/libs/newtmgr/transport/ble/include/nmgrble/newtmgr_ble.h
+++ b/libs/newtmgr/transport/ble/include/nmgrble/newtmgr_ble.h
@@ -20,6 +20,10 @@
 #ifndef _NEWTMGR_BLE_H_
 #define _NEWTMGR_BLE_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct nmgr_hdr;
 
 int
@@ -31,4 +35,8 @@ nmgr_ble_gatt_svr_init(void);
 void
 nmgr_ble_update_rsp_len(struct os_mbuf *req, uint16_t *len, uint8_t *flags);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _NETMGR_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/newtmgr_oic/include/newtmgr/newtmgr.h
----------------------------------------------------------------------
diff --git a/libs/newtmgr_oic/include/newtmgr/newtmgr.h b/libs/newtmgr_oic/include/newtmgr/newtmgr.h
index dec4a5a..32d16e5 100644
--- a/libs/newtmgr_oic/include/newtmgr/newtmgr.h
+++ b/libs/newtmgr_oic/include/newtmgr/newtmgr.h
@@ -24,6 +24,10 @@
 #include <inttypes.h>
 #include <os/os.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* MTU for newtmgr responses */
 #define NMGR_MAX_MTU 1024
 
@@ -109,4 +113,8 @@ struct nmgr_group {
 int nmgr_oic_init(uint8_t, os_stack_t *, uint16_t);
 int nmgr_group_register(struct nmgr_group *group);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _NETMGR_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/util/include/util/datetime.h
----------------------------------------------------------------------
diff --git a/libs/util/include/util/datetime.h b/libs/util/include/util/datetime.h
index 220c9bf..5c433c3 100644
--- a/libs/util/include/util/datetime.h
+++ b/libs/util/include/util/datetime.h
@@ -19,6 +19,10 @@
 #ifndef __UTIL_DATETIME_H
 #define __UTIL_DATETIME_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_timeval;
 struct os_timezone;
 
@@ -47,4 +51,8 @@ int format_datetime(const struct os_timeval *utctime,
 int parse_datetime(const char *input, struct os_timeval *utctime,
     struct os_timezone *tz);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* __UTIL_DATETIME_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/util/include/util/mem.h
----------------------------------------------------------------------
diff --git a/libs/util/include/util/mem.h b/libs/util/include/util/mem.h
index 46601ba..c7f548f 100644
--- a/libs/util/include/util/mem.h
+++ b/libs/util/include/util/mem.h
@@ -20,6 +20,10 @@
 #ifndef H_UTIL_MEM_
 #define H_UTIL_MEM_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_mempool;
 struct os_mbuf_pool;
 
@@ -38,4 +42,8 @@ int mem_init_mbuf_pool(void *mem, struct os_mempool *mempool,
                        struct os_mbuf_pool *mbuf_pool, int num_blocks,
                        int block_size, char *name);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/libs/util/include/util/util.h
----------------------------------------------------------------------
diff --git a/libs/util/include/util/util.h b/libs/util/include/util/util.h
index 1dcdab4..202b547 100644
--- a/libs/util/include/util/util.h
+++ b/libs/util/include/util/util.h
@@ -19,6 +19,14 @@
 #ifndef __UTIL_H__ 
 #define __UTIL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define CTASSERT(x) typedef int __ctasssert ## __LINE__[(x) ? 1 : -1]
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __UTIL_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/include/arch/cc.h
----------------------------------------------------------------------
diff --git a/net/ip/include/arch/cc.h b/net/ip/include/arch/cc.h
index f5868e2..0b55d0a 100644
--- a/net/ip/include/arch/cc.h
+++ b/net/ip/include/arch/cc.h
@@ -22,6 +22,10 @@
 #include <assert.h>
 #include <stdlib.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef BYTE_ORDER
 #define BYTE_ORDER LITTLE_ENDIAN
 #endif
@@ -42,4 +46,8 @@ void __assert_f(const char *file, int line);
 
 #define LWIP_PLATFORM_ASSERT(x) assert(x)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __LWIP_ARCH_CC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/include/arch/sys_arch.h
----------------------------------------------------------------------
diff --git a/net/ip/include/arch/sys_arch.h b/net/ip/include/arch/sys_arch.h
index ac0c366..e01f6aa 100644
--- a/net/ip/include/arch/sys_arch.h
+++ b/net/ip/include/arch/sys_arch.h
@@ -21,6 +21,10 @@
 
 #include <stdlib.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #undef LITTLE_ENDIAN
 #include <os/os.h>
 #include <ip/os_queue.h>
@@ -148,5 +152,9 @@ sys_thread_new(const char *name, void (*thread)(void *arg), void *arg,
     return task;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __LWIP_SYS_ARCH_H__ */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/include/ip/init.h
----------------------------------------------------------------------
diff --git a/net/ip/include/ip/init.h b/net/ip/include/ip/init.h
index 39a8ac2..e0df7e4 100644
--- a/net/ip/include/ip/init.h
+++ b/net/ip/include/ip/init.h
@@ -19,6 +19,14 @@
 #ifndef __IP_INIT_H__
 #define __IP_INIT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int ip_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __IP_INIT_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/include/ip/os_queue.h
----------------------------------------------------------------------
diff --git a/net/ip/include/ip/os_queue.h b/net/ip/include/ip/os_queue.h
index 3c4bca5..2160dc3 100644
--- a/net/ip/include/ip/os_queue.h
+++ b/net/ip/include/ip/os_queue.h
@@ -19,6 +19,10 @@
 #ifndef __OS_QUEUE_H__
 #define __OS_QUEUE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_queue {
     uint8_t oq_head;
     uint8_t oq_tail;
@@ -33,4 +37,8 @@ int os_queue_init(struct os_queue *, uint8_t elem_size, uint8_t elem_cnt);
 int os_queue_put(struct os_queue *, void *elem, uint32_t timeout);
 int os_queue_get(struct os_queue *, void *elem, uint32_t timeout);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __OS_QUEUE_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/include/lwipopts.h
----------------------------------------------------------------------
diff --git a/net/ip/include/lwipopts.h b/net/ip/include/lwipopts.h
index 7b6d248..39f5210 100644
--- a/net/ip/include/lwipopts.h
+++ b/net/ip/include/lwipopts.h
@@ -19,6 +19,10 @@
 #ifndef __LWIP_LWIPOPTS_H__
 #define __LWIP_LWIPOPTS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define MEM_LIBC_MALLOC			1	/* use platform malloc */
 #define LWIP_NETIF_TX_SINGLE_PBUF 	1
 #define LWIP_NETIF_LOOPBACK		1	/* yes loopback interface */
@@ -188,4 +192,8 @@
 #define LWIP_PROVIDE_ERRNO 1
 #define ERRNO                     0
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*  __LWIP_LWIPOPTS_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
----------------------------------------------------------------------
diff --git a/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h b/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
index 6b219fe..3260d05 100644
--- a/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
+++ b/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
@@ -20,6 +20,14 @@
 #ifndef __INET_DEF_SERVICE_H__
 #define __INET_DEF_SERVICE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int inet_def_service_init(uint8_t prio, os_stack_t *stack, uint16_t stack_sz);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __INET_DEF_SERVICE_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/httpd_opts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/httpd_opts.h b/net/ip/lwip_base/include/lwip/apps/httpd_opts.h
index 5fa8402..424d3d2 100644
--- a/net/ip/lwip_base/include/lwip/apps/httpd_opts.h
+++ b/net/ip/lwip_base/include/lwip/apps/httpd_opts.h
@@ -43,6 +43,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup httpd_opts Options
  * @ingroup httpd
@@ -342,4 +346,8 @@
  * @}
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_APPS_HTTPD_OPTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/mdns.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/mdns.h b/net/ip/lwip_base/include/lwip/apps/mdns.h
index f57b182..1d4e3c8 100644
--- a/net/ip/lwip_base/include/lwip/apps/mdns.h
+++ b/net/ip/lwip_base/include/lwip/apps/mdns.h
@@ -40,6 +40,10 @@
 #include "lwip/apps/mdns_opts.h"
 #include "lwip/netif.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if LWIP_MDNS_RESPONDER
 
 enum mdns_sd_proto {
@@ -66,4 +70,8 @@ void mdns_resp_netif_settings_changed(struct netif *netif);
 
 #endif /* LWIP_MDNS_RESPONDER */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_MDNS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/mdns_opts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/mdns_opts.h b/net/ip/lwip_base/include/lwip/apps/mdns_opts.h
index a298c5a..d55ecff 100644
--- a/net/ip/lwip_base/include/lwip/apps/mdns_opts.h
+++ b/net/ip/lwip_base/include/lwip/apps/mdns_opts.h
@@ -40,6 +40,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup mdns_opts Options
  * @ingroup mdns
@@ -70,5 +74,9 @@
  * @}
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_APPS_MDNS_OPTS_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/mdns_priv.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/mdns_priv.h b/net/ip/lwip_base/include/lwip/apps/mdns_priv.h
index 9ae2cef..6dc7884 100644
--- a/net/ip/lwip_base/include/lwip/apps/mdns_priv.h
+++ b/net/ip/lwip_base/include/lwip/apps/mdns_priv.h
@@ -40,6 +40,10 @@
 #include "lwip/apps/mdns_opts.h"
 #include "lwip/pbuf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if LWIP_MDNS_RESPONDER
 
 /* Domain struct and methods - visible for unit tests */
@@ -63,4 +67,8 @@ u16_t mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain
 
 #endif /* LWIP_MDNS_RESPONDER */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_MDNS_PRIV_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/netbiosns.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/netbiosns.h b/net/ip/lwip_base/include/lwip/apps/netbiosns.h
index c9f68d8..a326d33 100644
--- a/net/ip/lwip_base/include/lwip/apps/netbiosns.h
+++ b/net/ip/lwip_base/include/lwip/apps/netbiosns.h
@@ -34,10 +34,18 @@
 
 #include "lwip/apps/netbiosns_opts.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void netbiosns_init(void);
 #ifndef NETBIOS_LWIP_NAME
 void netbiosns_set_name(const char* hostname);
 #endif
 void netbiosns_stop(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_APPS_NETBIOS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/netbiosns_opts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/netbiosns_opts.h b/net/ip/lwip_base/include/lwip/apps/netbiosns_opts.h
index 870b9fd..df6ea26 100644
--- a/net/ip/lwip_base/include/lwip/apps/netbiosns_opts.h
+++ b/net/ip/lwip_base/include/lwip/apps/netbiosns_opts.h
@@ -34,6 +34,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup netbiosns_opts Options
  * @ingroup netbiosns
@@ -66,4 +70,8 @@
  * @}
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_APPS_NETBIOS_OPTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/snmp_opts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/snmp_opts.h b/net/ip/lwip_base/include/lwip/apps/snmp_opts.h
index 6c9ba7b..569a82c 100644
--- a/net/ip/lwip_base/include/lwip/apps/snmp_opts.h
+++ b/net/ip/lwip_base/include/lwip/apps/snmp_opts.h
@@ -39,6 +39,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup snmp_opts Options
  * @ingroup snmp
@@ -290,4 +294,8 @@
 #define LWIP_SNMP_V3_MBEDTLS       LWIP_SNMP_V3
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_SNMP_OPTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/snmpv3.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/snmpv3.h b/net/ip/lwip_base/include/lwip/apps/snmpv3.h
index c99fed4..1008eea 100644
--- a/net/ip/lwip_base/include/lwip/apps/snmpv3.h
+++ b/net/ip/lwip_base/include/lwip/apps/snmpv3.h
@@ -38,6 +38,10 @@
 #include "lwip/apps/snmp_opts.h"
 #include "lwip/err.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if LWIP_SNMP && LWIP_SNMP_V3
 
 #define SNMP_V3_AUTH_ALGO_INVAL  0
@@ -87,4 +91,8 @@ void snmpv3_password_to_key_sha(
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_APPS_SNMP_V3_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/apps/sntp_opts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/apps/sntp_opts.h b/net/ip/lwip_base/include/lwip/apps/sntp_opts.h
index f3651f9..2dc3033 100644
--- a/net/ip/lwip_base/include/lwip/apps/sntp_opts.h
+++ b/net/ip/lwip_base/include/lwip/apps/sntp_opts.h
@@ -39,6 +39,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup sntp_opts Options
  * @ingroup sntp
@@ -170,4 +174,8 @@
  * @}
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_APPS_SNTP_OPTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/debug.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/debug.h b/net/ip/lwip_base/include/lwip/debug.h
index c676612..11d4775 100644
--- a/net/ip/lwip_base/include/lwip/debug.h
+++ b/net/ip/lwip_base/include/lwip/debug.h
@@ -40,6 +40,10 @@
 #include "lwip/arch.h"
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** lower two bits indicate debug level
  * - 0 all
  * - 1 warning
@@ -118,5 +122,9 @@
 #define LWIP_DEBUGF(debug, message)
 #endif /* LWIP_DEBUG */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_DEBUG_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/dhcp6.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/dhcp6.h b/net/ip/lwip_base/include/lwip/dhcp6.h
index 455336d..e6046c4 100644
--- a/net/ip/lwip_base/include/lwip/dhcp6.h
+++ b/net/ip/lwip_base/include/lwip/dhcp6.h
@@ -45,6 +45,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if LWIP_IPV6_DHCP6  /* don't build if not configured for use in lwipopts.h */
 
 
@@ -55,4 +59,8 @@ struct dhcp6
 
 #endif /* LWIP_IPV6_DHCP6 */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_IP6_DHCP6_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/opt.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/opt.h b/net/ip/lwip_base/include/lwip/opt.h
index 0db03b5..df26c78 100644
--- a/net/ip/lwip_base/include/lwip/opt.h
+++ b/net/ip/lwip_base/include/lwip/opt.h
@@ -44,6 +44,10 @@
 #if !defined LWIP_HDR_OPT_H
 #define LWIP_HDR_OPT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Include user defined options first. Anything not defined in these files
  * will be set to standard values. Override anything you don't like!
@@ -2793,4 +2797,8 @@
  * @}
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_OPT_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/priv/memp_std.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/priv/memp_std.h b/net/ip/lwip_base/include/lwip/priv/memp_std.h
index ce9fd50..dd439d1 100644
--- a/net/ip/lwip_base/include/lwip/priv/memp_std.h
+++ b/net/ip/lwip_base/include/lwip/priv/memp_std.h
@@ -21,6 +21,10 @@
 /* This treats "malloc pools" just like any other pool.
    The pools are a little bigger to provide 'size' as the amount of user data. */
 #define LWIP_MALLOC_MEMPOOL(num, size) LWIP_MEMPOOL(POOL_##size, num, (size + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper))), "MALLOC_"#size)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define LWIP_MALLOC_MEMPOOL_START
 #define LWIP_MALLOC_MEMPOOL_END
 #endif /* LWIP_MALLOC_MEMPOOL */
@@ -133,6 +137,10 @@ LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE,           PBUF_POOL_BUFSIZE,
  */
 #if MEMP_USE_CUSTOM_POOLS
 #include "lwippools.h"
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MEMP_USE_CUSTOM_POOLS */
 
 /*

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/lwip/prot/ip.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/lwip/prot/ip.h b/net/ip/lwip_base/include/lwip/prot/ip.h
index bbfae36..223158f 100644
--- a/net/ip/lwip_base/include/lwip/prot/ip.h
+++ b/net/ip/lwip_base/include/lwip/prot/ip.h
@@ -39,6 +39,10 @@
 
 #include "lwip/arch.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define IP_PROTO_ICMP    1
 #define IP_PROTO_IGMP    2
 #define IP_PROTO_UDP     17
@@ -48,4 +52,8 @@
 /** This operates on a void* by loading the first byte */
 #define IP_HDR_GET_VERSION(ptr)   ((*(u8_t*)(ptr)) >> 4)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_PROT_IP_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/lowpan6_opts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/lowpan6_opts.h b/net/ip/lwip_base/include/netif/lowpan6_opts.h
index fb93ea0..140d0c3 100644
--- a/net/ip/lwip_base/include/netif/lowpan6_opts.h
+++ b/net/ip/lwip_base/include/netif/lowpan6_opts.h
@@ -43,6 +43,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef LWIP_6LOWPAN
 #define LWIP_6LOWPAN                     0
 #endif
@@ -67,4 +71,8 @@
 #define LOWPAN6_DEBUG                    LWIP_DBG_OFF
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_LOWPAN6_OPTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/ccp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/ccp.h b/net/ip/lwip_base/include/netif/ppp/ccp.h
index 14dd659..b5642db 100644
--- a/net/ip/lwip_base/include/netif/ppp/ccp.h
+++ b/net/ip/lwip_base/include/netif/ppp/ccp.h
@@ -36,6 +36,10 @@
 #ifndef CCP_H
 #define CCP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * CCP codes.
  */
@@ -153,4 +157,8 @@ extern const struct protent ccp_protent;
 void ccp_resetrequest(ppp_pcb *pcb);  /* Issue a reset-request. */
 
 #endif /* CCP_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && CCP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/chap-new.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/chap-new.h b/net/ip/lwip_base/include/netif/ppp/chap-new.h
index 64eae32..872979d 100644
--- a/net/ip/lwip_base/include/netif/ppp/chap-new.h
+++ b/net/ip/lwip_base/include/netif/ppp/chap-new.h
@@ -36,6 +36,10 @@
 
 #include "ppp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * CHAP packets begin with a standard header with code, id, len (2 bytes).
  */
@@ -189,4 +193,8 @@ extern void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_c
 extern const struct protent chap_protent;
 
 #endif /* CHAP_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && CHAP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/chap_ms.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/chap_ms.h b/net/ip/lwip_base/include/netif/ppp/chap_ms.h
index 0795291..10898c6 100644
--- a/net/ip/lwip_base/include/netif/ppp/chap_ms.h
+++ b/net/ip/lwip_base/include/netif/ppp/chap_ms.h
@@ -36,9 +36,17 @@
 #ifndef CHAPMS_INCLUDE
 #define CHAPMS_INCLUDE
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern const struct chap_digest_type chapms_digest;
 extern const struct chap_digest_type chapms2_digest;
 
 #endif /* CHAPMS_INCLUDE */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && MSCHAP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/eui64.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/eui64.h b/net/ip/lwip_base/include/netif/ppp/eui64.h
index 1b5147f..758d8e6 100644
--- a/net/ip/lwip_base/include/netif/ppp/eui64.h
+++ b/net/ip/lwip_base/include/netif/ppp/eui64.h
@@ -41,6 +41,10 @@
 #ifndef EUI64_H
 #define EUI64_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * @todo:
  *
@@ -91,4 +95,8 @@ typedef union
 char *eui64_ntoa(eui64_t);	/* Returns ascii representation of id */
 
 #endif /* EUI64_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/fsm.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/fsm.h b/net/ip/lwip_base/include/netif/ppp/fsm.h
index b6915d3..c5fcc5c 100644
--- a/net/ip/lwip_base/include/netif/ppp/fsm.h
+++ b/net/ip/lwip_base/include/netif/ppp/fsm.h
@@ -50,6 +50,10 @@
 
 #include "ppp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Packet header = Code, id, length.
  */
@@ -172,4 +176,8 @@ void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen);
 
 
 #endif /* FSM_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/ipcp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/ipcp.h b/net/ip/lwip_base/include/netif/ppp/ipcp.h
index 45f46b3..b41bd96 100644
--- a/net/ip/lwip_base/include/netif/ppp/ipcp.h
+++ b/net/ip/lwip_base/include/netif/ppp/ipcp.h
@@ -48,6 +48,10 @@
 #ifndef IPCP_H
 #define	IPCP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Options.
  */
@@ -123,4 +127,8 @@ char *ip_ntoa (u32_t);
 extern const struct protent ipcp_protent;
 
 #endif /* IPCP_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/ipv6cp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/ipv6cp.h b/net/ip/lwip_base/include/netif/ppp/ipv6cp.h
index 07d1ae3..64c30e3 100644
--- a/net/ip/lwip_base/include/netif/ppp/ipv6cp.h
+++ b/net/ip/lwip_base/include/netif/ppp/ipv6cp.h
@@ -146,6 +146,10 @@
 
 #include "eui64.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Options.
  */
@@ -180,4 +184,8 @@ typedef struct ipv6cp_options {
 extern const struct protent ipv6cp_protent;
 
 #endif /* IPV6CP_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/lcp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/lcp.h b/net/ip/lwip_base/include/netif/ppp/lcp.h
index 12e2a05..65f7394 100644
--- a/net/ip/lwip_base/include/netif/ppp/lcp.h
+++ b/net/ip/lwip_base/include/netif/ppp/lcp.h
@@ -50,6 +50,10 @@
 
 #include "ppp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Options.
  */
@@ -168,4 +172,8 @@ extern const struct protent lcp_protent;
 #endif /* moved to ppp_opts.h */
 
 #endif /* LCP_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/magic.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/magic.h b/net/ip/lwip_base/include/netif/ppp/magic.h
index a2a9b53..eea645b 100644
--- a/net/ip/lwip_base/include/netif/ppp/magic.h
+++ b/net/ip/lwip_base/include/netif/ppp/magic.h
@@ -80,6 +80,10 @@
 #ifndef MAGIC_H
 #define MAGIC_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /***********************
 *** PUBLIC FUNCTIONS ***
 ***********************/
@@ -119,4 +123,8 @@ u32_t magic_pow(u8_t pow);
 
 #endif /* MAGIC_H */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/mppe.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/mppe.h b/net/ip/lwip_base/include/netif/ppp/mppe.h
index 551a47e..d7383a9 100644
--- a/net/ip/lwip_base/include/netif/ppp/mppe.h
+++ b/net/ip/lwip_base/include/netif/ppp/mppe.h
@@ -41,6 +41,10 @@
 
 #include "netif/ppp/pppcrypt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define MPPE_PAD		4	/* MPPE growth per frame */
 #define MPPE_MAX_KEY_LEN	16	/* largest key length (128-bit) */
 
@@ -170,4 +174,8 @@ void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state);
 err_t mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb);
 
 #endif /* MPPE_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && MPPE_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/ppp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/ppp.h b/net/ip/lwip_base/include/netif/ppp/ppp.h
index 28b2732..58c8e09 100644
--- a/net/ip/lwip_base/include/netif/ppp/ppp.h
+++ b/net/ip/lwip_base/include/netif/ppp/ppp.h
@@ -43,6 +43,10 @@
 #include "lwip/netif.h"
 #include "lwip/sys.h"
 #include "lwip/timeouts.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if PPP_IPV6_SUPPORT
 #include "lwip/ip6_addr.h"
 #endif /* PPP_IPV6_SUPPORT */
@@ -685,4 +689,8 @@ err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg);
 
 #endif /* PPP_H */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/ppp_impl.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/ppp_impl.h b/net/ip/lwip_base/include/netif/ppp/ppp_impl.h
index e9338de..5fcc858 100644
--- a/net/ip/lwip_base/include/netif/ppp/ppp_impl.h
+++ b/net/ip/lwip_base/include/netif/ppp/ppp_impl.h
@@ -35,6 +35,10 @@
 
 #include "netif/ppp/ppp_opts.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
 
 #ifdef PPP_INCLUDE_SETTINGS_HEADER
@@ -626,4 +630,8 @@ void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len);
 
 
 #endif /* PPP_SUPPORT */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_PPP_IMPL_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/ppp_opts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/ppp_opts.h b/net/ip/lwip_base/include/netif/ppp/ppp_opts.h
index fa79c09..dee5153 100644
--- a/net/ip/lwip_base/include/netif/ppp/ppp_opts.h
+++ b/net/ip/lwip_base/include/netif/ppp/ppp_opts.h
@@ -30,6 +30,10 @@
 
 #include "lwip/opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * PPP_SUPPORT==1: Enable PPP.
  */
@@ -590,4 +594,8 @@
 
 #endif /* PPP_SUPPORT */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_PPP_OPTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/pppcrypt.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/pppcrypt.h b/net/ip/lwip_base/include/netif/ppp/pppcrypt.h
index a7b2099..3bc9d4b 100644
--- a/net/ip/lwip_base/include/netif/ppp/pppcrypt.h
+++ b/net/ip/lwip_base/include/netif/ppp/pppcrypt.h
@@ -38,6 +38,10 @@
 #ifndef PPPCRYPT_H
 #define	PPPCRYPT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * If included PolarSSL copy is not used, user is expected to include
  * external libraries in arch/cc.h (which is included by lwip/arch.h).
@@ -133,4 +137,8 @@ void pppcrypt_56_to_64_bit_key(u_char *key, u_char *des_key);
 
 #endif /* PPPCRYPT_H */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/pppdebug.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/pppdebug.h b/net/ip/lwip_base/include/netif/ppp/pppdebug.h
index 7ead045..6b927bb 100644
--- a/net/ip/lwip_base/include/netif/ppp/pppdebug.h
+++ b/net/ip/lwip_base/include/netif/ppp/pppdebug.h
@@ -40,6 +40,10 @@
 #ifndef PPPDEBUG_H
 #define PPPDEBUG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Trace levels. */
 #define LOG_CRITICAL  (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
 #define LOG_ERR       (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
@@ -77,4 +81,8 @@
 
 #endif /* PPPDEBUG_H */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/pppoe.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/pppoe.h b/net/ip/lwip_base/include/netif/ppp/pppoe.h
index 9f8f289..10e402d 100644
--- a/net/ip/lwip_base/include/netif/ppp/pppoe.h
+++ b/net/ip/lwip_base/include/netif/ppp/pppoe.h
@@ -76,6 +76,10 @@
 #include "ppp.h"
 #include "lwip/etharp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef PACK_STRUCT_USE_INCLUDES
 #  include "arch/bpstruct.h"
 #endif
@@ -176,4 +180,8 @@ void pppoe_data_input(struct netif *netif, struct pbuf *p);
 
 #endif /* PPP_OE_H */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && PPPOE_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/pppol2tp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/pppol2tp.h b/net/ip/lwip_base/include/netif/ppp/pppol2tp.h
index f03950e..79406b0 100644
--- a/net/ip/lwip_base/include/netif/ppp/pppol2tp.h
+++ b/net/ip/lwip_base/include/netif/ppp/pppol2tp.h
@@ -39,6 +39,10 @@
 
 #include "ppp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Timeout */
 #define PPPOL2TP_CONTROL_TIMEOUT         (5*1000)  /* base for quick timeout calculation */
 #define PPPOL2TP_SLOW_RETRY              (60*1000) /* persistent retry interval */
@@ -198,4 +202,8 @@ ppp_pcb *pppol2tp_create(struct netif *pppif,
        ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
 
 #endif /* PPPOL2TP_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/pppos.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/pppos.h b/net/ip/lwip_base/include/netif/ppp/pppos.h
index d924a9f..6b1c995 100644
--- a/net/ip/lwip_base/include/netif/ppp/pppos.h
+++ b/net/ip/lwip_base/include/netif/ppp/pppos.h
@@ -42,6 +42,10 @@
 #include "ppp.h"
 #include "vj.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* PPP packet parser states.  Current state indicates operation yet to be
  * completed. */
 enum {
@@ -115,4 +119,8 @@ err_t pppos_input_sys(struct pbuf *p, struct netif *inp);
 #endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */
 
 #endif /* PPPOS_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/upap.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/upap.h b/net/ip/lwip_base/include/netif/ppp/upap.h
index 7da792e..0d9dd1c 100644
--- a/net/ip/lwip_base/include/netif/ppp/upap.h
+++ b/net/ip/lwip_base/include/netif/ppp/upap.h
@@ -50,6 +50,10 @@
 
 #include "ppp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Packet header = Code, id, length.
  */
@@ -120,4 +124,8 @@ void upap_authpeer(ppp_pcb *pcb);
 extern const struct protent pap_protent;
 
 #endif /* UPAP_H */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && PAP_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/include/netif/ppp/vj.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/include/netif/ppp/vj.h b/net/ip/lwip_base/include/netif/ppp/vj.h
index 7f389c8..b386c01 100644
--- a/net/ip/lwip_base/include/netif/ppp/vj.h
+++ b/net/ip/lwip_base/include/netif/ppp/vj.h
@@ -31,6 +31,10 @@
 #include "lwip/ip.h"
 #include "lwip/priv/tcp_priv.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define MAX_SLOTS 16 /* must be > 2 and < 256 */
 #define MAX_HDR   128
 
@@ -158,4 +162,8 @@ extern int   vj_uncompress_tcp   (struct pbuf **nb, struct vjcompress *comp);
 
 #endif /* VJ_H */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_SUPPORT && VJ_SUPPORT */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/src/apps/httpd/fsdata.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/src/apps/httpd/fsdata.h b/net/ip/lwip_base/src/apps/httpd/fsdata.h
index ac4548c..0c54d39 100644
--- a/net/ip/lwip_base/src/apps/httpd/fsdata.h
+++ b/net/ip/lwip_base/src/apps/httpd/fsdata.h
@@ -35,6 +35,10 @@
 #include "lwip/apps/httpd_opts.h"
 #include "lwip/apps/fs.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct fsdata_file {
   const struct fsdata_file *next;
   const unsigned char *name;
@@ -47,4 +51,8 @@ struct fsdata_file {
 #endif /* HTTPD_PRECALCULATED_CHECKSUM */
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_FSDATA_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/src/apps/httpd/httpd_structs.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/src/apps/httpd/httpd_structs.h b/net/ip/lwip_base/src/apps/httpd/httpd_structs.h
index fbd135a..dc53346 100644
--- a/net/ip/lwip_base/src/apps/httpd/httpd_structs.h
+++ b/net/ip/lwip_base/src/apps/httpd/httpd_structs.h
@@ -3,6 +3,10 @@
 
 #include "lwip/apps/httpd.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if LWIP_HTTPD_DYNAMIC_HEADERS
 /** This struct is used for a list of HTTP header strings for various
  * filename extensions. */
@@ -111,4 +115,8 @@ static const char * const g_pcSSIExtensions[] = {
 #define NUM_SHTML_EXTENSIONS (sizeof(g_pcSSIExtensions) / sizeof(const char *))
 #endif /* LWIP_HTTPD_SSI */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HTTPD_STRUCTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/src/apps/snmp/snmpv3_priv.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/src/apps/snmp/snmpv3_priv.h b/net/ip/lwip_base/src/apps/snmp/snmpv3_priv.h
index b87666d..3712d5c 100644
--- a/net/ip/lwip_base/src/apps/snmp/snmpv3_priv.h
+++ b/net/ip/lwip_base/src/apps/snmp/snmpv3_priv.h
@@ -37,6 +37,10 @@
 
 #include "lwip/apps/snmp_opts.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if LWIP_SNMP && LWIP_SNMP_V3
 
 #include "snmp_pbuf_stream.h"
@@ -63,4 +67,8 @@ err_t snmpv3_build_priv_param(u8_t* priv_param);
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_APPS_SNMP_V3_PRIV_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/core/test_mem.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/core/test_mem.h b/net/ip/lwip_base/test/unit/core/test_mem.h
index 325134c..450bbd7 100644
--- a/net/ip/lwip_base/test/unit/core/test_mem.h
+++ b/net/ip/lwip_base/test/unit/core/test_mem.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite *mem_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/core/test_pbuf.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/core/test_pbuf.h b/net/ip/lwip_base/test/unit/core/test_pbuf.h
index da7730a..bdb7799 100644
--- a/net/ip/lwip_base/test/unit/core/test_pbuf.h
+++ b/net/ip/lwip_base/test/unit/core/test_pbuf.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite *pbuf_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/dhcp/test_dhcp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/dhcp/test_dhcp.h b/net/ip/lwip_base/test/unit/dhcp/test_dhcp.h
index 0d88fa1..00021f2 100644
--- a/net/ip/lwip_base/test/unit/dhcp/test_dhcp.h
+++ b/net/ip/lwip_base/test/unit/dhcp/test_dhcp.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite* dhcp_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/etharp/test_etharp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/etharp/test_etharp.h b/net/ip/lwip_base/test/unit/etharp/test_etharp.h
index 2dd772d..61742ec 100644
--- a/net/ip/lwip_base/test/unit/etharp/test_etharp.h
+++ b/net/ip/lwip_base/test/unit/etharp/test_etharp.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite* etharp_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/lwip_check.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/lwip_check.h b/net/ip/lwip_base/test/unit/lwip_check.h
index 0c218d1..6946915 100644
--- a/net/ip/lwip_base/test/unit/lwip_check.h
+++ b/net/ip/lwip_base/test/unit/lwip_check.h
@@ -1,6 +1,10 @@
 #ifndef LWIP_HDR_LWIP_CHECK_H
 #define LWIP_HDR_LWIP_CHECK_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Common header file for lwIP unit tests using the check framework */
 
 #include <config.h>
@@ -34,4 +38,8 @@ Suite* create_suite(const char* name, testfunc *tests, size_t num_tests, SFun se
 int lwip_unittests_run(void)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_LWIP_CHECK_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/lwipopts.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/lwipopts.h b/net/ip/lwip_base/test/unit/lwipopts.h
index 25252b4..47ade69 100644
--- a/net/ip/lwip_base/test/unit/lwipopts.h
+++ b/net/ip/lwip_base/test/unit/lwipopts.h
@@ -32,6 +32,10 @@
 #ifndef LWIP_HDR_LWIPOPTS_H
 #define LWIP_HDR_LWIPOPTS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Prevent having to link sys_arch.c (we don't test the API layers in unit tests) */
 #define NO_SYS                          1
 #define SYS_LIGHTWEIGHT_PROT            0
@@ -59,4 +63,8 @@
 /* Minimal changes to opt.h required for etharp unit tests: */
 #define ETHARP_SUPPORT_STATIC_ENTRIES   1
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LWIP_HDR_LWIPOPTS_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/mdns/test_mdns.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/mdns/test_mdns.h b/net/ip/lwip_base/test/unit/mdns/test_mdns.h
index c3df339..413ee82 100644
--- a/net/ip/lwip_base/test/unit/mdns/test_mdns.h
+++ b/net/ip/lwip_base/test/unit/mdns/test_mdns.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite* mdns_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/tcp/tcp_helper.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/tcp/tcp_helper.h b/net/ip/lwip_base/test/unit/tcp/tcp_helper.h
index 0497481..f666249 100644
--- a/net/ip/lwip_base/test/unit/tcp/tcp_helper.h
+++ b/net/ip/lwip_base/test/unit/tcp/tcp_helper.h
@@ -6,6 +6,10 @@
 #include "lwip/tcp.h"
 #include "lwip/netif.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* counters used for test_tcp_counters_* callback functions */
 struct test_tcp_counters {
   u32_t recv_calls;
@@ -49,4 +53,8 @@ void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcoun
                          ip_addr_t *ip_addr, ip_addr_t *netmask);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/tcp/test_tcp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/tcp/test_tcp.h b/net/ip/lwip_base/test/unit/tcp/test_tcp.h
index f28ee56..c6c56dd 100644
--- a/net/ip/lwip_base/test/unit/tcp/test_tcp.h
+++ b/net/ip/lwip_base/test/unit/tcp/test_tcp.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite *tcp_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/tcp/test_tcp_oos.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/tcp/test_tcp_oos.h b/net/ip/lwip_base/test/unit/tcp/test_tcp_oos.h
index 5b82013..d0b7976 100644
--- a/net/ip/lwip_base/test/unit/tcp/test_tcp_oos.h
+++ b/net/ip/lwip_base/test/unit/tcp/test_tcp_oos.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite *tcp_oos_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/lwip_base/test/unit/udp/test_udp.h
----------------------------------------------------------------------
diff --git a/net/ip/lwip_base/test/unit/udp/test_udp.h b/net/ip/lwip_base/test/unit/udp/test_udp.h
index 5426bf4..783739c 100644
--- a/net/ip/lwip_base/test/unit/udp/test_udp.h
+++ b/net/ip/lwip_base/test/unit/udp/test_udp.h
@@ -3,6 +3,14 @@
 
 #include "../lwip_check.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 Suite* udp_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/mn_socket/include/mn_socket/arch/sim/native_sock.h
----------------------------------------------------------------------
diff --git a/net/ip/mn_socket/include/mn_socket/arch/sim/native_sock.h b/net/ip/mn_socket/include/mn_socket/arch/sim/native_sock.h
index 66e8016..9ae3880 100644
--- a/net/ip/mn_socket/include/mn_socket/arch/sim/native_sock.h
+++ b/net/ip/mn_socket/include/mn_socket/arch/sim/native_sock.h
@@ -20,6 +20,14 @@
 #ifndef __NATIVE_SOCK_H_
 #define __NATIVE_SOCK_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int native_sock_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __NATIVE_SOCK_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/mn_socket/include/mn_socket/mn_socket.h
----------------------------------------------------------------------
diff --git a/net/ip/mn_socket/include/mn_socket/mn_socket.h b/net/ip/mn_socket/include/mn_socket/mn_socket.h
index 1c1d9d6..39355d9 100644
--- a/net/ip/mn_socket/include/mn_socket/mn_socket.h
+++ b/net/ip/mn_socket/include/mn_socket/mn_socket.h
@@ -21,6 +21,10 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Address/protocol family.
  */
@@ -216,4 +220,8 @@ struct mn_itf_addr {
 int mn_itf_getnext(struct mn_itf *);
 int mn_itf_addr_getnext(struct mn_itf *, struct mn_itf_addr *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SYS_MN_SOCKET_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/mn_socket/include/mn_socket/mn_socket_ops.h
----------------------------------------------------------------------
diff --git a/net/ip/mn_socket/include/mn_socket/mn_socket_ops.h b/net/ip/mn_socket/include/mn_socket/mn_socket_ops.h
index 39f11c1..ddcaed0 100644
--- a/net/ip/mn_socket/include/mn_socket/mn_socket_ops.h
+++ b/net/ip/mn_socket/include/mn_socket/mn_socket_ops.h
@@ -21,6 +21,10 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Interface for socket providers.
  * - mso_create() creates a socket, memory allocation has to be done by
@@ -82,4 +86,8 @@ mn_socket_newconn(struct mn_socket *s, struct mn_socket *new)
     }
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SYS_MN_SOCKET_OPS_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/mn_socket/src/arch/sim/native_sock_priv.h
----------------------------------------------------------------------
diff --git a/net/ip/mn_socket/src/arch/sim/native_sock_priv.h b/net/ip/mn_socket/src/arch/sim/native_sock_priv.h
index 108cbeb..6f75cc2 100644
--- a/net/ip/mn_socket/src/arch/sim/native_sock_priv.h
+++ b/net/ip/mn_socket/src/arch/sim/native_sock_priv.h
@@ -20,6 +20,10 @@
 #ifndef __NATIVE_SOCK_PRIV_H_
 #define __NATIVE_SOCK_PRIV_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct mn_itf;
 struct mn_itf_addr;
 
@@ -29,4 +33,8 @@ int native_sock_itf_addr(int idx, uint32_t *addr);
 
 int native_sock_err_to_mn_err(int err);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/ip/src/ip_priv.h
----------------------------------------------------------------------
diff --git a/net/ip/src/ip_priv.h b/net/ip/src/ip_priv.h
index f1c86b6..a54faa7 100644
--- a/net/ip/src/ip_priv.h
+++ b/net/ip/src/ip_priv.h
@@ -20,6 +20,10 @@
 #ifndef __IP_PRIV_H__
 #define __IP_PRIV_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct mn_itf;
 struct mn_itf_addr;
 int lwip_itf_getnext(struct mn_itf *mi);
@@ -27,4 +31,8 @@ int lwip_itf_addr_getnext(struct mn_itf *mi, struct mn_itf_addr *mia);
 
 int lwip_socket_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __IP_PRIV_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_hw.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_hw.h b/net/nimble/controller/include/controller/ble_hw.h
index da425de..a4db230 100644
--- a/net/nimble/controller/include/controller/ble_hw.h
+++ b/net/nimble/controller/include/controller/ble_hw.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_HW_
 #define H_BLE_HW_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(ARCH_sim)
 #define BLE_USES_HW_WHITELIST   (0)
 #else
@@ -97,4 +101,8 @@ void ble_hw_resolv_list_disable(void);
 /* Returns index of resolved address; -1 if not resolved */
 int ble_hw_resolv_list_match(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_HW_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll.h b/net/nimble/controller/include/controller/ble_ll.h
index 93bdef8..a4df677 100644
--- a/net/nimble/controller/include/controller/ble_ll.h
+++ b/net/nimble/controller/include/controller/ble_ll.h
@@ -25,6 +25,10 @@
 #include "os/os_eventq.h"
 #include "nimble/nimble_opt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Controller revision. */
 #define BLE_LL_SUB_VERS_NR      (0x0000)
 
@@ -429,4 +433,8 @@ extern uint32_t g_bletest_IVm;
 extern uint32_t g_bletest_IVs;
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_LL_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_adv.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_adv.h b/net/nimble/controller/include/controller/ble_ll_adv.h
index 8d9a16d..ba6af02 100644
--- a/net/nimble/controller/include/controller/ble_ll_adv.h
+++ b/net/nimble/controller/include/controller/ble_ll_adv.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_LL_ADV_
 #define H_BLE_LL_ADV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * ADV event timing
  *      T_advEvent = advInterval + advDelay
@@ -165,4 +169,8 @@ void ble_ll_adv_halt(void);
 /* Called to determine if advertising is enabled */
 uint8_t ble_ll_adv_enabled(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_LL_ADV_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_conn.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_conn.h b/net/nimble/controller/include/controller/ble_ll_conn.h
index 0b15d06..c14bd99 100644
--- a/net/nimble/controller/include/controller/ble_ll_conn.h
+++ b/net/nimble/controller/include/controller/ble_ll_conn.h
@@ -27,6 +27,10 @@
 #include "controller/ble_ll_ctrl.h"
 #include "hal/hal_cputime.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Roles */
 #define BLE_LL_CONN_ROLE_NONE           (0)
 #define BLE_LL_CONN_ROLE_MASTER         (1)
@@ -280,4 +284,8 @@ struct ble_ll_conn_sm
  */
 struct ble_ll_conn_sm *ble_ll_conn_find_active_conn(uint16_t handle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_LL_CONN_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_ctrl.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_ctrl.h b/net/nimble/controller/include/controller/ble_ll_ctrl.h
index 1d30749..1154740 100644
--- a/net/nimble/controller/include/controller/ble_ll_ctrl.h
+++ b/net/nimble/controller/include/controller/ble_ll_ctrl.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_LL_CTRL_
 #define H_BLE_LL_CTRL_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * LL control procedures. This "enumeration" is not in the specification;
  * It is used to determine which LL control procedure is currently running
@@ -250,4 +254,8 @@ void ble_ll_hci_ev_databuf_overflow(void);
 
 void ble_ll_calc_session_key(struct ble_ll_conn_sm *connsm);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_LL_CTRL_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_hci.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_hci.h b/net/nimble/controller/include/controller/ble_ll_hci.h
index e3a7e3e..b497296 100644
--- a/net/nimble/controller/include/controller/ble_ll_hci.h
+++ b/net/nimble/controller/include/controller/ble_ll_hci.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_LL_HCI_
 #define H_BLE_LL_HCI_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* For supported commands */
 #define BLE_LL_SUPP_CMD_LEN (36)
 extern const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN];
@@ -52,4 +56,8 @@ int ble_ll_hci_event_send(uint8_t *evbuf);
 int ble_ll_hci_send_noop(void);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_LL_HCI_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_resolv.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_resolv.h b/net/nimble/controller/include/controller/ble_ll_resolv.h
index 6c63c79..dbdbd78 100644
--- a/net/nimble/controller/include/controller/ble_ll_resolv.h
+++ b/net/nimble/controller/include/controller/ble_ll_resolv.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_LL_RESOLV_
 #define H_BLE_LL_RESOLV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * An entry in the resolving list.
  *      The identity address is stored in little endian format.
@@ -90,4 +94,8 @@ int ble_ll_resolv_rpa(uint8_t *rpa, uint8_t *irk);
 /* Initialize resolv*/
 void ble_ll_resolv_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/net/nimble/controller/include/controller/ble_ll_scan.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll_scan.h b/net/nimble/controller/include/controller/ble_ll_scan.h
index 3b935f4..7d86102 100644
--- a/net/nimble/controller/include/controller/ble_ll_scan.h
+++ b/net/nimble/controller/include/controller/ble_ll_scan.h
@@ -23,6 +23,10 @@
 #include "controller/ble_ll_sched.h"
 #include "hal/hal_cputime.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * SCAN_REQ
  *      -> ScanA    (6 bytes)
@@ -139,4 +143,8 @@ void ble_ll_scan_chk_resume(void);
 /* Called when wait for response timer expires in scanning mode */
 void ble_ll_scan_wfr_timer_exp(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_LL_SCAN_ */