/* Initialize the boards on-board LEDs. 
The LEDs initialization is hard-coded in this function. As the LED is soldered onto the board it is fixed to its CPU pins.  */
static void leds_init(void)
/* Initialize the boards on-board LEDs. 
The LEDs initialization is hard-coded in this function. As the LED is soldered onto the board it is fixed to its CPU pins.  */
static void leds_init(void)
{
    RCC->APB2ENR |= RCC_APB2ENR_IOPAEN;
    LED_PORT->CR[1] &= ~(0xf << (4*(LED_RED_PIN - 8)) |
                       0xf << (4*(LED_GREEN_PIN - 8)) |
                       0xf << (4*(LED_BLUE_PIN - 8)) |
                       0xf << (4*(LED_WHITE_PIN - 8)));
    LED_PORT->CR[1] |= (0x3 << (4*(LED_RED_PIN - 8)) |
                      0x3 << (4*(LED_GREEN_PIN - 8)) |
                      0x3 << (4*(LED_BLUE_PIN - 8)) |
                      0x3 << (4*(LED_WHITE_PIN - 8)));
    LED_PORT->BSRR = (1 << LED_RED_PIN) | (1 << LED_GREEN_PIN) | (1 << LED_BLUE_PIN) | (1 << LED_WHITE_PIN);
}