diff options
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/usb_util.h | 35 | 
1 files changed, 35 insertions, 0 deletions
| diff --git a/includes/usb_util.h b/includes/usb_util.h new file mode 100644 index 00000000..5d7f55bf --- /dev/null +++ b/includes/usb_util.h @@ -0,0 +1,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 | 
