aboutsummaryrefslogtreecommitdiffstats
path: root/usbh/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'usbh/src/lib.rs')
-rwxr-xr-xusbh/src/lib.rs47
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,