Changes in uspace/lib/usb/include/usb/debug.h [3b77628:6028ec8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/debug.h
r3b77628 r6028ec8 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky2 * Copyright (c) 2010-2011 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 37 37 #include <stdio.h> 38 38 #include <usb/usb.h> 39 #include <assert.h> 39 40 40 41 void usb_dprintf(const char *tag, int level, const char *format, ...); … … 44 45 const uint8_t *, size_t); 45 46 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_t; 56 57 58 void usb_log_enable(usb_log_level_t, const char *); 59 60 void usb_log_printf(usb_log_level_t, const char *, ...); 61 62 #define usb_log_fatal(format, ...) \ 63 usb_log_printf(USB_LOG_LEVEL_FATAL, format, ##__VA_ARGS__) 64 65 #define usb_log_error(format, ...) \ 66 usb_log_printf(USB_LOG_LEVEL_ERROR, format, ##__VA_ARGS__) 67 68 #define usb_log_warning(format, ...) \ 69 usb_log_printf(USB_LOG_LEVEL_WARNING, format, ##__VA_ARGS__) 70 71 #define usb_log_info(format, ...) \ 72 usb_log_printf(USB_LOG_LEVEL_INFO, format, ##__VA_ARGS__) 73 74 #define usb_log_debug(format, ...) \ 75 usb_log_printf(USB_LOG_LEVEL_DEBUG, format, ##__VA_ARGS__) 76 77 #define usb_log_debug2(format, ...) \ 78 usb_log_printf(USB_LOG_LEVEL_DEBUG2, format, ##__VA_ARGS__) 79 80 81 46 82 #endif 47 83 /**
Note:
See TracChangeset
for help on using the changeset viewer.