Changeset 947d788 in mainline for uspace/drv/vhc
- Timestamp:
- 2010-12-08T14:30:49Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9501cced
- Parents:
- bb95594
- Location:
- uspace/drv/vhc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/vhc/debug.c
rbb95594 r947d788 35 35 #include <stdio.h> 36 36 #include <ipc/ipc.h> 37 #include <usb/debug.h> 37 38 38 39 #include "vhcd.h" 39 40 40 /** Current debug level. */41 int debug_level = 0;42 43 /** Debugging printf.44 * This function is intended for single-line messages as it45 * automatically prints debugging prefix at the beginning of the46 * line.47 *48 * @see printf49 * @param level Debugging level.50 */51 void dprintf(int level, const char *format, ...)52 {53 if (level > debug_level) {54 return;55 }56 57 printf("%s(%d): ", NAME, level);58 va_list args;59 va_start(args, format);60 vprintf(format, args);61 va_end(args);62 printf("\n");63 }64 41 65 42 /** Debug print informing of invalid call. -
uspace/drv/vhc/hcd.c
rbb95594 r947d788 111 111 printf("%s: virtual USB host controller driver.\n", NAME); 112 112 113 debug_level = 10;113 usb_dprintf_enable(NAME, 10); 114 114 115 115 fid_t fid = fibril_create(hc_manager_fibril, NULL); -
uspace/drv/vhc/vhcd.h
rbb95594 r947d788 36 36 #define VHCD_VHCD_H_ 37 37 38 #include <usb/debug.h> 39 38 40 #define NAME "vhc" 39 41 #define NAME_DEV "hcd-virt-dev" … … 43 45 #define DEVMAP_PATH_DEV NAMESPACE "/" NAME_DEV 44 46 45 extern int debug_level; 46 void dprintf(int, const char *, ...); 47 #define dprintf(level, format, ...) \ 48 usb_dprintf(NAME, (level), format "\n", ##__VA_ARGS__) 47 49 void dprintf_inval_call(int, ipc_call_t, ipcarg_t); 48 50
Note:
See TracChangeset
for help on using the changeset viewer.
