Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DataStore JobScheduler NetworkServices W5500Interface nanopb protocol
source/main.cpp
- Committer:
- sgnezdov
- Date:
- 2017-07-13
- Revision:
- 0:2c57ed6943f7
- Child:
- 1:eebe442fc126
File content as of revision 0:2c57ed6943f7:
#include "mbed.h" #include "mbed-trace/mbed_trace.h" #define TRACE_GROUP "main" // These are necessary only if thread safety is needed static Mutex TracingLock; static void tracingWait() { TracingLock.lock(); } static void tracingRelease() { TracingLock.unlock(); } int main() { printf("\n==Borsch==\n"); /* Setup tracing */ mbed_trace_mutex_wait_function_set( tracingWait ); // only if thread safety is needed mbed_trace_mutex_release_function_set( tracingRelease ); // only if thread safety is needed mbed_trace_init(); // initialize the trace library tr_info("**Started**"); //-> "[INFO][main]: this is an info msg" tr_debug("this is debug msg"); //-> "[DBG ][main]: this is a debug msg" tr_info("**Finished**"); //-> "[INFO][main]: this is an info msg" exit(0); }