Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/usbd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//! * No notification when the status stage is ACK'd.

use core::cell::Cell;
use core::mem::MaybeUninit;
use core::sync::atomic::{compiler_fence, Ordering};
use critical_section::{CriticalSection, Mutex};
use usb_device::{
Expand Down Expand Up @@ -375,12 +374,8 @@ impl<T: UsbPeripheral> UsbBus for Usbd<T> {
return Err(UsbError::WouldBlock);
}

let mut ram_buf: MaybeUninit<[u8; 64]> = MaybeUninit::uninit();
unsafe {
let slice = &mut *ram_buf.as_mut_ptr();
slice[..buf.len()].copy_from_slice(buf);
}
let ram_buf = unsafe { ram_buf.assume_init() };
let mut ram_buf = [0u8; 64];
ram_buf[..buf.len()].copy_from_slice(buf);

let epin = [
&regs.epin0,
Expand Down