#![no_std] #![no_main] #![allow(deprecated)] use bsp::hal; use bsp::hal::hal::digital::v2::InputPin; use panic_halt as _; use trinket_m0 as bsp; use bsp::entry; use hal::clock::GenericClockController; use hal::pac::{CorePeripherals, Peripherals}; fn foo(bar: I) { } #[entry] fn main() -> ! { let mut peripherals = Peripherals::take().unwrap(); let mut core = CorePeripherals::take().unwrap(); let mut clocks = GenericClockController::with_internal_32kosc( peripherals.GCLK, &mut peripherals.PM, &mut peripherals.SYSCTRL, &mut peripherals.NVMCTRL, ); let mut pins = bsp::Pins::new(peripherals.PORT); let inp = pins.d4.into_floating_input(&mut pins.port); foo(inp); loop { } }