aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-08-09 19:50:46 -0400
committerBrian Cully <bjc@kublai.com>2019-08-09 19:50:46 -0400
commitb0be48424e81384de3280b5a5ac521d694b82e15 (patch)
tree0152ae6cf460b765f297cd06bdb6ee8a78718766 /src
parent6f71e5513a9a452c0dfdf6808e0d2fb7a775162e (diff)
downloadusb-host-b0be48424e81384de3280b5a5ac521d694b82e15.tar.gz
usb-host-b0be48424e81384de3280b5a5ac521d694b82e15.zip
Add PartialEq derives for USB descriptors.
Diffstat (limited to 'src')
-rw-r--r--src/descriptor.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/descriptor.rs b/src/descriptor.rs
index 9068c15..f49259f 100644
--- a/src/descriptor.rs
+++ b/src/descriptor.rs
@@ -1,6 +1,6 @@
use core::convert::TryFrom;
-#[derive(Clone, Copy, Debug)]
+#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DescriptorType {
Device = 1,
Configuration = 2,
@@ -30,7 +30,7 @@ impl TryFrom<u8> for DescriptorType {
}
}
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, packed)]
pub struct DeviceDescriptor {
pub b_length: u8,
@@ -49,7 +49,7 @@ pub struct DeviceDescriptor {
pub b_num_configurations: u8,
}
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, packed)]
pub struct ConfigurationDescriptor {
pub b_length: u8,
@@ -62,7 +62,7 @@ pub struct ConfigurationDescriptor {
pub b_max_power: u8,
}
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, packed)]
pub struct InterfaceDescriptor {
pub b_length: u8,
@@ -76,7 +76,7 @@ pub struct InterfaceDescriptor {
pub i_interface: u8,
}
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, packed)]
pub struct EndpointDescriptor {
pub b_length: u8,