debug.h File Reference

#include <hid.h>
#include <usb.h>

Go to the source code of this file.


#define DEBUGPRINTF(t, s, a...)
#define TRACE(s, a...)   if (hid_debug_level & HID_DEBUG_TRACES) { DEBUGPRINTF(" TRACE", s, ##a) }
#define NOTICE(s, a...)   if (hid_debug_level & HID_DEBUG_NOTICES) { DEBUGPRINTF(" NOTICE", s, ##a) }
#define WARNING(s, a...)   if (hid_debug_level & HID_DEBUG_WARNINGS) { DEBUGPRINTF("WARNING", s, ##a) }
#define ERROR(s, a...)   if (hid_debug_level & HID_DEBUG_ERRORS) { DEBUGPRINTF(" ERROR", s, ##a) }


void trace_usb_bus (FILE *const out, struct usb_bus const *const usbbus)
void trace_usb_device (FILE *const out, struct usb_device const *const usbdev)
void trace_usb_device_descriptor (FILE *const out, struct usb_device_descriptor const *const descriptor)
void trace_usb_config_descriptor (FILE *const out, struct usb_config_descriptor const *const config)
void trace_usb_dev_handle (FILE *const out, usb_dev_handle const *const usbdev_h)


HIDDebugLevel hid_debug_level
FILE * hid_debug_stream

Define Documentation

#define DEBUGPRINTF ( t,
a...   ) 


if (hid_debug_stream) { \
                                  fprintf(hid_debug_stream, "%s: %s(): ", t, __FUNCTION__); \
                                  fprintf(hid_debug_stream, s "\n", ##a); \

Definition at line 14 of file debug.h.

#define ERROR ( s,
a...   )     if (hid_debug_level & HID_DEBUG_ERRORS) { DEBUGPRINTF(" ERROR", s, ##a) }

Definition at line 21 of file debug.h.

Referenced by hid_cleanup(), hid_delete_HIDInterface(), hid_dump_tree(), hid_extract_value(), hid_find_object(), hid_force_open(), hid_format_path(), hid_get_report_size(), hid_init(), hid_init_parser(), hid_new_HIDInterface(), hid_open(), hid_os_force_claim(), hid_prepare_interface(), hid_prepare_parser(), hid_prepare_report_descriptor(), hid_reset_HIDInterface(), hid_reset_parser(), hid_write_identification(), and HIDParse().

#define NOTICE ( s,
a...   )     if (hid_debug_level & HID_DEBUG_NOTICES) { DEBUGPRINTF(" NOTICE", s, ##a) }

Definition at line 19 of file debug.h.

Referenced by hid_cleanup(), hid_close(), hid_find_object(), hid_find_usb_device(), hid_force_open(), hid_get_feature_report(), hid_get_input_report(), hid_get_item_value(), hid_init(), hid_init_parser(), hid_interrupt_read(), hid_interrupt_write(), hid_open(), hid_prepare_hid_descriptor(), hid_prepare_parser(), hid_prepare_report_descriptor(), hid_set_feature_report(), and hid_set_output_report().

#define TRACE ( s,
a...   )     if (hid_debug_level & HID_DEBUG_TRACES) { DEBUGPRINTF(" TRACE", s, ##a) }

Definition at line 18 of file debug.h.

Referenced by add_open_device(), hid_close(), hid_compare_usb_device(), hid_dump_tree(), hid_extract_value(), hid_find_usb_device(), hid_force_open(), hid_format_path(), hid_get_feature_report(), hid_get_input_report(), hid_get_item_value(), hid_get_usb_handle(), hid_init(), hid_init_parser(), hid_interrupt_read(), hid_interrupt_write(), hid_new_HIDInterface(), hid_open(), hid_os_force_claim(), hid_prepare_hid_descriptor(), hid_prepare_parse_path(), hid_prepare_parser(), hid_prepare_report_descriptor(), hid_reset_parser(), hid_set_feature_report(), and hid_set_output_report().

#define WARNING ( s,
a...   )     if (hid_debug_level & HID_DEBUG_WARNINGS) { DEBUGPRINTF("WARNING", s, ##a) }

Definition at line 20 of file debug.h.

Referenced by hid_close(), hid_find_object(), hid_force_open(), hid_format_path(), hid_get_feature_report(), hid_get_input_report(), hid_get_item_value(), hid_interrupt_read(), hid_interrupt_write(), hid_is_opened(), hid_open(), hid_os_force_claim(), hid_prepare_hid_descriptor(), hid_prepare_report_descriptor(), hid_set_feature_report(), hid_set_idle(), and hid_set_output_report().

Function Documentation

void trace_usb_bus ( FILE *const   out,
struct usb_bus const *const  usbbus 

Definition at line 26 of file debug.c.

void trace_usb_config_descriptor ( FILE *const   out,
struct usb_config_descriptor const *const   config 

Definition at line 66 of file debug.c.

void trace_usb_dev_handle ( FILE *const   out,
usb_dev_handle const *const  usbdev_h 

Definition at line 79 of file debug.c.

References trace_usb_device().

void trace_usb_device ( FILE *const   out,
struct usb_device const *const  usbdev 

Definition at line 35 of file debug.c.

Referenced by trace_usb_dev_handle().

void trace_usb_device_descriptor ( FILE *const   out,
struct usb_device_descriptor const *const   descriptor 

Definition at line 47 of file debug.c.

Variable Documentation

HIDDebugLevel hid_debug_level

Definition at line 6 of file debug.c.

Referenced by hid_set_debug().

FILE* hid_debug_stream

Definition at line 7 of file debug.c.

Referenced by hid_set_debug_stream().

Generated on Sun Mar 30 15:28:24 2008 for libhid by  doxygen 1.5.1