Changeset aab02fb in mainline for uspace/lib/usbvirt/private.h


Ignore:
Timestamp:
2010-10-26T22:21:45Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
efedee77
Parents:
fa2a361
Message:

Debugging support for libusbvirt

Added methods debug and lib_debug to device structure to simplify
debugging. Each method gets as a parameter debug level describing
verbosity of the message and also message tag that allows filtering
based on message type (e.g. messages related to transactions, to
device requests etc.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/private.h

    rfa2a361 raab02fb  
    6666    void *buffer, size_t size, size_t *data_size);
    6767
     68
     69void user_debug(usbvirt_device_t *device, int level, uint8_t tag,
     70    const char *format, ...);
     71void lib_debug(usbvirt_device_t *device, int level, uint8_t tag,
     72    const char *format, ...);
     73   
     74static inline const char *str_device_state(usbvirt_device_state_t state)
     75{
     76        switch (state) {
     77                case USBVIRT_STATE_DEFAULT:
     78                        return "default";
     79                case USBVIRT_STATE_ADDRESS:
     80                        return "address";
     81                case USBVIRT_STATE_CONFIGURED:
     82                        return "configured";
     83                default:
     84                        return "unknown";
     85        }
     86}
     87
    6888#endif
    6989/**
Note: See TracChangeset for help on using the changeset viewer.