@ -151,6 +151,7 @@ int spi_conf_pins(spi_t dev)
for (int i = 0; i < 3; i++) {
port->MODER &= ~(3 << (pin[i] * 2));
port->MODER |= (2 << (pin[i] * 2));
port->OSPEEDR |= (3 << (pin[i] * 2));
int hl = (pin[i] < 8) ? 0 : 1;
port->AFR[hl] &= ~(0xf << ((pin[i] - (hl * 8)) * 4));
port->AFR[hl] |= (af << ((pin[i] - (hl * 8)) * 4));
@ -147,6 +147,7 @@ int spi_conf_pins(spi_t dev)