Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
hpidebug.h File Reference
#include "hpi_internal.h"

Go to the source code of this file.

Macros

#define HPI_DEBUG_LEVEL_DEFAULT   HPI_DEBUG_LEVEL_NOTICE
 
#define FILE_LINE   __FILE__ ":" __stringify(__LINE__) " "
 
#define HPI_DEBUG_ASSERT(expression)
 
#define HPI_DEBUG_LOG(level,...)
 
#define HPI_DEBUG_DATA(pdata, len)
 
#define HPI_DEBUG_MESSAGE(level, phm)
 
#define HPI_DEBUG_RESPONSE(phr)
 

Enumerations

enum  {
  HPI_DEBUG_LEVEL_ERROR = 0, HPI_DEBUG_LEVEL_WARNING = 1, HPI_DEBUG_LEVEL_NOTICE = 2, HPI_DEBUG_LEVEL_INFO = 3,
  HPI_DEBUG_LEVEL_DEBUG = 4, HPI_DEBUG_LEVEL_VERBOSE = 5
}
 

Functions

void hpi_debug_init (void)
 
int hpi_debug_level_set (int level)
 
int hpi_debug_level_get (void)
 
void hpi_debug_message (struct hpi_message *phm, char *sz_fileline)
 
void hpi_debug_data (u16 *pdata, u32 len)
 

Variables

int hpi_debug_level
 

Macro Definition Documentation

#define FILE_LINE   __FILE__ ":" __stringify(__LINE__) " "

Definition at line 45 of file hpidebug.h.

#define HPI_DEBUG_ASSERT (   expression)
Value:
do { \
if (!(expression)) { \
"ASSERT " __stringify(expression)); \
} \
} while (0)

Definition at line 48 of file hpidebug.h.

#define HPI_DEBUG_DATA (   pdata,
  len 
)
Value:
do { \
hpi_debug_data(pdata, len); \
} while (0)

Definition at line 74 of file hpidebug.h.

#define HPI_DEBUG_LEVEL_DEFAULT   HPI_DEBUG_LEVEL_NOTICE

Definition at line 37 of file hpidebug.h.

#define HPI_DEBUG_LOG (   level,
  ... 
)
Value:
do { \
if (hpi_debug_level >= HPI_DEBUG_LEVEL_##level) { \
printk(HPI_DEBUG_FLAG_##level \
FILE_LINE __VA_ARGS__); \
} \
} while (0)

Definition at line 56 of file hpidebug.h.

#define HPI_DEBUG_MESSAGE (   level,
  phm 
)
Value:
do { \
if (hpi_debug_level >= HPI_DEBUG_LEVEL_##level) { \
hpi_debug_message(phm, HPI_DEBUG_FLAG_##level \
} \
} while (0)

Definition at line 80 of file hpidebug.h.

#define HPI_DEBUG_RESPONSE (   phr)
Value:
do { \
(phr->error)) ||\
printk(KERN_DEBUG "HPI_RES%d,%d,%d\n", \
phr->version, phr->error, phr->specific_error); \
} while (0)

Definition at line 88 of file hpidebug.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
HPI_DEBUG_LEVEL_ERROR 
HPI_DEBUG_LEVEL_WARNING 
HPI_DEBUG_LEVEL_NOTICE 
HPI_DEBUG_LEVEL_INFO 
HPI_DEBUG_LEVEL_DEBUG 
HPI_DEBUG_LEVEL_VERBOSE 

Definition at line 29 of file hpidebug.h.

Function Documentation

void hpi_debug_data ( u16 pdata,
u32  len 
)

Definition at line 58 of file hpidebug.c.

void hpi_debug_init ( void  )

Definition at line 29 of file hpidebug.c.

int hpi_debug_level_get ( void  )

Definition at line 43 of file hpidebug.c.

int hpi_debug_level_set ( int  level)

Definition at line 34 of file hpidebug.c.

void hpi_debug_message ( struct hpi_message phm,
char sz_fileline 
)

Definition at line 48 of file hpidebug.c.

Variable Documentation

int hpi_debug_level

Definition at line 27 of file hpidebug.c.