From 2315a39293488488ced2369a1d23629af57cc0fb Mon Sep 17 00:00:00 2001 From: James Munns Date: Tue, 16 Apr 2024 13:39:00 +0200 Subject: [PATCH] Remove nested CS --- embassy-stm32/src/usb/otg.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/embassy-stm32/src/usb/otg.rs b/embassy-stm32/src/usb/otg.rs index dc5d47006..b386c6977 100644 --- a/embassy-stm32/src/usb/otg.rs +++ b/embassy-stm32/src/usb/otg.rs @@ -1226,12 +1226,10 @@ impl<'d, T: Instance> embassy_usb_driver::EndpointIn for Endpoint<'d, T, In> { w.set_xfrsiz(buf.len() as _); }); - critical_section::with(|_| { - // Enable endpoint - r.diepctl(index).modify(|w| { - w.set_cnak(true); - w.set_epena(true); - }); + // Enable endpoint + r.diepctl(index).modify(|w| { + w.set_cnak(true); + w.set_epena(true); }); // Write data to FIFO