mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-01-22 09:23:19 +01:00
Unify the aura data more. Prep for better format
This commit is contained in:
@@ -17,6 +17,7 @@ pub struct HidRaw {
|
||||
syspath: PathBuf,
|
||||
/// The product ID. The vendor ID is not kept
|
||||
prod_id: String,
|
||||
device_bcd: u32,
|
||||
/// Retaining a handle to the file for the duration of `HidRaw`
|
||||
file: RefCell<File>,
|
||||
}
|
||||
@@ -52,6 +53,12 @@ impl HidRaw {
|
||||
devfs_path: dev_node.to_owned(),
|
||||
prod_id: id_product.to_string(),
|
||||
syspath: endpoint.syspath().into(),
|
||||
device_bcd: usb_device
|
||||
.attribute_value("bcdDevice")
|
||||
.unwrap_or_default()
|
||||
.to_string_lossy()
|
||||
.parse()
|
||||
.unwrap_or_default(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -70,6 +77,12 @@ impl HidRaw {
|
||||
devfs_path: dev_node.to_owned(),
|
||||
prod_id: id_product.to_string(),
|
||||
syspath: endpoint.syspath().into(),
|
||||
device_bcd: endpoint
|
||||
.attribute_value("bcdDevice")
|
||||
.unwrap_or_default()
|
||||
.to_string_lossy()
|
||||
.parse()
|
||||
.unwrap_or_default(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -94,6 +107,12 @@ impl HidRaw {
|
||||
devfs_path: dev_node.to_owned(),
|
||||
prod_id: id_product.to_string_lossy().into(),
|
||||
syspath: device.syspath().into(),
|
||||
device_bcd: device
|
||||
.attribute_value("bcdDevice")
|
||||
.unwrap_or_default()
|
||||
.to_string_lossy()
|
||||
.parse()
|
||||
.unwrap_or_default(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user