#![no_std]
#![no_main]
mod exception;
mod config;
use config::sys_tick_config;
use cortex_m_semihosting::hprintln;
use panic_semihosting as _;
use cortex_m_rt::entry;
use stm32l4::stm32l4x6;
#[entry]
fn main() -> ! {
sys_tick_config();
let p = stm32l4x6::Peripherals::take().unwrap();
let rcc = p.RCC;
let msg = "Hello, World! xjh!!\r\n";
let gpioe = p.GPIOE;
rcc.ahb2enr.write(|w| w.gpioeen().set_bit());
gpioe.moder.write(|w| w.moder9().output());
gpioe.odr.write(|w| w.odr9().set_bit());
loop {
gpioe.odr.modify(|r, w| w.odr9().bit(!r.odr9().bit()));
hprintln!("{}", msg);
for _ in 0..8_000 {
cortex_m::asm::nop(); }
}
}