GPIO example works

This commit is contained in:
2024-06-12 11:29:12 +02:00
parent 622c0573f7
commit cd7a6499d4
8 changed files with 49 additions and 43 deletions

View File

@ -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);