diff --git a/src/bus.rs b/src/bus.rs index 5c6af03..90bda82 100644 --- a/src/bus.rs +++ b/src/bus.rs @@ -318,6 +318,8 @@ impl UsbBusAllocator { } } +unsafe impl Sync for UsbBusAllocator where T: Sync + UsbBus {} + /// A handle for a USB interface that contains its number. #[derive(Copy, Clone, Eq, PartialEq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] diff --git a/src/lib.rs b/src/lib.rs index ad009fb..d218c9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -289,4 +289,5 @@ fn _ensure_sync() { ensure_sync::>(); ensure_sync::>(); ensure_sync::>(); + ensure_sync::>(); }