From 5f620001a8f9017449d15b1a4aafdb9a61a44d4d Mon Sep 17 00:00:00 2001 From: Ondrej Čerman Date: Sat, 20 Jul 2019 23:07:56 +0200 Subject: usb: added info from sysfs --- includes/hardinfo.h | 1 + includes/usb_util.h | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/hardinfo.h b/includes/hardinfo.h index 8888565f..6b9e33af 100644 --- a/includes/hardinfo.h +++ b/includes/hardinfo.h @@ -163,6 +163,7 @@ gchar *module_call_method_param(gchar * method, gchar * parameter); /* Sysfs stuff */ gfloat h_sysfs_read_float(const gchar *endpoint, const gchar *entry); gint h_sysfs_read_int(const gchar *endpoint, const gchar *entry); +gint h_sysfs_read_hex(const gchar *endpoint, const gchar *entry); gchar *h_sysfs_read_string(const gchar *endpoint, const gchar *entry); #define SCAN_START() static gboolean scanned = FALSE; if (reload) scanned = FALSE; if (scanned) return; diff --git a/includes/usb_util.h b/includes/usb_util.h index 5f7ba47c..2d1398ba 100644 --- a/includes/usb_util.h +++ b/includes/usb_util.h @@ -25,6 +25,8 @@ typedef struct usbd { int vendor_id, product_id; char *vendor; char *product; + char *manufacturer; + char *device; int dev_class; int dev_subclass; @@ -36,7 +38,7 @@ typedef struct usbd { int max_curr_ma; - int speed_mbs; /* TODO: */ + int speed_mbs; gboolean user_scan; /* not scanned as root */ struct usbi *if_list; @@ -53,6 +55,7 @@ typedef struct usbi { char *if_class_str; char *if_subclass_str; char *if_protocol_str; + char *driver; struct usbi *next; } usbi; @@ -61,7 +64,7 @@ usbd *usb_get_device_list(); int usbd_list_count(usbd *); void usbd_list_free(usbd *); -usbd *usb_get_device(int bus, int dev); +usbd *usb_get_device(int bus, int dev, const gchar* sysfspath); void usbd_free(usbd *); #endif -- cgit v1.2.3