Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/STM32WB5MM-DK/Applications/BLE/BLE_Mesh_ThermometerSensor/Core/Src/vl53l0x/vl53l0x_platform_log.c')
-rw-r--r--Projects/STM32WB5MM-DK/Applications/BLE/BLE_Mesh_ThermometerSensor/Core/Src/vl53l0x/vl53l0x_platform_log.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/Projects/STM32WB5MM-DK/Applications/BLE/BLE_Mesh_ThermometerSensor/Core/Src/vl53l0x/vl53l0x_platform_log.c b/Projects/STM32WB5MM-DK/Applications/BLE/BLE_Mesh_ThermometerSensor/Core/Src/vl53l0x/vl53l0x_platform_log.c
new file mode 100644
index 000000000..b34420d99
--- /dev/null
+++ b/Projects/STM32WB5MM-DK/Applications/BLE/BLE_Mesh_ThermometerSensor/Core/Src/vl53l0x/vl53l0x_platform_log.c
@@ -0,0 +1,59 @@
+/*
+ * COPYRIGHT (C) STMicroelectronics 2015. All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * STMicroelectronics ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with STMicroelectronics
+ *
+ * Programming Golden Rule: Keep it Simple!
+ *
+ */
+
+/*!
+ * \file VL53L0X_platform_log.c
+ * \brief Code function defintions for Ewok Platform Layer
+ *
+ */
+
+
+#include <stdio.h> // sprintf(), vsnprintf(), printf()
+#include <stdarg.h> // sprintf(), vsnprintf(), printf()
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
+#include "vl53l0x_def.h"
+#include "vl53l0x_platform_log.h"
+
+
+uint32_t _trace_level = TRACE_LEVEL_WARNING;
+uint32_t _trace_modules = TRACE_MODULE_NONE;
+uint32_t _trace_functions = TRACE_FUNCTION_NONE;
+
+#if defined(VL53L0X_LOG_ENABLE) && (TRACE_UART==1)
+int32_t VL53L0X_trace_config(char *filename, uint32_t modules, uint32_t level, uint32_t functions)
+{
+ int STATUS = 0;
+
+ _trace_functions = functions;
+ _trace_level = level;
+ _trace_modules = modules;
+
+ return STATUS;
+}
+
+
+void trace_print_module_function(uint32_t module, uint32_t level, uint32_t function, const char *format, ...)
+{
+ if ( ((level <=_trace_level) && ((module & _trace_modules) > 0))
+ || ((function & _trace_functions) > 0) )
+ {
+ va_list arg_list;
+ va_start(arg_list, format);
+ trace_vprintf( format, arg_list);
+ va_end(arg_list);
+ }
+}
+#endif