nm_debug.h
Go to the documentation of this file.
1 
35 #ifndef _NM_DEBUG_H_
36 #define _NM_DEBUG_H_
37 
38 #include "bsp/include/nm_bsp.h"
40 
41 #define M2M_LOG_NONE 0
42 #define M2M_LOG_ERROR 1
43 #define M2M_LOG_INFO 2
44 #define M2M_LOG_REQ 3
45 #define M2M_LOG_DBG 4
46 
47 #if (defined __APP_APS3_CORTUS__)
48 #define M2M_LOG_LEVEL M2M_LOG_ERROR
49 #else
50 #define M2M_LOG_LEVEL M2M_LOG_REQ
51 #endif
52 
53 
54 #if !((defined __MSP430FR5739)||(defined __MCF964548__))
55 
56 #define M2M_ERR(...)
57 #define M2M_INFO(...)
58 #define M2M_REQ(...)
59 #define M2M_DBG(...)
60 
61 #if (CONF_WINC_DEBUG == 1)
62 #define M2M_PRINT(...) do{CONF_WINC_PRINTF(__VA_ARGS__);}while(0)
63 #if (M2M_LOG_LEVEL >= M2M_LOG_ERROR)
64 #undef M2M_ERR
65 #define M2M_ERR(...) do{CONF_WINC_PRINTF("(APP)(ERR)[%s][%d]",__FUNCTION__,__LINE__); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0)
66 #if (M2M_LOG_LEVEL >= M2M_LOG_INFO)
67 #undef M2M_INFO
68 #define M2M_INFO(...) do{CONF_WINC_PRINTF("(APP)(INFO)"); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0)
69 #if (M2M_LOG_LEVEL >= M2M_LOG_REQ)
70 #undef M2M_REQ
71 #define M2M_REQ(...) do{CONF_WINC_PRINTF("(APP)(R)"); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0)
72 #if (M2M_LOG_LEVEL >= M2M_LOG_DBG)
73 #undef M2M_DBG
74 #define M2M_DBG(...) do{CONF_WINC_PRINTF("(APP)(DBG)[%s][%d]",__FUNCTION__,__LINE__); CONF_WINC_PRINTF(__VA_ARGS__);CONF_WINC_PRINTF("\r");}while(0)
75 #endif
76 #endif
77 #endif
78 #endif
79 #else
80 #define M2M_ERR(...)
81 #define M2M_DBG(...)
82 #define M2M_REQ(...)
83 #define M2M_INFO(...)
84 #define M2M_PRINT(...)
85 #endif
86 #else
87 #if (!defined __MCF964548__)||(!defined __SAMD21J18A__)
88 static void M2M_ERR(const char *_format, ...) //__attribute__ ((__format__ (M2M_ERR, 1, 2)))
89 {
90 }
91 static void M2M_DBG(const char *_format, ...) //__attribute__ ((__format__ (M2M_DBG, 1, 2)))
92 {
93 }
94 static void M2M_REQ(const char *_format, ...) //__attribute__ ((__format__ (M2M_DBG, 1, 2)))
95 {
96 }
97 static void M2M_INFO(const char *_format, ...) // __attribute__ ((__format__ (M2M_INFO, 1, 2)))
98 {
99 
100 }
101 static void M2M_PRINT(const char *_format, ...) // __attribute__ ((__format__ (M2M_INFO, 1, 2)))
102 {
103 
104 }
105 static void CONF_WINC_PRINTF(const char *_format, ...)
106 {
107 }
108 #endif
109 #endif
110 
111 #endif /* _NM_DEBUG_H_ */
This module contains WINC3400 BSP APIs declarations.
#define M2M_DBG(...)
Definition: nm_debug.h:81
#define M2M_ERR(...)
Definition: nm_debug.h:80
#define CONF_WINC_PRINTF
Definition: conf_winc.h:102
#define M2M_INFO(...)
Definition: nm_debug.h:83
This module contains WINC3400 BSP APIs declarations.
#define M2M_REQ(...)
Definition: nm_debug.h:82
#define M2M_PRINT(...)
Definition: nm_debug.h:84


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:58