diff options
| author | James Munns <[email protected]> | 2024-04-16 13:39:00 +0200 |
|---|---|---|
| committer | James Munns <[email protected]> | 2024-04-16 13:39:00 +0200 |
| commit | 2315a39293488488ced2369a1d23629af57cc0fb (patch) | |
| tree | b236965284f968a8973649f25b447f43a0e1faca | |
| parent | 75352d181c7076300b939b487931b3c783dc1581 (diff) | |
Remove nested CS
| -rw-r--r-- | embassy-stm32/src/usb/otg.rs | 10 |
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 |
