#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>

void clock_setup(){
rcc_clock_setup_in_hse_8mhz_out_72mhz();
}

void gpio_setup(){
rcc_periph_clock_enable(RCC_GPIOC);
gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ,GPIO_CNF_OUTPUT_PUSHPULL, GPIO13);
}

int main(){  
  clock_setup();
  gpio_setup();
  while(1){
    GPIOC_ODR ^= (1<<13);
    for (int i = 0; i < 500000; i++)	/* Wait enough to be visible. */
      __asm__("nop");
  }

}
