#include "main.h" /* Main program. */ int main(void) { // Enable the GPIOa and GPIOC peripheral in RCC. RCC->AHB1ENR |= RCC_AHB1ENR_GPIOBEN ; // C0 is connected to the LED // It should be set to push-pull low-speed output. GPIOB->MODER &= ~(0x3 << (LED_PIN*2)); GPIOB->MODER |= (0x1 << (LED_PIN*2)); GPIOB->OTYPER &= ~(1 << LED_PIN); // set the led on GPIOB->ODR = (1 << LED_PIN); while (0) { GPIOB->ODR = (1 << LED_PIN); } }