Browse Source

examples: esp_ble_mesh: move definition of globals into source file

Ivan Grokhotkov 4 years ago
parent
commit
9d3e618bc5

+ 3 - 0
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_adapter.c

@@ -7,6 +7,9 @@
 #include "esp_ble_mesh_networking_api.h"
 #include "ble_mesh_adapter.h"
 
+ble_mesh_performance_statistics_t test_perf_statistics;
+ble_mesh_node_statistics_t ble_mesh_node_statistics;
+
 esp_ble_mesh_model_t *ble_mesh_get_model(uint16_t model_id)
 {
     esp_ble_mesh_model_t *model = NULL;

+ 2 - 2
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_adapter.h

@@ -53,7 +53,7 @@ typedef struct {
     uint16_t *package_index;
     uint8_t  ttl;
 } ble_mesh_performance_statistics_t;
-ble_mesh_performance_statistics_t test_perf_statistics;
+extern ble_mesh_performance_statistics_t test_perf_statistics;
 
 typedef struct {
     uint32_t statistics;
@@ -61,7 +61,7 @@ typedef struct {
     uint16_t *package_index;
     uint32_t total_package_num;
 } ble_mesh_node_statistics_t;
-ble_mesh_node_statistics_t ble_mesh_node_statistics;
+extern ble_mesh_node_statistics_t ble_mesh_node_statistics;
 
 extern SemaphoreHandle_t ble_mesh_node_sema;