update std implementation to assign handler

This commit is contained in:
bunnie 2024-10-18 04:17:06 +08:00
parent d8cd9ba5c5
commit 8b8e7680cc

View file

@ -246,7 +246,10 @@ pub(crate) fn main_hw() -> ! {
// safety: this is safe because we allocated ifram_range to have the same physical and virtual addresses
#[cfg(feature = "cramium-soc")]
let usbwrapper = CorigineWrapper::new(unsafe {
CorigineUsb::new(cid, h_op, ifram_range.as_ptr() as usize, usb.clone(), irq_csr.clone())
let mut cu = CorigineUsb::new(cid, h_op, ifram_range.as_ptr() as usize, usb.clone(), irq_csr.clone());
// assign the default handler, since this is the std case
cu.assign_handler(cramium_hal::usb::driver::handle_event);
cu
});
#[cfg(feature = "cramium-soc")]