From 6d1e159f4cf4cb093f4c527bbd7ec601c4850e32 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Tue, 11 Jan 2022 08:21:25 +0100 Subject: [PATCH] sam354xplaintedpro: use v2 API --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);