aboutsummaryrefslogtreecommitdiff
path: root/includes/usb_util.h
blob: 5d7f55bf9e74c3b16f6149a0d364b646d3a7f534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __USB_UTIL_H__
#define __USB_UTIL_H__

/* this is a linked list */
typedef struct usbd {
    int bus, dev;
    int vendor_id, product_id;
    char *vendor;
    char *product;

    int dev_class;
    int dev_subclass;
    char *dev_class_str;
    char *dev_subclass_str;

    char *usb_version;
    char *device_version; /* bcdDevice */

    int max_curr_ma;

    int speed_mbs; /* TODO: */

    int user_scan; /* not scanned as root */

    struct usbd *next;
} usbd;

usbd *usb_get_device_list();
int usbd_list_count(usbd *);
void usbd_list_free(usbd *);

usbd *usb_get_device(int bus, int dev);
void usbd_free(usbd *);

#endif