Changeset 1614ce3 in mainline for uspace/app/usbinfo/usbinfo.h


Ignore:
Timestamp:
2011-03-18T09:14:22Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b64eac6
Parents:
0fd82c9 (diff), b8e2f93 (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:

Improvements of usbinfo application

Refactored the code, filtering output via command line switches, easier
extensibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/usbinfo.h

    r0fd82c9 r1614ce3  
    3838#include <usb/usb.h>
    3939#include <usb/descriptor.h>
     40#include <usb/pipes.h>
    4041#include <usb/debug.h>
     42#include <usb/dp.h>
    4143#include <ipc/devman.h>
     44
     45typedef struct {
     46        usb_endpoint_pipe_t ctrl_pipe;
     47        usb_device_connection_t wire;
     48        usb_standard_device_descriptor_t device_descriptor;
     49        uint8_t *full_configuration_descriptor;
     50        size_t full_configuration_descriptor_size;
     51} usbinfo_device_t;
     52
     53typedef struct {
     54        int opt;
     55        void (*action)(usbinfo_device_t *dev);
     56        bool active;
     57} usbinfo_action_t;
    4258
    4359
     
    4662void dump_buffer(const char *, size_t, const uint8_t *, size_t);
    4763const char *get_indent(size_t);
    48 void dump_match_ids(match_id_list_t *matches);
     64void dump_match_ids(match_id_list_t *, const char *);
    4965void dump_usb_descriptor(uint8_t *, size_t);
    50 int dump_device(devman_handle_t, usb_address_t);
    5166void dump_descriptor_tree(uint8_t *, size_t);
    5267
     
    5671}
    5772
     73usbinfo_device_t *prepare_device(devman_handle_t, usb_address_t);
     74void destroy_device(usbinfo_device_t *);
     75
     76typedef void (*dump_descriptor_in_tree_t)(uint8_t *, size_t, void *);
     77void browse_descriptor_tree(uint8_t *, size_t, usb_dp_descriptor_nesting_t *,
     78    dump_descriptor_in_tree_t, size_t, void *);
     79
     80
     81void dump_short_device_identification(usbinfo_device_t *);
     82void dump_device_match_ids(usbinfo_device_t *);
     83void dump_descriptor_tree_brief(usbinfo_device_t *);
     84void dump_strings(usbinfo_device_t *);
     85
     86
    5887#endif
    5988/**
Note: See TracChangeset for help on using the changeset viewer.