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