NNN50 WIFI_API library
Dependents: NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more
nm_debug.h
00001 /** 00002 * 00003 * \file 00004 * 00005 * \brief This module contains debug APIs declarations. 00006 * 00007 * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 00008 * 00009 * \asf_license_start 00010 * 00011 * \page License 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions are met: 00015 * 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 00019 * 2. Redistributions in binary form must reproduce the above copyright notice, 00020 * this list of conditions and the following disclaimer in the documentation 00021 * and/or other materials provided with the distribution. 00022 * 00023 * 3. The name of Atmel may not be used to endorse or promote products derived 00024 * from this software without specific prior written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00027 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00028 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00029 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00030 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00031 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00032 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00033 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00034 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00035 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 * POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 * \asf_license_stop 00039 * 00040 */ 00041 00042 #ifndef _NM_DEBUG_H_ 00043 #define _NM_DEBUG_H_ 00044 00045 #include "platform/mbed_error.h" 00046 #include "bsp/include/nm_bsp.h" 00047 //Tsungta #include "bsp/include/nm_bsp_internal.h" 00048 00049 /**@defgroup DebugDefines DebugDefines 00050 * @ingroup WlanDefines 00051 */ 00052 /**@{*/ 00053 00054 00055 #define M2M_LOG_NONE 0 00056 #define M2M_LOG_ERROR 1 00057 #define M2M_LOG_INFO 2 00058 #define M2M_LOG_REQ 3 00059 #define M2M_LOG_DBG 4 00060 00061 #if (defined __APS3_CORTUS__) 00062 #define M2M_LOG_LEVEL M2M_LOG_INFO 00063 #else 00064 #define M2M_LOG_LEVEL M2M_LOG_REQ 00065 #endif 00066 00067 00068 #define M2M_ERR(...)// printf 00069 #define M2M_INFO(...) 00070 #define M2M_REQ(...) 00071 #define M2M_DBG(...) 00072 #define M2M_PRINT(...) 00073 00074 #if (CONF_WINC_DEBUG == 1) 00075 #undef M2M_PRINT 00076 #define M2M_PRINT(...) do{CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0) 00077 #if (M2M_LOG_LEVEL >= M2M_LOG_ERROR) 00078 #undef M2M_ERR 00079 #define M2M_ERR(...) do{CONF_WINC_PRINTF("(APP)(ERR)[%s][%d]",__FUNCTION__,__LINE__); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0) 00080 #if (M2M_LOG_LEVEL >= M2M_LOG_INFO) 00081 #undef M2M_INFO 00082 #define M2M_INFO(...) do{CONF_WINC_PRINTF("(APP)(INFO)"); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0) 00083 #if (M2M_LOG_LEVEL >= M2M_LOG_REQ) 00084 #undef M2M_REQ 00085 #define M2M_REQ(...) do{CONF_WINC_PRINTF("(APP)(R)"); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0) 00086 #if (M2M_LOG_LEVEL >= M2M_LOG_DBG) 00087 #undef M2M_DBG 00088 #define M2M_DBG(...) do{CONF_WINC_PRINTF("(APP)(DBG)[%s][%d]",__FUNCTION__,__LINE__); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0) 00089 #endif /*M2M_LOG_DBG*/ 00090 #endif /*M2M_LOG_REQ*/ 00091 #endif /*M2M_LOG_INFO*/ 00092 #endif /*M2M_LOG_ERROR*/ 00093 #endif /*CONF_WINC_DEBUG */ 00094 00095 /**@}*/ 00096 #endif /* _NM_DEBUG_H_ */ 00097
Generated on Wed Jul 13 2022 16:32:37 by
1.7.2