From bd5552faec357dff4281212afb74851f7b7e774f Mon Sep 17 00:00:00 2001 From: lly Date: Thu, 7 Jan 2021 19:17:45 +0800 Subject: [PATCH] ble_mesh: stack: Fix using wrong | for OR between macros --- .../mesh_common/include/mesh_config.h | 34 +++++++++---------- .../mesh_models/server/state_transition.c | 8 ++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_config.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_config.h index d8450bebc3..6b92e7d281 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_config.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_config.h @@ -21,31 +21,31 @@ extern "C" { #endif -#define CONFIG_BLE_MESH_GENERIC_CLIENT (CONFIG_BLE_MESH_GENERIC_ONOFF_CLI | \ - CONFIG_BLE_MESH_GENERIC_LEVEL_CLI | \ - CONFIG_BLE_MESH_GENERIC_DEF_TRANS_TIME_CLI | \ - CONFIG_BLE_MESH_GENERIC_POWER_ONOFF_CLI | \ - CONFIG_BLE_MESH_GENERIC_POWER_LEVEL_CLI | \ - CONFIG_BLE_MESH_GENERIC_BATTERY_CLI | \ - CONFIG_BLE_MESH_GENERIC_LOCATION_CLI | \ +#define CONFIG_BLE_MESH_GENERIC_CLIENT (CONFIG_BLE_MESH_GENERIC_ONOFF_CLI || \ + CONFIG_BLE_MESH_GENERIC_LEVEL_CLI || \ + CONFIG_BLE_MESH_GENERIC_DEF_TRANS_TIME_CLI || \ + CONFIG_BLE_MESH_GENERIC_POWER_ONOFF_CLI || \ + CONFIG_BLE_MESH_GENERIC_POWER_LEVEL_CLI || \ + CONFIG_BLE_MESH_GENERIC_BATTERY_CLI || \ + CONFIG_BLE_MESH_GENERIC_LOCATION_CLI || \ CONFIG_BLE_MESH_GENERIC_PROPERTY_CLI) -#define CONFIG_BLE_MESH_TIME_SCENE_CLIENT (CONFIG_BLE_MESH_TIME_CLI | \ - CONFIG_BLE_MESH_SCENE_CLI | \ +#define CONFIG_BLE_MESH_TIME_SCENE_CLIENT (CONFIG_BLE_MESH_TIME_CLI || \ + CONFIG_BLE_MESH_SCENE_CLI || \ CONFIG_BLE_MESH_SCHEDULER_CLI) -#define CONFIG_BLE_MESH_LIGHTING_CLIENT (CONFIG_BLE_MESH_LIGHT_LIGHTNESS_CLI | \ - CONFIG_BLE_MESH_LIGHT_CTL_CLI | \ - CONFIG_BLE_MESH_LIGHT_HSL_CLI | \ - CONFIG_BLE_MESH_LIGHT_XYL_CLI | \ +#define CONFIG_BLE_MESH_LIGHTING_CLIENT (CONFIG_BLE_MESH_LIGHT_LIGHTNESS_CLI || \ + CONFIG_BLE_MESH_LIGHT_CTL_CLI || \ + CONFIG_BLE_MESH_LIGHT_HSL_CLI || \ + CONFIG_BLE_MESH_LIGHT_XYL_CLI || \ CONFIG_BLE_MESH_LIGHT_LC_CLI) -#define CONFIG_BLE_MESH_SERVER_MODEL (CONFIG_BLE_MESH_GENERIC_SERVER | \ - CONFIG_BLE_MESH_SENSOR_SERVER | \ - CONFIG_BLE_MESH_TIME_SCENE_SERVER | \ +#define CONFIG_BLE_MESH_SERVER_MODEL (CONFIG_BLE_MESH_GENERIC_SERVER || \ + CONFIG_BLE_MESH_SENSOR_SERVER || \ + CONFIG_BLE_MESH_TIME_SCENE_SERVER || \ CONFIG_BLE_MESH_LIGHTING_SERVER) -#define CONFIG_BLE_MESH_BLE_COEX_SUPPORT (CONFIG_BLE_MESH_SUPPORT_BLE_ADV | \ +#define CONFIG_BLE_MESH_BLE_COEX_SUPPORT (CONFIG_BLE_MESH_SUPPORT_BLE_ADV || \ CONFIG_BLE_MESH_SUPPORT_BLE_SCAN) #ifdef __cplusplus diff --git a/components/bt/esp_ble_mesh/mesh_models/server/state_transition.c b/components/bt/esp_ble_mesh/mesh_models/server/state_transition.c index c930a80dac..627f6232cc 100644 --- a/components/bt/esp_ble_mesh/mesh_models/server/state_transition.c +++ b/components/bt/esp_ble_mesh/mesh_models/server/state_transition.c @@ -15,8 +15,8 @@ #include "model_opcode.h" #include "state_transition.h" -#if (CONFIG_BLE_MESH_GENERIC_SERVER | \ - CONFIG_BLE_MESH_TIME_SCENE_SERVER | \ +#if (CONFIG_BLE_MESH_GENERIC_SERVER || \ + CONFIG_BLE_MESH_TIME_SCENE_SERVER || \ CONFIG_BLE_MESH_LIGHTING_SERVER) /* Function to calculate Remaining Time (Start) */ @@ -1037,6 +1037,6 @@ void bt_mesh_server_start_transition(struct bt_mesh_state_transition *transition /* Messages handlers (End) */ -#endif /* (CONFIG_BLE_MESH_GENERIC_SERVER | \ - CONFIG_BLE_MESH_TIME_SCENE_SERVER | \ +#endif /* (CONFIG_BLE_MESH_GENERIC_SERVER || \ + CONFIG_BLE_MESH_TIME_SCENE_SERVER || \ CONFIG_BLE_MESH_LIGHTING_SERVER) */