Flashing & Blinky

This commit is contained in:
Lorenzo Good 2026-06-01 18:19:56 -04:00
parent a433b88319
commit 5ef16da100
Signed by: lorenzo
GPG key ID: 7FCD64BD81180ED0
7 changed files with 40 additions and 4 deletions

View file

@ -6,7 +6,10 @@
use panic_halt;
use cortex_m_rt::entry;
use stm32l4xx_hal::{prelude::*, flash::FlashExt, gpio::GpioExt, pac, pwr::PwrExt, rcc::RccExt, time::Hertz, delay::Delay};
use stm32l4xx_hal::{
delay::Delay, flash::FlashExt, gpio::GpioExt, pac, prelude::*, pwr::PwrExt, rcc::RccExt,
time::Hertz,
};
#[entry]
fn main() -> ! {
@ -20,7 +23,8 @@ fn main() -> ! {
// Ok for now, but ideally actually think about what this does (especially when we have tim).
let clocks = rcc
.cfgr
.hclk(Hertz::MHz(8))
.sysclk(Hertz::MHz(64))
.pclk1(Hertz::MHz(32))
.freeze(&mut flash.acr, &mut pwr);
let mut gpioa = dp.GPIOA.split(&mut rcc.ahb2);