Gleb Klochkov / Mbed OS Climatcontroll_Main

Dependencies:   esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers fnet_debug.h Source File

fnet_debug.h

00001 /**************************************************************************
00002 *
00003 * Copyright (c) 2017, Arm Limited and affiliates.
00004 * Copyright 2011-2016 by Andrey Butok. FNET Community.
00005 * Copyright 2008-2010 by Andrey Butok. Freescale Semiconductor, Inc.
00006 *
00007 ***************************************************************************
00008 *
00009 *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00010 *  not use this file except in compliance with the License.
00011 *  You may obtain a copy of the License at
00012 *
00013 *  http://www.apache.org/licenses/LICENSE-2.0
00014 *
00015 *  Unless required by applicable law or agreed to in writing, software
00016 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00017 *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018 *  See the License for the specific language governing permissions and
00019 *  limitations under the License.
00020 *
00021 **********************************************************************/
00022 /*!
00023 * @brief Private. Debug definitions.
00024 *
00025 ***************************************************************************/
00026 
00027 #ifndef _FNET_DEBUG_H_
00028 
00029 #define _FNET_DEBUG_H_
00030 
00031 /* Enable nanomesh traces based on FNET flag */
00032 #if FNET_CFG_DEBUG
00033 #ifndef HAVE_DEBUG
00034 #define HAVE_DEBUG
00035 #endif
00036 #endif
00037 
00038 #include "ns_trace.h"
00039 #define TRACE_GROUP "mDNS"
00040 
00041 #if defined(__cplusplus)
00042 extern "C" {
00043 #endif
00044 
00045 #if FNET_CFG_DEBUG
00046 #if 0
00047 #define FNET_DEBUG(...) fnet_println(__VA_ARGS__)
00048 #else
00049 // Nanomesh trace environment
00050 #define FNET_DEBUG(...) tr_debug(__VA_ARGS__)
00051 #define fnet_print(...) tr_info(__VA_ARGS__)
00052 #define fnet_prinln(...) tr_debug("");
00053 #endif
00054 
00055 #if FNET_CFG_DEBUG_STACK && FNET_CFG_DEBUG
00056 extern fnet_size_t fnet_dbg_stack_max;
00057 #endif
00058 
00059 #else
00060 
00061 #define FNET_DEBUG(...) do{}while(0)
00062 
00063 #endif
00064 
00065 #if defined(__cplusplus)
00066 }
00067 #endif
00068 
00069 #endif