Changeset 355f7c2 in mainline for uspace/lib/usbvirt/transaction.c


Ignore:
Timestamp:
2010-10-25T07:44:02Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ca07cd3
Parents:
7a7bfeb3
Message:

Better debugging support in VHCD

Also, added some missing comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/transaction.c

    r7a7bfeb3 r355f7c2  
    3838#include <mem.h>
    3939
     40#include "ids.h"
    4041#include "private.h"
    4142
    4243static usb_direction_t setup_transaction_direction(usb_endpoint_t, void *, size_t);
    4344static void process_control_transfer(usb_endpoint_t, usbvirt_control_transfer_t *);
     45
     46/** Convert virtual USB transaction type to string.
     47 */
     48const char *usbvirt_str_transaction_type(usbvirt_transaction_type_t type)
     49{
     50        switch (type) {
     51                case USBVIRT_TRANSACTION_SETUP:
     52                        return "setup";
     53                case USBVIRT_TRANSACTION_IN:
     54                        return "in";
     55                case USBVIRT_TRANSACTION_OUT:
     56                        return "out";
     57                default:
     58                        return "unknown";
     59        }
     60}
    4461
    4562int transaction_setup(usbvirt_device_t *device, usb_endpoint_t endpoint,
Note: See TracChangeset for help on using the changeset viewer.