cleaner rust
Some checks failed
ci / Check build (pull_request) Has been cancelled
ci / Check formatting (pull_request) Has been cancelled
ci / Check Documentation Build (pull_request) Has been cancelled
ci / Clippy (pull_request) Has been cancelled
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled

This commit is contained in:
2025-07-02 10:27:46 +02:00
parent 75934754c2
commit 53967510cc

View File

@@ -115,10 +115,12 @@ async fn main(_spawner: Spawner) -> ! {
let tx_descr = TX_DESCRIPTORS.take();
rx_descr.write([const { zynq7000_hal::eth::rx_descr::Descriptor::new() }; 32]);
tx_descr.write([const { zynq7000_hal::eth::tx_descr::Descriptor::new() }; 32]);
let rx_descr_init = unsafe { rx_descr.assume_init_mut() };
let tx_descr_init = unsafe { tx_descr.assume_init_mut() };
let mut rx_descr_ref =
zynq7000_hal::eth::rx_descr::DescriptorListRef::new(unsafe { &mut *rx_descr.as_mut_ptr() });
zynq7000_hal::eth::rx_descr::DescriptorListRef::new(rx_descr_init.as_mut_slice());
let mut tx_descr_ref =
zynq7000_hal::eth::tx_descr::DescriptorListRef::new(unsafe { &mut *tx_descr.as_mut_ptr() });
zynq7000_hal::eth::tx_descr::DescriptorListRef::new(tx_descr_init.as_mut_slice());
rx_descr_ref.init();
tx_descr_ref.init();
for (index, rx_buf) in rx_bufs.iter().enumerate() {
@@ -252,6 +254,6 @@ pub extern "C" fn _prefetch_handler() {
/// Panic handler
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
error!("Panic: {:?}", info);
error!("Panic: {info:?}");
loop {}
}