Changeset 434ef65 in mainline for uspace/lib/usb/src/host/batch.c


Ignore:
Timestamp:
2011-03-21T16:54:36Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
41ef5b9, ce794342
Parents:
5287502 (diff), 625f1ba (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.
Message:

Small improvements of libusb

Below is a summary of changes

  • added usb_str_speed() function for nicer outputs
  • USB framework remembers configuration descriptor
  • some refactoring (hub driver, messages of transfer batch API)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/host/batch.c

    r5287502 r434ef65  
    107107            instance->buffer_size);
    108108
    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);
     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);
    113116
    114         instance->callback_in(
    115             instance->fun, err, instance->transfered_size, instance->arg);
     117        instance->callback_in(instance->fun, instance->error,
     118            instance->transfered_size, instance->arg);
    116119}
    117120/*----------------------------------------------------------------------------*/
     
    125128        assert(instance->callback_out);
    126129
    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);
     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
    130137        instance->callback_out(instance->fun,
    131             err, instance->arg);
     138            instance->error, instance->arg);
    132139}
    133140/**
Note: See TracChangeset for help on using the changeset viewer.