diff --git a/src/main.rs b/src/main.rs index fdf28dc..caf85bf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,7 @@ use panic_halt as _; #[cfg(feature = "use_semihosting")] use panic_semihosting as _; -use bsp::entry; +use bsp::{entry, gpio::v2::Pins, gpio::v2::ReadableOutput}; use hal::clock::GenericClockController; use hal::delay::Delay; use hal::pac::{CorePeripherals, Peripherals}; @@ -31,8 +31,8 @@ fn main() -> ! { let mut delay = Delay::new(core.SYST, &mut clocks); delay.delay_ms(400u16); - let mut pins = bsp::Pins::new(peripherals.PORT); - let mut led = pins.led.into_open_drain_output(&mut pins.port); + let pins = Pins::new(peripherals.PORT); + let mut led = pins.pc18.into_mode::(); let mut wdt = Watchdog::new(peripherals.WDT); wdt.start(WatchdogTimeout::Cycles256 as u8);