Lorawan to Pulga
Dependencies: pulga-lorawan-drv SPI_MX25R Si1133 BME280
Diff: trace_helper.cpp
- Revision:
- 26:f07f5febf97f
- Parent:
- 17:2fc16c1d6434
diff -r 0f75546d3f3f -r f07f5febf97f trace_helper.cpp --- a/trace_helper.cpp Tue Jun 19 14:15:24 2018 +0100 +++ b/trace_helper.cpp Thu Jun 28 12:45:20 2018 +0100 @@ -20,53 +20,53 @@ * stack. The library could be made unavailable by removing FEATURE_COMMON_PAL * from the mbed_app.json to save RAM. */ -#if defined(FEATURE_COMMON_PAL) + +#include "mbed_trace.h" - #include "platform/PlatformMutex.h" - #include "mbed_trace.h" +#ifdef FEA_TRACE_SUPPORT +#include "platform/PlatformMutex.h" - /** - * Local mutex object for synchronization - */ - static PlatformMutex mutex; +/** + * Local mutex object for synchronization + */ +static PlatformMutex mutex; - static void serial_lock(); - static void serial_unlock(); +static void serial_lock(); +static void serial_unlock(); - /** - * Sets up trace for the application - * Wouldn't do anything if the FEATURE_COMMON_PAL is not added - * or if the trace is disabled using mbed_app.json - */ - void setup_trace() - { - // setting up Mbed trace. - mbed_trace_mutex_wait_function_set(serial_lock); - mbed_trace_mutex_release_function_set(serial_unlock); - mbed_trace_init(); - } +/** + * Sets up trace for the application + * Wouldn't do anything if the FEATURE_COMMON_PAL is not added + * or if the trace is disabled using mbed_app.json + */ +void setup_trace() +{ + // setting up Mbed trace. + mbed_trace_mutex_wait_function_set(serial_lock); + mbed_trace_mutex_release_function_set(serial_unlock); + mbed_trace_init(); +} - /** - * Lock provided for serial printing used by trace library - */ - static void serial_lock() - { - mutex.lock(); - } +/** + * Lock provided for serial printing used by trace library + */ +static void serial_lock() +{ + mutex.lock(); +} - /** - * Releasing lock provided for serial printing used by trace library - */ - static void serial_unlock() - { - mutex.unlock(); - } +/** + * Releasing lock provided for serial printing used by trace library + */ +static void serial_unlock() +{ + mutex.unlock(); +} +#else +void setup_trace() +{ -#else - - void setup_trace() - { - } - +} #endif +