From 6dbb631f1ecb75361ee70da91f50779c29f23482 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Wed, 1 Mar 2023 01:32:42 +0100 Subject: Example fixes. --- examples/nrf52840/src/bin/usb_ethernet.rs | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'examples/nrf52840/src') diff --git a/examples/nrf52840/src/bin/usb_ethernet.rs b/examples/nrf52840/src/bin/usb_ethernet.rs index 430468adf..979780896 100644 --- a/examples/nrf52840/src/bin/usb_ethernet.rs +++ b/examples/nrf52840/src/bin/usb_ethernet.rs @@ -46,31 +46,8 @@ async fn net_task(stack: &'static Stack>) -> ! { stack.run().await } -#[inline(never)] -pub fn test_function() -> (usize, u32, [u32; 2]) { - let mut array = [3; 2]; - - let mut index = 0; - let mut result = 0; - - for x in [1, 2] { - if x == 1 { - array[1] = 99; - } else { - index = if x == 2 { 1 } else { 0 }; - - // grabs value from array[0], not array[1] - result = array[index]; - } - } - - (index, result, array) -} - #[embassy_executor::main] async fn main(spawner: Spawner) { - info!("{:?}", test_function()); - let p = embassy_nrf::init(Default::default()); let clock: pac::CLOCK = unsafe { mem::transmute(()) }; -- cgit