sam354xplaintedpro: use v2 API
This commit is contained in:
		@@ -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::<ReadableOutput>();
 | 
			
		||||
 | 
			
		||||
    let mut wdt = Watchdog::new(peripherals.WDT);
 | 
			
		||||
    wdt.start(WatchdogTimeout::Cycles256 as u8);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user