debug.h File Reference

Debugging related functions. More...

#include <stdio.h>
#include <inttypes.h>
#include <usb/usb.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define usb_log_debug(format,)   usb_log_printf(USB_LOG_LEVEL_DEBUG, format, ##__VA_ARGS__)
 Log debugging message.
#define usb_log_debug2(format,)   usb_log_printf(USB_LOG_LEVEL_DEBUG2, format, ##__VA_ARGS__)
 Log verbose debugging message.
#define usb_log_error(format,)   usb_log_printf(USB_LOG_LEVEL_ERROR, format, ##__VA_ARGS__)
 Log normal (recoverable) error.
#define usb_log_fatal(format,)   usb_log_printf(USB_LOG_LEVEL_FATAL, format, ##__VA_ARGS__)
 Log fatal error.
#define usb_log_info(format,)   usb_log_printf(USB_LOG_LEVEL_INFO, format, ##__VA_ARGS__)
 Log informational message.
#define USB_LOG_LEVEL_DEFAULT   USB_LOG_LEVEL_DEBUG
 Default log level.
#define usb_log_warning(format,)   usb_log_printf(USB_LOG_LEVEL_WARNING, format, ##__VA_ARGS__)
 Log warning.

Enumerations

enum  usb_log_level_t {
  USB_LOG_LEVEL_FATAL, USB_LOG_LEVEL_ERROR, USB_LOG_LEVEL_WARNING, USB_LOG_LEVEL_INFO,
  USB_LOG_LEVEL_DEBUG, USB_LOG_LEVEL_DEBUG2, USB_LOG_LEVEL_MAX
}
 Logging level. More...

Functions

const char * usb_debug_str_buffer (const uint8_t *buffer, size_t size, size_t dumped_size)
 Dump buffer into string.
void usb_dump_standard_descriptor (FILE *output, const char *line_prefix, const char *line_suffix, const uint8_t *descriptor, size_t descriptor_length)
 Dumps standard USB descriptor.
void usb_log_enable (usb_log_level_t level, const char *message_prefix)
 Enable logging.
void usb_log_printf (usb_log_level_t level, const char *format,...)
 Print logging message.


Detailed Description

Debugging related functions.

Definition in file debug.h.


Generated on Thu Jun 2 07:45:51 2011 for HelenOS/USB by  doxygen 1.4.7