Changeset 20dd67e in mainline for uspace/lib/usb/include/usb/debug.h
- Timestamp:
- 2012-08-17T13:40:22Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 920d0fc
- Parents:
- 267f235
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/debug.h
r267f235 r20dd67e 38 38 #include <inttypes.h> 39 39 #include <usb/usb.h> 40 #include <io/log.h> 40 41 #include <assert.h> 41 42 … … 43 44 const uint8_t *, size_t); 44 45 45 /** Logging level. */ 46 typedef enum { 47 /** Fatal, unrecoverable, error. 48 * Such error prevents the driver from working at all. 49 */ 50 USB_LOG_LEVEL_FATAL, 51 52 /** Serious but recoverable error 53 * Shall be used for errors fatal for single device but not for 54 * driver itself. 55 */ 56 USB_LOG_LEVEL_ERROR, 57 58 /** Warning. 59 * Problems from which the driver is able to recover gracefully. 60 */ 61 USB_LOG_LEVEL_WARNING, 62 63 /** Information message. 64 * This should be the last level that is printed by default to 65 * the screen. 66 * Typical usage is to inform that new device was found and what 67 * are its capabilities. 68 * Do not use for repetitive actions (such as device polling). 69 */ 70 USB_LOG_LEVEL_INFO, 71 72 /** Debugging message. */ 73 USB_LOG_LEVEL_DEBUG, 74 75 /** More detailed debugging message. */ 76 USB_LOG_LEVEL_DEBUG2, 77 78 /** Terminating constant for logging levels. */ 79 USB_LOG_LEVEL_MAX 80 } usb_log_level_t; 46 #define USB_LOG_LEVEL_FATAL LVL_FATAL 47 #define USB_LOG_LEVEL_ERROR LVL_ERROR 48 #define USB_LOG_LEVEL_WARNING LVL_WARN 49 #define USB_LOG_LEVEL_INFO LVL_NOTE 50 #define USB_LOG_LEVEL_DEBUG LVL_DEBUG 51 #define USB_LOG_LEVEL_DEBUG2 LVL_DEBUG2 81 52 82 53 /** Default log level. */ … … 87 58 #endif 88 59 89 void usb_log_enable( usb_log_level_t, const char *);60 void usb_log_enable(log_level_t , const char *); 90 61 91 void usb_log_printf( usb_log_level_t, const char *, ...)62 void usb_log_printf(log_level_t, const char *, ...) 92 63 PRINTF_ATTRIBUTE(2, 3); 93 64
Note:
See TracChangeset
for help on using the changeset viewer.