aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2024-04-16 13:39:00 +0200
committerJames Munns <[email protected]>2024-04-16 13:39:00 +0200
commit2315a39293488488ced2369a1d23629af57cc0fb (patch)
treeb236965284f968a8973649f25b447f43a0e1faca
parent75352d181c7076300b939b487931b3c783dc1581 (diff)
Remove nested CS
-rw-r--r--embassy-stm32/src/usb/otg.rs10
1 files 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> {
1226 w.set_xfrsiz(buf.len() as _); 1226 w.set_xfrsiz(buf.len() as _);
1227 }); 1227 });
1228 1228
1229 critical_section::with(|_| { 1229 // Enable endpoint
1230 // Enable endpoint 1230 r.diepctl(index).modify(|w| {
1231 r.diepctl(index).modify(|w| { 1231 w.set_cnak(true);
1232 w.set_cnak(true); 1232 w.set_epena(true);
1233 w.set_epena(true);
1234 });
1235 }); 1233 });
1236 1234
1237 // Write data to FIFO 1235 // Write data to FIFO