File: debug.h

package info (click to toggle)
eagle-usb 2.1.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,108 kB
  • ctags: 2,612
  • sloc: ansic: 27,560; sh: 5,440; perl: 3,269; xml: 1,079; tcl: 915; makefile: 878
file content (71 lines) | stat: -rw-r--r-- 1,745 bytes parent folder | download
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef __DEBUG_H__

#define __DEBUG_H__

/*
 * The module mask : in Adiusbadsl.c
 */
extern unsigned int module_dbg_mask;

#ifdef __KERNEL__

/*
 * Output debug statement for module m
 */
#define eu_dbg(m,format,args...)                                \
  do                                                            \
  {                                                             \
      if ( module_dbg_mask & (m) )                              \
      {                                                         \
          printk(KERN_DEBUG"[eu - " #m "]  " format, ##args);   \
      }                                                         \
  } while (0)


/*
 * Based on dbg : enters and leaves macro
 */
#define eu_enters(m)    eu_dbg(m,"Entering %s\n",__FUNCTION__ )
#define eu_leaves(m)    eu_dbg(m,"Leaving  %s\n",__FUNCTION__ )

/*
 * Output error message (unconditionally)
 */
#define eu_err(format,args...)   printk(KERN_ERR "[EAGLE-USB] " format, ##args)

/*
 * Output warning message (unconditionally)
 */
#define eu_warn(format,args...)  printk(KERN_WARNING "[Eagle-usb] " format, ##args)

/*
 * Output informational message (unconditionally)
 */
#define eu_report(format,args...)  printk(KERN_INFO "[eagle-usb] " format, ##args)

#endif /* __KERNEL__ */

/*
 * Modules
 */

typedef enum {
    DBG_SAR     = (1<<0),
    DBG_UNI     = (1<<1),
    DBG_MPOA    = (1<<2),
    DBG_INIT    = (1<<3),
    DBG_ENET    = (1<<4),
    DBG_BOOT    = (1<<5),
    DBG_UTILS   = (1<<6),
    DBG_MSG     = (1<<7),
    DBG_SM      = (1<<8),
    DBG_READ    = (1<<9),
    DBG_INTS    = (1<<10),
    DBG_CRC     = (1<<11),
    DBG_DSP     = (1<<12),
    DBG_OAM     = (1<<13),
    DBG_ROUTEIP = (1<<14)
} dbg_sec_t;


#endif /* __DEBUG_H__ */