-
Notifications
You must be signed in to change notification settings - Fork 0
/
Debug.h
37 lines (26 loc) · 1.14 KB
/
Debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*! @file Debug.h
The definition are used to call the main funcion limited to its contest.\n
Commenting definition you should disable debug.\n
@author Ing. M.Lampugnani
@par Company:
MyCompany
@version 0.0.1-RF brach
@date 31th july 2011 */
#ifndef DEBUG_H
#define DEBUG_H
#define DBGp(lvlDBG, fmt, ... ) p(lvlDBG, fmt, __VA_ARGS__ )
#define DBGp_ERR(lvlDBG, fmt, ... ) DBGp(lvlDBG, fmt, __VA_ARGS__ )
#define DBGp_COM(lvlDBG, fmt, ... ) DBGp(lvlDBG, fmt, __VA_ARGS__ )
#define DBGp_PS(lvlDBG, fmt, ... ) DBGp(lvlDBG, fmt, __VA_ARGS__ )
#define DBGp_ETH(lvlDBG, fmt, ... ) DBGp(lvlDBG, fmt, __VA_ARGS__ )
#define DBGp_LDR(lvlDBG, fmt, ... ) DBGp(lvlDBG, fmt, __VA_ARGS__ )
#define DBGp_TEMP(lvlDBG, fmt, ... ) DBGp(lvlDBG, fmt, __VA_ARGS__ )
//! Definition of default level debug
#define DEBUG 9
//! Actual system level debug
/*! This can be changed on the fly using serial command.\n
eg. dbg_l00000.\n
0 < l < 9 */
extern unsigned int debugL; // = DEBUG;
extern void p(unsigned int lvlDBG, char *fmt, ... );
#endif