GPIO example works
This commit is contained in:
@ -3,12 +3,9 @@
|
||||
#![no_std]
|
||||
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::digital::v2::{OutputPin, ToggleableOutputPin};
|
||||
use panic_halt as _;
|
||||
use va416xx_hal::{
|
||||
pac,
|
||||
gpio::PinsG
|
||||
};
|
||||
use embedded_hal::digital::v2::{ToggleableOutputPin, OutputPin};
|
||||
use va416xx_hal::{gpio::PinsG, pac};
|
||||
|
||||
// Mask for the LED
|
||||
const LED_PG5: u32 = 1 << 5;
|
||||
@ -54,7 +51,7 @@ fn main() -> ! {
|
||||
led.set_low().ok();
|
||||
cortex_m::asm::delay(5_000_000);
|
||||
led.set_high().ok();
|
||||
};
|
||||
}
|
||||
loop {
|
||||
led.toggle().ok();
|
||||
cortex_m::asm::delay(25_000_000);
|
||||
|
Reference in New Issue
Block a user