diff options
author | Brian Cully <bjc@kublai.com> | 2019-07-25 17:56:47 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-07-25 17:56:47 -0400 |
commit | 4421c02a3e98d8b9e3af8db207dfeb9d276e2962 (patch) | |
tree | cf9dc878cdb920336c73112d3462744b12feaf1c /usbh/src | |
parent | 1ec7af966fc0be5353e9c588b631a3e2618e2080 (diff) | |
download | samd21-demo-4421c02a3e98d8b9e3af8db207dfeb9d276e2962.tar.gz samd21-demo-4421c02a3e98d8b9e3af8db207dfeb9d276e2962.zip |
Remove unused structs.
Diffstat (limited to 'usbh/src')
-rwxr-xr-x | usbh/src/lib.rs | 47 |
1 files changed, 0 insertions, 47 deletions
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<F> where F: Fn() -> usize + 'static, |