Remove nested CS

This commit is contained in:
James Munns 2024-04-16 13:39:00 +02:00
parent 75352d181c
commit 2315a39293

View File

@ -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