//! Turns the user LED on

#![deny(unsafe_code)]
#![deny(warnings)]
#![no_main]
#![no_std]

extern crate panic_halt;
extern crate cortex_m_rt as rt;

use stm32f1xx_hal::{
    prelude::*,
    pac,
};
use cortex_m_rt::entry;

#[entry]
fn main() -> ! {
    let p = pac::Peripherals::take().unwrap();

    let mut rcc = p.RCC.constrain();
    let mut gpioc = p.GPIOC.split(&mut rcc.apb2);

    #[cfg(feature = "stm32f100")]
    gpioc.pc9.into_push_pull_output(&mut gpioc.crh).set_high();

    #[cfg(feature = "stm32f103")]
    gpioc.pc13.into_push_pull_output(&mut gpioc.crh).set_high();

    loop {}
}
