From 4421c02a3e98d8b9e3af8db207dfeb9d276e2962 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 25 Jul 2019 17:56:47 -0400 Subject: Remove unused structs. --- usbh/src/lib.rs | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'usbh/src') diff --git a/usbh/src/lib.rs b/usbh/src/lib.rs index 8213eb5..8c19a3c 100755 --- a/usbh/src/lib.rs +++ b/usbh/src/lib.rs @@ -64,53 +64,6 @@ static mut EVENTS: Events = Events::new(Event::Error); // thread-safe if this is the way we're going. static mut LATEST_EVENT: Event = Event::Detached; -#[repr(C)] -#[derive(Debug)] -struct EPInfo { - ep_addr: u32, - mak_pkt_size: u32, - ep_attribs: u8, -} - -impl EPInfo { - fn bm_snd_toggle(&self) -> bool { - const POS: u8 = 0; - const MASK: u8 = 0x1; - ((self.ep_attribs >> POS) & MASK) == 1 - } - fn bm_rcv_toggle(&self) -> bool { - const POS: u8 = 1; - const MASK: u8 = 0x1; - ((self.ep_attribs >> POS) & MASK) == 1 - } - fn bm_nak_power(&self) -> u8 { - const POS: u8 = 2; - const MASK: u8 = 0x3f; - (self.ep_attribs >> POS) & MASK - } -} - -#[derive(Debug)] -struct USBDeviceAddress(u32); - -impl USBDeviceAddress { - fn bm_address(&self) -> u8 { - const POS: u8 = 0; - const MASK: u32 = 0x7; - ((self.0 >> POS) & MASK) as u8 - } - fn bm_parent(&self) -> u8 { - const POS: u8 = 3; - const MASK: u32 = 0x7; - ((self.0 >> POS) & MASK) as u8 - } - fn bm_hub(&self) -> bool { - const POS: u8 = 6; - const MASK: u32 = 0x1; - ((self.0 >> POS) & MASK) == 1 - } -} - pub struct USBHost where F: Fn() -> usize + 'static, -- cgit v1.2.3