From 08884f1718770908fd6562c8949c7e22fb40f8df Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Fri, 3 Jul 2020 12:16:59 +0200 Subject: [PATCH] aaaaand remove DeviceState too --- advanced/common/usb/src/lib.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/advanced/common/usb/src/lib.rs b/advanced/common/usb/src/lib.rs index 716fec5..55d2ba2 100644 --- a/advanced/common/usb/src/lib.rs +++ b/advanced/common/usb/src/lib.rs @@ -62,6 +62,7 @@ impl Request { - has descriptor index 0 (i.e. it is the first implemented descriptor for this type) and - has wIndex 0 (i.e. no language ID since it's not a string descriptor) */ + if bmrequesttype == 0b00000000 && brequest == SET_ADDRESS { // Set the device address for all future accesses. // Needed to successfully init when using Apple devices. @@ -93,23 +94,6 @@ pub enum Descriptor { // there are even more descriptor types but we don't need to support them } -/// The state of the USB device -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum DeviceState { - /// The default state - Default, - /// The address-ed state - Address(Address), - /// The configured state - Configured { - /// The address of the device - address: Address, - /// The configuration value - value: NonZeroU8, - }, -} - - #[cfg(test)] mod tests { #[cfg(TODO)]