Changes in uspace/lib/usb/include/usb/debug.h [ec293a8:3b77628] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/debug.h
rec293a8 r3b77628 1 1 /* 2 * Copyright (c) 2010 -2011Vojtech Horky2 * Copyright (c) 2010 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 37 37 #include <stdio.h> 38 38 #include <usb/usb.h> 39 #include <assert.h>40 39 41 40 void usb_dprintf(const char *tag, int level, const char *format, ...); … … 45 44 const uint8_t *, size_t); 46 45 47 /** Logging level. */48 typedef 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_MAX56 } usb_log_level_t;57 58 59 void usb_log_enable(usb_log_level_t, const char *);60 61 void 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 83 46 #endif 84 47 /**
Note:
See TracChangeset
for help on using the changeset viewer.