Changes in / [34eb135:5287502] in mainline
- Location:
- uspace
- Files:
-
- 2 added
- 3 deleted
- 3 edited
-
app/netstart/self_test.c (added)
-
app/netstart/self_test.h (added)
-
lib/packet/include/net_byteorder.h (deleted)
-
lib/packet/include/net_err.h (deleted)
-
lib/packet/include/socket_errno.h (deleted)
-
lib/usb/include/usb/usb.h (modified) (2 diffs)
-
lib/usb/src/host/batch.c (modified) (2 diffs)
-
lib/usb/src/usb.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/usb.h
r34eb135 r5287502 61 61 62 62 const char * usb_str_transfer_type(usb_transfer_type_t t); 63 const char * usb_str_transfer_type_short(usb_transfer_type_t t);64 63 65 64 /** USB data transfer direction. */ … … 79 78 USB_SPEED_HIGH 80 79 } usb_speed_t; 81 82 const char *usb_str_speed(usb_speed_t);83 84 80 85 81 /** USB request type target. */ -
uspace/lib/usb/src/host/batch.c
r34eb135 r5287502 107 107 instance->buffer_size); 108 108 109 usb_log_debug("Batch %p done (T%d.%d, %s %s in, %zuB): %s (%d).\n", 110 instance, 111 instance->target.address, instance->target.endpoint, 112 usb_str_speed(instance->speed), 113 usb_str_transfer_type_short(instance->transfer_type), 114 instance->transfered_size, 115 str_error(instance->error), instance->error); 109 int err = instance->error; 110 usb_log_debug("Batch(%p) callback IN(type:%d): %s(%d), %zu.\n", 111 instance, instance->transfer_type, str_error(err), err, 112 instance->transfered_size); 116 113 117 instance->callback_in( instance->fun, instance->error,118 instance-> transfered_size, instance->arg);114 instance->callback_in( 115 instance->fun, err, instance->transfered_size, instance->arg); 119 116 } 120 117 /*----------------------------------------------------------------------------*/ … … 128 125 assert(instance->callback_out); 129 126 130 usb_log_debug("Batch %p done (T%d.%d, %s %s out): %s (%d).\n", 131 instance, 132 instance->target.address, instance->target.endpoint, 133 usb_str_speed(instance->speed), 134 usb_str_transfer_type_short(instance->transfer_type), 135 str_error(instance->error), instance->error); 136 127 int err = instance->error; 128 usb_log_debug("Batch(%p) callback OUT(type:%d): %s(%d).\n", 129 instance, instance->transfer_type, str_error(err), err); 137 130 instance->callback_out(instance->fun, 138 instance->error, instance->arg);131 err, instance->arg); 139 132 } 140 133 /** -
uspace/lib/usb/src/usb.c
r34eb135 r5287502 36 36 #include <errno.h> 37 37 38 #define ARR_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))39 40 static const char *str_speed[] = {41 "low",42 "full",43 "high"44 };45 46 static const char *str_transfer_type[] = {47 "control",48 "isochronous",49 "bulk",50 "interrupt"51 };52 53 static const char *str_transfer_type_short[] = {54 "ctrl",55 "iso",56 "bulk",57 "intr"58 };59 38 60 39 /** String representation for USB transfer type. … … 63 42 * @return Transfer type as a string (in English). 64 43 */ 65 const char * usb_str_transfer_type(usb_transfer_type_t t)44 const char * usb_str_transfer_type(usb_transfer_type_t t) 66 45 { 67 if (t >= ARR_SIZE(str_transfer_type)) { 68 return "invalid"; 46 switch (t) { 47 case USB_TRANSFER_ISOCHRONOUS: 48 return "isochronous"; 49 case USB_TRANSFER_INTERRUPT: 50 return "interrupt"; 51 case USB_TRANSFER_CONTROL: 52 return "control"; 53 case USB_TRANSFER_BULK: 54 return "bulk"; 55 default: 56 return "unknown"; 69 57 } 70 return str_transfer_type[t];71 }72 73 /** String representation for USB transfer type (short version).74 *75 * @param t Transfer type.76 * @return Transfer type as a short string for debugging messages.77 */78 const char *usb_str_transfer_type_short(usb_transfer_type_t t)79 {80 if (t >= ARR_SIZE(str_transfer_type_short)) {81 return "invl";82 }83 return str_transfer_type_short[t];84 }85 86 /** String representation of USB speed.87 *88 * @param s The speed.89 * @return USB speed as a string (in English).90 */91 const char *usb_str_speed(usb_speed_t s)92 {93 if (s >= ARR_SIZE(str_speed)) {94 return "invalid";95 }96 return str_speed[s];97 58 } 98 59
Note:
See TracChangeset
for help on using the changeset viewer.
