Changeset bbc7d83e in mainline for uspace/lib/usb/include/usb/debug.h


Ignore:
Timestamp:
2011-02-01T21:59:43Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a4a8cca
Parents:
0a37e14 (diff), ec293a8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/debug.h

    r0a37e14 rbbc7d83e  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2010-2011 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    3737#include <stdio.h>
    3838#include <usb/usb.h>
     39#include <assert.h>
    3940
    4041void usb_dprintf(const char *tag, int level, const char *format, ...);
     
    4445    const uint8_t *, size_t);
    4546
     47/** Logging level. */
     48typedef enum {
     49        USB_LOG_LEVEL_FATAL,
     50        USB_LOG_LEVEL_ERROR,
     51        USB_LOG_LEVEL_WARNING,
     52        USB_LOG_LEVEL_INFO,
     53        USB_LOG_LEVEL_DEBUG,
     54        USB_LOG_LEVEL_DEBUG2,
     55        USB_LOG_LEVEL_MAX
     56} usb_log_level_t;
     57
     58
     59void usb_log_enable(usb_log_level_t, const char *);
     60
     61void usb_log_printf(usb_log_level_t, const char *, ...);
     62
     63#define usb_log_fatal(format, ...) \
     64        usb_log_printf(USB_LOG_LEVEL_FATAL, format, ##__VA_ARGS__)
     65
     66#define usb_log_error(format, ...) \
     67        usb_log_printf(USB_LOG_LEVEL_ERROR, format, ##__VA_ARGS__)
     68
     69#define usb_log_warning(format, ...) \
     70        usb_log_printf(USB_LOG_LEVEL_WARNING, format, ##__VA_ARGS__)
     71
     72#define usb_log_info(format, ...) \
     73        usb_log_printf(USB_LOG_LEVEL_INFO, format, ##__VA_ARGS__)
     74
     75#define usb_log_debug(format, ...) \
     76        usb_log_printf(USB_LOG_LEVEL_DEBUG, format, ##__VA_ARGS__)
     77
     78#define usb_log_debug2(format, ...) \
     79        usb_log_printf(USB_LOG_LEVEL_DEBUG2, format, ##__VA_ARGS__)
     80
     81
     82
    4683#endif
    4784/**
Note: See TracChangeset for help on using the changeset viewer.