From 8483c00da9597952c4da1eb1343a716fe2dfe7f0 Mon Sep 17 00:00:00 2001 From: Jonathan BAUDIN Date: Fri, 15 Dec 2023 16:33:40 +0100 Subject: [PATCH] Add free function --- src/bus.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bus.rs b/src/bus.rs index 398b192..5c7b534 100644 --- a/src/bus.rs +++ b/src/bus.rs @@ -316,6 +316,11 @@ impl UsbBusAllocator { self.alloc(None, EndpointType::Interrupt, max_packet_size, interval) .expect("alloc_ep failed") } + + /// Free the UsbBus + pub fn free(self) -> B { + self.bus.into_inner() + } } /// A handle for a USB interface that contains its number.