From 91d70cd128d9559679f6d859185553a910b1e4b3 Mon Sep 17 00:00:00 2001 From: lly Date: Fri, 10 Apr 2020 11:31:44 +0800 Subject: [PATCH] ble_mesh: Add missing #ifdef __cplusplus --- .../api/core/include/esp_ble_mesh_ble_api.h | 8 ++++++++ .../api/core/include/esp_ble_mesh_common_api.h | 8 ++++++++ .../include/esp_ble_mesh_local_data_operation_api.h | 8 ++++++++ .../api/core/include/esp_ble_mesh_low_power_api.h | 8 ++++++++ .../api/core/include/esp_ble_mesh_networking_api.h | 8 ++++++++ .../api/core/include/esp_ble_mesh_provisioning_api.h | 8 ++++++++ .../api/core/include/esp_ble_mesh_proxy_api.h | 8 ++++++++ components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h | 8 ++++++++ .../api/models/include/esp_ble_mesh_config_model_api.h | 10 +++++++++- .../models/include/esp_ble_mesh_generic_model_api.h | 8 ++++++++ .../api/models/include/esp_ble_mesh_health_model_api.h | 10 +++++++++- .../models/include/esp_ble_mesh_lighting_model_api.h | 8 ++++++++ .../api/models/include/esp_ble_mesh_sensor_model_api.h | 8 ++++++++ .../models/include/esp_ble_mesh_time_scene_model_api.h | 8 ++++++++ .../btc/include/btc_ble_mesh_config_model.h | 8 ++++++++ .../btc/include/btc_ble_mesh_generic_model.h | 8 ++++++++ .../btc/include/btc_ble_mesh_health_model.h | 8 ++++++++ .../btc/include/btc_ble_mesh_lighting_model.h | 8 ++++++++ .../bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h | 8 ++++++++ .../btc/include/btc_ble_mesh_sensor_model.h | 8 ++++++++ .../btc/include/btc_ble_mesh_time_scene_model.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_common/include/mesh_common.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_common/include/mesh_kernel.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_common/include/mesh_trace.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/access.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/adv.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/beacon.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/crypto.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/foundation.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/friend.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/include/cfg_cli.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/include/cfg_srv.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_core/include/health_cli.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_core/include/health_srv.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_core/include/mesh_access.h | 8 ++++++++ .../esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_core/include/mesh_main.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_core/include/mesh_proxy.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/lpn.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/mesh.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/net.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/prov.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_core/provisioner_main.h | 8 ++++++++ .../bt/esp_ble_mesh/mesh_core/provisioner_prov.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/proxy_client.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/proxy_server.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/settings.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/test.h | 8 ++++++++ components/bt/esp_ble_mesh/mesh_core/transport.h | 8 ++++++++ .../mesh_models/client/include/client_common.h | 8 ++++++++ .../mesh_models/client/include/generic_client.h | 8 ++++++++ .../mesh_models/client/include/lighting_client.h | 8 ++++++++ .../mesh_models/client/include/sensor_client.h | 8 ++++++++ .../mesh_models/client/include/time_scene_client.h | 8 ++++++++ .../mesh_models/common/include/model_opcode.h | 8 ++++++++ .../mesh_models/server/include/device_property.h | 8 ++++++++ .../mesh_models/server/include/generic_server.h | 8 ++++++++ .../mesh_models/server/include/lighting_server.h | 8 ++++++++ .../mesh_models/server/include/sensor_server.h | 8 ++++++++ .../mesh_models/server/include/server_common.h | 8 ++++++++ .../mesh_models/server/include/state_binding.h | 8 ++++++++ .../mesh_models/server/include/state_transition.h | 8 ++++++++ .../mesh_models/server/include/time_scene_server.h | 8 ++++++++ 63 files changed, 506 insertions(+), 2 deletions(-) diff --git a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_ble_api.h b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_ble_api.h index 0bfe4ce64..23ebca66b 100644 --- a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_ble_api.h +++ b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_ble_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief This function is called to start BLE advertising with the corresponding data * and parameters while BLE Mesh is working at the same time. @@ -54,4 +58,8 @@ esp_err_t esp_ble_mesh_start_ble_advertising(const esp_ble_mesh_ble_adv_param_t */ esp_err_t esp_ble_mesh_stop_ble_advertising(uint8_t index); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_BLE_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_common_api.h b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_common_api.h index e218c51b7..634327d3f 100644 --- a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_common_api.h +++ b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_common_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Initialize BLE Mesh module. * This API initializes provisioning capabilities and composition data information. @@ -46,4 +50,8 @@ esp_err_t esp_ble_mesh_init(esp_ble_mesh_prov_t *prov, esp_ble_mesh_comp_t *comp */ esp_err_t esp_ble_mesh_deinit(esp_ble_mesh_deinit_param_t *param); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_COMMON_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_local_data_operation_api.h b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_local_data_operation_api.h index a1b0ff00d..df8e2428a 100644 --- a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_local_data_operation_api.h +++ b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_local_data_operation_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Get the model publish period, the unit is ms. * @@ -104,4 +108,8 @@ esp_ble_mesh_model_t *esp_ble_mesh_find_sig_model(const esp_ble_mesh_elem_t *ele */ const esp_ble_mesh_comp_t *esp_ble_mesh_get_composition_data(void); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_LOCAL_DATA_OPERATION_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_low_power_api.h b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_low_power_api.h index c579b2e05..b8fea9a9e 100644 --- a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_low_power_api.h +++ b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_low_power_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable BLE Mesh device LPN functionality. * @@ -58,4 +62,8 @@ esp_err_t esp_ble_mesh_lpn_disable(bool force); */ esp_err_t esp_ble_mesh_lpn_poll(void); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_LOW_POWER_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_networking_api.h b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_networking_api.h index 0d5bcec30..c2def986f 100644 --- a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_networking_api.h +++ b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_networking_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @brief: event, event code of user-defined model events; param, parameters of user-defined model events */ typedef void (* esp_ble_mesh_model_cb_t)(esp_ble_mesh_model_cb_event_t event, esp_ble_mesh_model_cb_param_t *param); @@ -381,4 +385,8 @@ uint16_t esp_ble_mesh_provisioner_get_prov_node_count(void); */ const uint8_t *esp_ble_mesh_get_fast_prov_app_key(uint16_t net_idx, uint16_t app_idx); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_NETWORKING_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_provisioning_api.h b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_provisioning_api.h index 1caa7447e..0810990f1 100644 --- a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_provisioning_api.h +++ b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_provisioning_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @brief: event, event code of provisioning events; param, parameters of provisioning events */ typedef void (* esp_ble_mesh_prov_cb_t)(esp_ble_mesh_prov_cb_event_t event, esp_ble_mesh_prov_cb_param_t *param); @@ -367,4 +371,8 @@ esp_err_t esp_ble_mesh_set_fast_prov_info(esp_ble_mesh_fast_prov_info_t *fast_pr */ esp_err_t esp_ble_mesh_set_fast_prov_action(esp_ble_mesh_fast_prov_action_t action); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_PROVISIONING_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_proxy_api.h b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_proxy_api.h index 216a597ff..00537558c 100644 --- a/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_proxy_api.h +++ b/components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_proxy_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable advertising with Node Identity. * @@ -114,5 +118,9 @@ esp_err_t esp_ble_mesh_proxy_client_add_filter_addr(uint8_t conn_handle, esp_err_t esp_ble_mesh_proxy_client_remove_filter_addr(uint8_t conn_handle, uint16_t net_idx, uint16_t *addr, uint16_t addr_num); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_PROXY_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h b/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h index 7157fd4cf..fce832762 100644 --- a/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h +++ b/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h @@ -31,6 +31,10 @@ #define ESP_BLE_HOST_STATUS_CHECK(status) do {} while (0) #endif +#ifdef __cplusplus +extern "C" { +#endif + /*!< The maximum length of a BLE Mesh message, including Opcode, Payload and TransMIC */ #define ESP_BLE_MESH_SDU_MAX_LEN 384 @@ -2074,4 +2078,8 @@ typedef union { } server_model_update_state; /*!< Event parameter of ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT */ } esp_ble_mesh_model_cb_param_t; +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_DEFS_H_ */ diff --git a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h index 9d1785cff..06d45e9bb 100644 --- a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h +++ b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @def ESP_BLE_MESH_MODEL_CFG_SRV * * @brief Define a new Config Server Model. @@ -814,5 +818,9 @@ esp_err_t esp_ble_mesh_config_client_get_state(esp_ble_mesh_client_common_param_ esp_err_t esp_ble_mesh_config_client_set_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_cfg_client_set_state_t *set_state); -#endif /** _ESP_BLE_MESH_CONFIG_MODEL_API_H_ */ +#ifdef __cplusplus +} +#endif + +#endif /* _ESP_BLE_MESH_CONFIG_MODEL_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_generic_model_api.h b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_generic_model_api.h index 42c90714c..0f78167ec 100644 --- a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_generic_model_api.h +++ b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_generic_model_api.h @@ -21,6 +21,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @def ESP_BLE_MESH_MODEL_GEN_ONOFF_CLI * * @brief Define a new Generic OnOff Client Model. @@ -1293,5 +1297,9 @@ typedef void (* esp_ble_mesh_generic_server_cb_t)(esp_ble_mesh_generic_server_cb */ esp_err_t esp_ble_mesh_register_generic_server_callback(esp_ble_mesh_generic_server_cb_t callback); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_GENERIC_MODEL_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_health_model_api.h b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_health_model_api.h index f0836756e..e46ae79e3 100644 --- a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_health_model_api.h +++ b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_health_model_api.h @@ -17,6 +17,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @def ESP_BLE_MESH_MODEL_HEALTH_SRV * * @brief Define a new Health Server Model. @@ -403,4 +407,8 @@ esp_err_t esp_ble_mesh_health_client_set_state(esp_ble_mesh_client_common_param_ */ esp_err_t esp_ble_mesh_health_server_fault_update(esp_ble_mesh_elem_t *element); -#endif /** _ESP_BLE_MESH_HEALTH_MODEL_API_H_ */ +#ifdef __cplusplus +} +#endif + +#endif /* _ESP_BLE_MESH_HEALTH_MODEL_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_lighting_model_api.h b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_lighting_model_api.h index ff08cfcc0..5a668a264 100644 --- a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_lighting_model_api.h +++ b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_lighting_model_api.h @@ -21,6 +21,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @def ESP_BLE_MESH_MODEL_LIGHT_LIGHTNESS_CLI * * @brief Define a new Light Lightness Client Model. @@ -1671,5 +1675,9 @@ typedef void (* esp_ble_mesh_lighting_server_cb_t)(esp_ble_mesh_lighting_server_ */ esp_err_t esp_ble_mesh_register_lighting_server_callback(esp_ble_mesh_lighting_server_cb_t callback); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_LIGHTING_MODEL_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h index 52bc082dd..07f622e5f 100644 --- a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h +++ b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h @@ -21,6 +21,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @def ESP_BLE_MESH_MODEL_SENSOR_CLI * * @brief Define a new Sensor Client Model. @@ -621,6 +625,10 @@ typedef void (* esp_ble_mesh_sensor_server_cb_t)(esp_ble_mesh_sensor_server_cb_e */ esp_err_t esp_ble_mesh_register_sensor_server_callback(esp_ble_mesh_sensor_server_cb_t callback); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_SENSOR_MODEL_API_H_ */ diff --git a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_time_scene_model_api.h b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_time_scene_model_api.h index 525fe3a88..91478fe45 100644 --- a/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_time_scene_model_api.h +++ b/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_time_scene_model_api.h @@ -21,6 +21,10 @@ #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @def ESP_BLE_MESH_MODEL_TIME_CLI * * @brief Define a new Time Client Model. @@ -908,5 +912,9 @@ typedef void (* esp_ble_mesh_time_scene_server_cb_t)(esp_ble_mesh_time_scene_ser */ esp_err_t esp_ble_mesh_register_time_scene_server_callback(esp_ble_mesh_time_scene_server_cb_t callback); +#ifdef __cplusplus +} +#endif + #endif /* _ESP_BLE_MESH_TIME_SCENE_MODEL_API_H_ */ diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h index f9920edbe..db37bec69 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h @@ -18,6 +18,10 @@ #include "btc/btc_manage.h" #include "esp_ble_mesh_config_model_api.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BTC_BLE_MESH_ACT_CONFIG_CLIENT_GET_STATE, BTC_BLE_MESH_ACT_CONFIG_CLIENT_SET_STATE, @@ -71,4 +75,8 @@ void bt_mesh_config_server_cb_evt_to_btc(u8_t evt_type, struct bt_mesh_msg_ctx *ctx, const u8_t *val, size_t len); +#ifdef __cplusplus +} +#endif + #endif /* _BTC_BLE_MESH_CONFIG_MODEL_H_ */ diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h index ca615a0fc..d87421dad 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h @@ -18,6 +18,10 @@ #include "btc/btc_manage.h" #include "esp_ble_mesh_generic_model_api.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BTC_BLE_MESH_ACT_GENERIC_CLIENT_GET_STATE, BTC_BLE_MESH_ACT_GENERIC_CLIENT_SET_STATE, @@ -73,4 +77,8 @@ void bt_mesh_generic_server_cb_evt_to_btc(u8_t evt_type, void btc_ble_mesh_generic_server_cb_handler(btc_msg_t *msg); +#ifdef __cplusplus +} +#endif + #endif /* _BTC_BLE_MESH_GENERIC_MODEL_H_ */ diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h index 90aba889a..91a775511 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h @@ -18,6 +18,10 @@ #include "btc/btc_manage.h" #include "esp_ble_mesh_health_model_api.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BTC_BLE_MESH_ACT_HEALTH_CLIENT_GET_STATE, BTC_BLE_MESH_ACT_HEALTH_CLIENT_SET_STATE, @@ -84,4 +88,8 @@ void btc_ble_mesh_health_server_attention_on(struct bt_mesh_model *model, u8_t t void btc_ble_mesh_health_server_attention_off(struct bt_mesh_model *model); +#ifdef __cplusplus +} +#endif + #endif /* _BTC_BLE_MESH_HEALTH_MODEL_H_ */ diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h index 97e67001a..453f2ee2c 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h @@ -18,6 +18,10 @@ #include "btc/btc_manage.h" #include "esp_ble_mesh_lighting_model_api.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BTC_BLE_MESH_ACT_LIGHTING_CLIENT_GET_STATE, BTC_BLE_MESH_ACT_LIGHTING_CLIENT_SET_STATE, @@ -74,5 +78,9 @@ void bt_mesh_lighting_server_cb_evt_to_btc(u8_t evt_type, void btc_ble_mesh_lighting_server_cb_handler(btc_msg_t *msg); +#ifdef __cplusplus +} +#endif + #endif /* _BTC_BLE_MESH_LIGHTING_MODEL_H_ */ diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h index 39690f303..8450c93ba 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h @@ -20,6 +20,10 @@ #include "provisioner_prov.h" #include "esp_ble_mesh_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BTC_BLE_MESH_ACT_MESH_INIT = 0, BTC_BLE_MESH_ACT_PROV_ENABLE, @@ -309,4 +313,8 @@ void btc_ble_mesh_model_cb_handler(btc_msg_t *msg); void btc_ble_mesh_prov_call_handler(btc_msg_t *msg); void btc_ble_mesh_prov_cb_handler(btc_msg_t *msg); +#ifdef __cplusplus +} +#endif + #endif /* _BTC_BLE_MESH_PROV_H_ */ diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h index 307cd562d..65a2af4f7 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h @@ -18,6 +18,10 @@ #include "btc/btc_manage.h" #include "esp_ble_mesh_sensor_model_api.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BTC_BLE_MESH_ACT_SENSOR_CLIENT_GET_STATE, BTC_BLE_MESH_ACT_SENSOR_CLIENT_SET_STATE, @@ -73,5 +77,9 @@ void bt_mesh_sensor_server_cb_evt_to_btc(u8_t evt_type, void btc_ble_mesh_sensor_server_cb_handler(btc_msg_t *msg); +#ifdef __cplusplus +} +#endif + #endif /* _BTC_BLE_MESH_SENSOR_MODEL_H_ */ diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h index a2df94501..7db8764b5 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h @@ -18,6 +18,10 @@ #include "btc/btc_manage.h" #include "esp_ble_mesh_time_scene_model_api.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BTC_BLE_MESH_ACT_TIME_SCENE_CLIENT_GET_STATE, BTC_BLE_MESH_ACT_TIME_SCENE_CLIENT_SET_STATE, @@ -74,5 +78,9 @@ void bt_mesh_time_scene_server_cb_evt_to_btc(u8_t evt_type, void btc_ble_mesh_time_scene_server_cb_handler(btc_msg_t *msg); +#ifdef __cplusplus +} +#endif + #endif /* _BTC_BLE_MESH_TIME_SCENE_MODEL_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_common.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_common.h index 737b8394e..e4274b0a1 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_common.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_common.h @@ -31,6 +31,10 @@ #include "mesh_access.h" +#ifdef __cplusplus +extern "C" { +#endif + #if CONFIG_BLE_MESH_ALLOC_FROM_PSRAM_FIRST #define bt_mesh_malloc(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL) #define bt_mesh_calloc(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL) @@ -87,4 +91,8 @@ void bt_mesh_mutex_lock(bt_mesh_mutex_t *mutex); void bt_mesh_mutex_unlock(bt_mesh_mutex_t *mutex); +#ifdef __cplusplus +} +#endif + #endif /* _BLE_MESH_COMMON_H_ */ \ No newline at end of file diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_kernel.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_kernel.h index e0052e528..fbe6d271e 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_kernel.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_kernel.h @@ -12,6 +12,10 @@ #include "mesh_slist.h" #include "mesh_atomic.h" +#ifdef __cplusplus +extern "C" { +#endif + /* number of nsec per usec */ #define NSEC_PER_USEC 1000 @@ -276,5 +280,9 @@ void bt_mesh_atomic_unlock(void); void bt_mesh_k_init(void); void bt_mesh_k_deinit(void); +#ifdef __cplusplus +} +#endif + #endif /* _BLE_MESH_KERNEL_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h index 821f5716c..d41da6a8c 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h @@ -11,6 +11,10 @@ #include "esp_log.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Define common tracing for all */ #ifndef LOG_LEVEL_ERROR #define LOG_LEVEL_ERROR 1 @@ -127,4 +131,8 @@ #define NET_BUF_SIMPLE_ASSERT(cond) #endif +#ifdef __cplusplus +} +#endif + #endif /* _BLE_MESH_TRACE_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/access.h b/components/bt/esp_ble_mesh/mesh_core/access.h index 944548c56..3e002686c 100644 --- a/components/bt/esp_ble_mesh/mesh_core/access.h +++ b/components/bt/esp_ble_mesh/mesh_core/access.h @@ -11,6 +11,10 @@ #include "net.h" +#ifdef __cplusplus +extern "C" { +#endif + /* bt_mesh_model.flags */ enum { BLE_MESH_MOD_BIND_PENDING = BIT(0), @@ -74,4 +78,8 @@ size_t bt_mesh_rx_appkey_size(void); struct bt_mesh_app_key *bt_mesh_rx_appkey_get(size_t index); +#ifdef __cplusplus +} +#endif + #endif /* _ACCESS_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/adv.h b/components/bt/esp_ble_mesh/mesh_core/adv.h index 492ca2873..dc8649d13 100644 --- a/components/bt/esp_ble_mesh/mesh_core/adv.h +++ b/components/bt/esp_ble_mesh/mesh_core/adv.h @@ -13,6 +13,10 @@ #include "mesh_access.h" #include "mesh_bearer_adapt.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Maximum advertising data payload for a single data type */ #define BLE_MESH_ADV_DATA_SIZE 29 @@ -107,4 +111,8 @@ int bt_mesh_start_ble_advertising(const struct bt_mesh_ble_adv_param *param, int bt_mesh_stop_ble_advertising(u8_t index); #endif /* CONFIG_BLE_MESH_SUPPORT_BLE_ADV */ +#ifdef __cplusplus +} +#endif + #endif /* _ADV_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/beacon.h b/components/bt/esp_ble_mesh/mesh_core/beacon.h index 4977942e7..a7dbdd81f 100644 --- a/components/bt/esp_ble_mesh/mesh_core/beacon.h +++ b/components/bt/esp_ble_mesh/mesh_core/beacon.h @@ -11,6 +11,10 @@ #include "net.h" +#ifdef __cplusplus +extern "C" { +#endif + void bt_mesh_beacon_enable(void); void bt_mesh_beacon_disable(void); @@ -24,4 +28,8 @@ void bt_mesh_beacon_create(struct bt_mesh_subnet *sub, void bt_mesh_beacon_init(void); void bt_mesh_beacon_deinit(void); +#ifdef __cplusplus +} +#endif + #endif /* _BEACON_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/crypto.h b/components/bt/esp_ble_mesh/mesh_core/crypto.h index df98c0e95..feed22613 100644 --- a/components/bt/esp_ble_mesh/mesh_core/crypto.h +++ b/components/bt/esp_ble_mesh/mesh_core/crypto.h @@ -13,6 +13,10 @@ #include #include "mesh_buf.h" +#ifdef __cplusplus +extern "C" { +#endif + struct bt_mesh_sg { const void *data; size_t len; @@ -163,4 +167,8 @@ int bt_mesh_prov_decrypt(const u8_t key[16], u8_t nonce[13], int bt_mesh_prov_encrypt(const u8_t key[16], u8_t nonce[13], const u8_t data[25], u8_t out[33]); +#ifdef __cplusplus +} +#endif + #endif /* _CRYPTO_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/foundation.h b/components/bt/esp_ble_mesh/mesh_core/foundation.h index 5e1148144..21744efdd 100644 --- a/components/bt/esp_ble_mesh/mesh_core/foundation.h +++ b/components/bt/esp_ble_mesh/mesh_core/foundation.h @@ -10,6 +10,10 @@ #include "net.h" +#ifdef __cplusplus +extern "C" { +#endif + #define OP_APP_KEY_ADD BLE_MESH_MODEL_OP_1(0x00) #define OP_APP_KEY_UPDATE BLE_MESH_MODEL_OP_1(0x01) #define OP_DEV_COMP_DATA_STATUS BLE_MESH_MODEL_OP_1(0x02) @@ -181,4 +185,8 @@ static inline void key_idx_unpack(struct net_buf_simple *buf, net_buf_simple_pull(buf, 3); } +#ifdef __cplusplus +} +#endif + #endif /* _FOUNDATION_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/friend.h b/components/bt/esp_ble_mesh/mesh_core/friend.h index 6193e0924..f595ce717 100644 --- a/components/bt/esp_ble_mesh/mesh_core/friend.h +++ b/components/bt/esp_ble_mesh/mesh_core/friend.h @@ -11,6 +11,10 @@ #include "net.h" +#ifdef __cplusplus +extern "C" { +#endif + enum bt_mesh_friend_pdu_type { BLE_MESH_FRIEND_PDU_SINGLE, BLE_MESH_FRIEND_PDU_PARTIAL, @@ -56,4 +60,8 @@ int bt_mesh_friend_deinit(void); void bt_mesh_friend_remove_lpn(u16_t lpn_addr); +#ifdef __cplusplus +} +#endif + #endif /* _FRIEND_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/cfg_cli.h b/components/bt/esp_ble_mesh/mesh_core/include/cfg_cli.h index 4d4adc6bc..873d98985 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/cfg_cli.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/cfg_cli.h @@ -20,6 +20,10 @@ * @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /* Config client model common structure */ typedef bt_mesh_client_user_data_t bt_mesh_config_client_t; typedef bt_mesh_client_internal_data_t config_internal_data_t; @@ -288,6 +292,10 @@ int bt_mesh_cfg_net_transmit_get(struct bt_mesh_msg_ctx *ctx); int bt_mesh_cfg_net_transmit_set(struct bt_mesh_msg_ctx *ctx, u8_t transmit); +#ifdef __cplusplus +} +#endif + /** * @} */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/cfg_srv.h b/components/bt/esp_ble_mesh/mesh_core/include/cfg_srv.h index 69b60c2d1..fe9843239 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/cfg_srv.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/cfg_srv.h @@ -19,6 +19,10 @@ * @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /** Mesh Configuration Server Model Context */ struct bt_mesh_cfg_srv { struct bt_mesh_model *model; @@ -207,6 +211,10 @@ typedef union { } cfg_net_transmit_set; } bt_mesh_cfg_server_state_change_t; +#ifdef __cplusplus +} +#endif + /** * @} */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/health_cli.h b/components/bt/esp_ble_mesh/mesh_core/include/health_cli.h index b2127c57a..52982eced 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/health_cli.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/health_cli.h @@ -20,6 +20,10 @@ * @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /* Health client model common structure */ typedef bt_mesh_client_user_data_t bt_mesh_health_client_t; typedef bt_mesh_client_internal_data_t health_internal_data_t; @@ -67,6 +71,10 @@ struct bt_mesh_health_fault_status { struct net_buf_simple *fault_array; }; +#ifdef __cplusplus +} +#endif + /** * @} */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/health_srv.h b/components/bt/esp_ble_mesh/mesh_core/include/health_srv.h index 71ccabef7..02a21e295 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/health_srv.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/health_srv.h @@ -19,6 +19,10 @@ * @{ */ +#ifdef __cplusplus +extern "C" { +#endif + struct bt_mesh_health_srv_cb { /* Clear registered faults */ void (*fault_clear)(struct bt_mesh_model *model, u16_t company_id); @@ -90,6 +94,10 @@ extern const struct bt_mesh_model_op bt_mesh_health_srv_op[]; int bt_mesh_fault_update(struct bt_mesh_elem *elem); +#ifdef __cplusplus +} +#endif + /** * @} */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h b/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h index 585b5719b..11a63b1d3 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h @@ -23,6 +23,10 @@ * @{ */ +#ifdef __cplusplus +extern "C" { +#endif + #define BLE_MESH_ADDR_UNASSIGNED 0x0000 #define BLE_MESH_ADDR_ALL_NODES 0xffff #define BLE_MESH_ADDR_PROXIES 0xfffc @@ -489,6 +493,10 @@ struct bt_mesh_comp { struct bt_mesh_elem *elem; }; +#ifdef __cplusplus +} +#endif + /** * @} */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h b/components/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h index 8db57e519..13e344edb 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h @@ -15,6 +15,10 @@ #include "mesh_uuid.h" #include "mesh_buf.h" +#ifdef __cplusplus +extern "C" { +#endif + /* BLE Mesh Max Connection Count */ #ifdef CONFIG_BT_BLUEDROID_ENABLED #define BLE_MESH_MAX_CONN \ @@ -813,5 +817,9 @@ enum { int bt_mesh_update_exceptional_list(u8_t sub_code, u8_t type, void *info); +#ifdef __cplusplus +} +#endif + #endif /* _BLE_MESH_BEARER_ADRPT_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/mesh_main.h b/components/bt/esp_ble_mesh/mesh_core/include/mesh_main.h index 688c3a8a6..eb5cc5533 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/mesh_main.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/mesh_main.h @@ -20,6 +20,10 @@ * @{ */ +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { BLE_MESH_NO_OUTPUT = 0, BLE_MESH_BLINK = BIT(0), @@ -629,6 +633,10 @@ void bt_mesh_lpn_set_cb(void (*cb)(u16_t friend_addr, bool established)); */ void bt_mesh_friend_set_cb(void (*cb)(bool establish, u16_t lpn_addr, u8_t reason)); +#ifdef __cplusplus +} +#endif + /** * @} */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/mesh_proxy.h b/components/bt/esp_ble_mesh/mesh_core/include/mesh_proxy.h index 0b14d9e18..5450aa328 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/mesh_proxy.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/mesh_proxy.h @@ -19,6 +19,10 @@ * @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable advertising with Node Identity. * @@ -30,6 +34,10 @@ */ int bt_mesh_proxy_identity_enable(void); +#ifdef __cplusplus +} +#endif + /** * @} */ diff --git a/components/bt/esp_ble_mesh/mesh_core/lpn.h b/components/bt/esp_ble_mesh/mesh_core/lpn.h index 45573661a..97ba92955 100644 --- a/components/bt/esp_ble_mesh/mesh_core/lpn.h +++ b/components/bt/esp_ble_mesh/mesh_core/lpn.h @@ -11,6 +11,10 @@ #include "net.h" +#ifdef __cplusplus +extern "C" { +#endif + int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx, struct net_buf_simple *buf); int bt_mesh_lpn_friend_offer(struct bt_mesh_net_rx *rx, @@ -67,4 +71,8 @@ void bt_mesh_lpn_disable(bool force); int bt_mesh_lpn_init(void); int bt_mesh_lpn_deinit(void); +#ifdef __cplusplus +} +#endif + #endif /* _LPN_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/mesh.h b/components/bt/esp_ble_mesh/mesh_core/mesh.h index 75c89584d..5a409a891 100644 --- a/components/bt/esp_ble_mesh/mesh_core/mesh.h +++ b/components/bt/esp_ble_mesh/mesh_core/mesh.h @@ -11,6 +11,10 @@ #include "net.h" +#ifdef __cplusplus +extern "C" { +#endif + #define BLE_MESH_KEY_PRIMARY 0x0000 #define BLE_MESH_KEY_ANY 0xffff @@ -21,4 +25,8 @@ struct bt_mesh_net; +#ifdef __cplusplus +} +#endif + #endif /* _MESH_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/net.h b/components/bt/esp_ble_mesh/mesh_core/net.h index abdb57450..30ab45440 100644 --- a/components/bt/esp_ble_mesh/mesh_core/net.h +++ b/components/bt/esp_ble_mesh/mesh_core/net.h @@ -12,6 +12,10 @@ #include "mesh_access.h" +#ifdef __cplusplus +extern "C" { +#endif + #define BLE_MESH_NET_FLAG_KR BIT(0) #define BLE_MESH_NET_FLAG_IVU BIT(1) @@ -417,4 +421,8 @@ static inline void send_cb_finalize(const struct bt_mesh_send_cb *cb, } } +#ifdef __cplusplus +} +#endif + #endif /* _NET_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/prov.h b/components/bt/esp_ble_mesh/mesh_core/prov.h index 782d86921..a1872bd84 100644 --- a/components/bt/esp_ble_mesh/mesh_core/prov.h +++ b/components/bt/esp_ble_mesh/mesh_core/prov.h @@ -12,6 +12,10 @@ #include "mesh_main.h" #include "mesh_bearer_adapt.h" +#ifdef __cplusplus +extern "C" { +#endif + void bt_mesh_pb_adv_recv(struct net_buf_simple *buf); bool bt_prov_active(void); @@ -31,4 +35,8 @@ int bt_mesh_prov_deinit(void); void bt_mesh_prov_complete(u16_t net_idx, const u8_t net_key[16], u16_t addr, u8_t flags, u32_t iv_index); void bt_mesh_prov_reset(void); +#ifdef __cplusplus +} +#endif + #endif /* _PROV_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/provisioner_main.h b/components/bt/esp_ble_mesh/mesh_core/provisioner_main.h index 1d6f48a01..79cdbb4e9 100644 --- a/components/bt/esp_ble_mesh/mesh_core/provisioner_main.h +++ b/components/bt/esp_ble_mesh/mesh_core/provisioner_main.h @@ -18,6 +18,10 @@ #include "net.h" #include "mesh_bearer_adapt.h" +#ifdef __cplusplus +extern "C" { +#endif + #define BLE_MESH_INVALID_NODE_INDEX 0xFFFF #define BLE_MESH_NODE_NAME_SIZE 31 @@ -138,4 +142,8 @@ const u8_t *bt_mesh_get_fast_prov_net_key(u16_t net_idx); const u8_t *bt_mesh_get_fast_prov_app_key(u16_t net_idx, u16_t app_idx); +#ifdef __cplusplus +} +#endif + #endif /* _PROVISIONER_MAIN_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.h b/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.h index 7642e2c8e..d5dd9fb8f 100644 --- a/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.h +++ b/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.h @@ -18,6 +18,10 @@ #include "mesh_main.h" #include "mesh_bearer_adapt.h" +#ifdef __cplusplus +extern "C" { +#endif + #if !CONFIG_BLE_MESH_PROVISIONER #define CONFIG_BLE_MESH_PBA_SAME_TIME 0 @@ -413,4 +417,8 @@ u8_t bt_mesh_set_fast_prov_unicast_addr_range(u16_t min, u16_t max); */ void bt_mesh_set_fast_prov_flags_iv_index(u8_t flags, u32_t iv_index); +#ifdef __cplusplus +} +#endif + #endif /* _PROVISIONER_PROV_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/proxy_client.h b/components/bt/esp_ble_mesh/mesh_core/proxy_client.h index 18943f824..5ca3ea703 100644 --- a/components/bt/esp_ble_mesh/mesh_core/proxy_client.h +++ b/components/bt/esp_ble_mesh/mesh_core/proxy_client.h @@ -18,6 +18,10 @@ #include "net.h" #include "mesh_bearer_adapt.h" +#ifdef __cplusplus +extern "C" { +#endif + #define BLE_MESH_PROXY_ADV_NET_ID 0x00 #define BLE_MESH_PROXY_ADV_NODE_ID 0x01 @@ -100,4 +104,8 @@ int bt_mesh_proxy_client_send_cfg(u8_t conn_handle, u16_t net_idx, struct bt_mes int bt_mesh_proxy_prov_client_init(void); int bt_mesh_proxy_prov_client_deinit(void); +#ifdef __cplusplus +} +#endif + #endif /* _PROXY_CLIENT_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/proxy_server.h b/components/bt/esp_ble_mesh/mesh_core/proxy_server.h index df4a73eda..724561f41 100644 --- a/components/bt/esp_ble_mesh/mesh_core/proxy_server.h +++ b/components/bt/esp_ble_mesh/mesh_core/proxy_server.h @@ -13,6 +13,10 @@ #include "net.h" #include "mesh_bearer_adapt.h" +#ifdef __cplusplus +extern "C" { +#endif + #define BLE_MESH_PROXY_NET_PDU 0x00 #define BLE_MESH_PROXY_BEACON 0x01 #define BLE_MESH_PROXY_CONFIG 0x02 @@ -62,4 +66,8 @@ void bt_mesh_proxy_addr_add(struct net_buf_simple *buf, u16_t addr); int bt_mesh_proxy_init(void); int bt_mesh_proxy_deinit(void); +#ifdef __cplusplus +} +#endif + #endif /* _PROXY_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/settings.h b/components/bt/esp_ble_mesh/mesh_core/settings.h index a02db9e55..ba60d4c96 100644 --- a/components/bt/esp_ble_mesh/mesh_core/settings.h +++ b/components/bt/esp_ble_mesh/mesh_core/settings.h @@ -10,6 +10,10 @@ #include "net.h" #include "provisioner_main.h" +#ifdef __cplusplus +extern "C" { +#endif + int settings_core_init(void); int settings_core_load(void); int settings_core_commit(void); @@ -58,4 +62,8 @@ void bt_mesh_store_node_comp_data(struct bt_mesh_node *node, bool prov); int bt_mesh_settings_init(void); int bt_mesh_settings_deinit(void); +#ifdef __cplusplus +} +#endif + #endif /* _SETTINGS_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/test.h b/components/bt/esp_ble_mesh/mesh_core/test.h index 4b5c59706..ffb054f3c 100644 --- a/components/bt/esp_ble_mesh/mesh_core/test.h +++ b/components/bt/esp_ble_mesh/mesh_core/test.h @@ -12,6 +12,10 @@ #include "mesh_bearer_adapt.h" +#ifdef __cplusplus +extern "C" { +#endif + int bt_mesh_test(void); struct bt_mesh_device_network_info { @@ -41,4 +45,8 @@ int bt_mesh_test_start_scanning(bool wl_en); int bt_mesh_test_stop_scanning(void); +#ifdef __cplusplus +} +#endif + #endif /* _BLE_MESH_TEST_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_core/transport.h b/components/bt/esp_ble_mesh/mesh_core/transport.h index 31356c46b..870876727 100644 --- a/components/bt/esp_ble_mesh/mesh_core/transport.h +++ b/components/bt/esp_ble_mesh/mesh_core/transport.h @@ -12,6 +12,10 @@ #include "net.h" +#ifdef __cplusplus +extern "C" { +#endif + #define TRANS_SEQ_AUTH_NVAL 0xffffffffffffffff #define BLE_MESH_TX_SDU_MAX (CONFIG_BLE_MESH_TX_SEG_MAX * 12) @@ -114,4 +118,8 @@ void bt_mesh_heartbeat_send(void); int bt_mesh_app_key_get(const struct bt_mesh_subnet *subnet, u16_t app_idx, const u8_t **key, u8_t *aid, u8_t role, u16_t dst); +#ifdef __cplusplus +} +#endif + #endif /* _TRANSPORT_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/client/include/client_common.h b/components/bt/esp_ble_mesh/mesh_models/client/include/client_common.h index ddf743b32..a39bcb542 100644 --- a/components/bt/esp_ble_mesh/mesh_models/client/include/client_common.h +++ b/components/bt/esp_ble_mesh/mesh_models/client/include/client_common.h @@ -17,6 +17,10 @@ #include "mesh_access.h" +#ifdef __cplusplus +extern "C" { +#endif + /** Client model opcode pair table */ typedef struct { u32_t cli_op; /* Client message opcode */ @@ -127,5 +131,9 @@ typedef struct { */ int bt_mesh_set_client_model_role(bt_mesh_role_param_t *common); +#ifdef __cplusplus +} +#endif + #endif /* _CLIENT_COMMON_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/client/include/generic_client.h b/components/bt/esp_ble_mesh/mesh_models/client/include/generic_client.h index ddee425ac..eeda99fc3 100644 --- a/components/bt/esp_ble_mesh/mesh_models/client/include/generic_client.h +++ b/components/bt/esp_ble_mesh/mesh_models/client/include/generic_client.h @@ -21,6 +21,10 @@ #include "client_common.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Generic client model common structure */ typedef bt_mesh_client_user_data_t bt_mesh_generic_client_t; typedef bt_mesh_client_internal_data_t generic_internal_data_t; @@ -566,4 +570,8 @@ int bt_mesh_generic_client_get_state(bt_mesh_client_common_param_t *common, void */ int bt_mesh_generic_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status); +#ifdef __cplusplus +} +#endif + #endif /* _GENERIC_CLIENT_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/client/include/lighting_client.h b/components/bt/esp_ble_mesh/mesh_models/client/include/lighting_client.h index 309a7c57e..7867f10ad 100644 --- a/components/bt/esp_ble_mesh/mesh_models/client/include/lighting_client.h +++ b/components/bt/esp_ble_mesh/mesh_models/client/include/lighting_client.h @@ -21,6 +21,10 @@ #include "client_common.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Light client model common structure */ typedef bt_mesh_client_user_data_t bt_mesh_light_client_t; typedef bt_mesh_client_internal_data_t light_internal_data_t; @@ -536,4 +540,8 @@ int bt_mesh_light_client_get_state(bt_mesh_client_common_param_t *common, void * */ int bt_mesh_light_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status); +#ifdef __cplusplus +} +#endif + #endif /* _LIGHTING_CLIENT_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/client/include/sensor_client.h b/components/bt/esp_ble_mesh/mesh_models/client/include/sensor_client.h index 046e09916..135eaf799 100644 --- a/components/bt/esp_ble_mesh/mesh_models/client/include/sensor_client.h +++ b/components/bt/esp_ble_mesh/mesh_models/client/include/sensor_client.h @@ -21,6 +21,10 @@ #include "client_common.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Sensor Client Model Context */ extern const struct bt_mesh_model_op sensor_cli_op[]; @@ -171,4 +175,8 @@ int bt_mesh_sensor_client_get_state(bt_mesh_client_common_param_t *common, void */ int bt_mesh_sensor_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status); +#ifdef __cplusplus +} +#endif + #endif /* _SENSOR_CLIENT_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/client/include/time_scene_client.h b/components/bt/esp_ble_mesh/mesh_models/client/include/time_scene_client.h index de978d011..11a917f41 100644 --- a/components/bt/esp_ble_mesh/mesh_models/client/include/time_scene_client.h +++ b/components/bt/esp_ble_mesh/mesh_models/client/include/time_scene_client.h @@ -21,6 +21,10 @@ #include "client_common.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Time scene client model common structure */ typedef bt_mesh_client_user_data_t bt_mesh_time_scene_client_t; typedef bt_mesh_client_internal_data_t time_scene_internal_data_t; @@ -281,4 +285,8 @@ int bt_mesh_time_scene_client_get_state(bt_mesh_client_common_param_t *common, v */ int bt_mesh_time_scene_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status); +#ifdef __cplusplus +} +#endif + #endif /* _TIME_SCENE_CLIENT_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/common/include/model_opcode.h b/components/bt/esp_ble_mesh/mesh_models/common/include/model_opcode.h index 95def6c2c..00ac913fb 100644 --- a/components/bt/esp_ble_mesh/mesh_models/common/include/model_opcode.h +++ b/components/bt/esp_ble_mesh/mesh_models/common/include/model_opcode.h @@ -17,6 +17,10 @@ #include "mesh_access.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Generic OnOff Message Opcode */ #define BLE_MESH_MODEL_OP_GEN_ONOFF_GET BLE_MESH_MODEL_OP_2(0x82, 0x01) #define BLE_MESH_MODEL_OP_GEN_ONOFF_SET BLE_MESH_MODEL_OP_2(0x82, 0x02) @@ -273,4 +277,8 @@ #define BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_SET_UNACK BLE_MESH_MODEL_OP_1(0x63) #define BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_STATUS BLE_MESH_MODEL_OP_1(0x64) +#ifdef __cplusplus +} +#endif + #endif /* _MODEL_OPCODE_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/device_property.h b/components/bt/esp_ble_mesh/mesh_models/server/include/device_property.h index 4f69a4428..833eadbf1 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/device_property.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/device_property.h @@ -17,6 +17,10 @@ #include "mesh_types.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * BLE Mesh Device Properties. * @@ -1042,4 +1046,8 @@ typedef u16_t bt_mesh_volume_flow_t; u8_t bt_mesh_get_dev_prop_len(u16_t prop_id); +#ifdef __cplusplus +} +#endif + #endif /* _DEVICE_PROPERTY_H_ */ \ No newline at end of file diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/generic_server.h b/components/bt/esp_ble_mesh/mesh_models/server/include/generic_server.h index 4ab53edda..241f1112a 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/generic_server.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/generic_server.h @@ -11,6 +11,10 @@ #include "server_common.h" +#ifdef __cplusplus +extern "C" { +#endif + struct bt_mesh_gen_onoff_state { u8_t onoff; u8_t target_onoff; @@ -386,4 +390,8 @@ int bt_mesh_gen_admin_prop_srv_deinit(struct bt_mesh_model *model, bool primary) int bt_mesh_gen_manu_prop_srv_deinit(struct bt_mesh_model *model, bool primary); int bt_mesh_gen_client_prop_srv_deinit(struct bt_mesh_model *model, bool primary); +#ifdef __cplusplus +} +#endif + #endif /* _GENERIC_SERVER_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/lighting_server.h b/components/bt/esp_ble_mesh/mesh_models/server/include/lighting_server.h index dd39ce006..34195dd0d 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/lighting_server.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/lighting_server.h @@ -11,6 +11,10 @@ #include "server_common.h" +#ifdef __cplusplus +extern "C" { +#endif + struct bt_mesh_light_lightness_state { u16_t lightness_linear; u16_t target_lightness_linear; @@ -527,4 +531,8 @@ int bt_mesh_light_xyl_setup_srv_deinit(struct bt_mesh_model *model, bool primary int bt_mesh_light_lc_srv_deinit(struct bt_mesh_model *model, bool primary); int bt_mesh_light_lc_setup_srv_deinit(struct bt_mesh_model *model, bool primary); +#ifdef __cplusplus +} +#endif + #endif /* _LIGHTING_SERVER_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/sensor_server.h b/components/bt/esp_ble_mesh/mesh_models/server/include/sensor_server.h index 79be44bb7..8d7d6fe06 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/sensor_server.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/sensor_server.h @@ -17,6 +17,10 @@ #include "server_common.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Sensor Property ID related */ #define INVALID_SENSOR_PROPERTY_ID 0x0000 @@ -249,4 +253,8 @@ int bt_mesh_sensor_setup_srv_init(struct bt_mesh_model *model, bool primary); int bt_mesh_sensor_srv_deinit(struct bt_mesh_model *model, bool primary); int bt_mesh_sensor_setup_srv_deinit(struct bt_mesh_model *model, bool primary); +#ifdef __cplusplus +} +#endif + #endif /* _SENSOR_SERVER_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/server_common.h b/components/bt/esp_ble_mesh/mesh_models/server/include/server_common.h index 5647c0ea5..08d6437b8 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/server_common.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/server_common.h @@ -19,6 +19,10 @@ #include #include "mesh_access.h" +#ifdef __cplusplus +extern "C" { +#endif + #define BLE_MESH_SERVER_RSP_MAX_LEN 384 #define BLE_MESH_SERVER_TRANS_MIC_SIZE 4 @@ -123,4 +127,8 @@ void bt_mesh_server_update_last_msg(struct bt_mesh_last_msg_info *last, struct net_buf_simple *bt_mesh_server_get_pub_msg(struct bt_mesh_model *model, u16_t msg_len); +#ifdef __cplusplus +} +#endif + #endif /* _SERVER_COMMON_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/state_binding.h b/components/bt/esp_ble_mesh/mesh_models/server/include/state_binding.h index 18ee04ec7..c418192c2 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/state_binding.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/state_binding.h @@ -11,6 +11,10 @@ #include "mesh_access.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { GENERIC_ONOFF_STATE, GENERIC_LEVEL_STATE, @@ -91,4 +95,8 @@ int bt_mesh_update_binding_state(struct bt_mesh_model *model, bt_mesh_server_state_type_t type, bt_mesh_server_state_value_t *value); +#ifdef __cplusplus +} +#endif + #endif /* _STATE_BINDING_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/state_transition.h b/components/bt/esp_ble_mesh/mesh_models/server/include/state_transition.h index 055192d99..163f72ef4 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/state_transition.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/state_transition.h @@ -15,6 +15,10 @@ #include "lighting_server.h" #include "time_scene_server.h" +#ifdef __cplusplus +extern "C" { +#endif + void bt_mesh_server_calc_remain_time(struct bt_mesh_state_transition *transition); /* APIs used to get server model transtion time values */ @@ -89,4 +93,8 @@ void bt_mesh_server_stop_transition(struct bt_mesh_state_transition *transition) void bt_mesh_server_start_transition(struct bt_mesh_state_transition *transition); +#ifdef __cplusplus +} +#endif + #endif /* _STATE_TRANSITION_H_ */ diff --git a/components/bt/esp_ble_mesh/mesh_models/server/include/time_scene_server.h b/components/bt/esp_ble_mesh/mesh_models/server/include/time_scene_server.h index c311da65f..4c5c721bc 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/include/time_scene_server.h +++ b/components/bt/esp_ble_mesh/mesh_models/server/include/time_scene_server.h @@ -17,6 +17,10 @@ #include "server_common.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * 1. Mesh defines times based on International Atomic Time (TAI). The base * representation of times is the number of seconds after 00:00:00 TAI @@ -395,4 +399,8 @@ int bt_mesh_scene_setup_srv_deinit(struct bt_mesh_model *model, bool primary); int bt_mesh_scheduler_srv_deinit(struct bt_mesh_model *model, bool primary); int bt_mesh_scheduler_setup_srv_deinit(struct bt_mesh_model *model, bool primary); +#ifdef __cplusplus +} +#endif + #endif /* _TIME_SCENE_SERVER_H_ */