Changeset bbc7d83e in mainline for uspace/lib/usb/include/usb/debug.h
- Timestamp:
- 2011-02-01T21:59:43Z (14 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/debug.h
r0a37e14 rbbc7d83e 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_MAX 56 } 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 46 83 #endif 47 84 /**
Note:
See TracChangeset
for help on using the changeset viewer.