altos: Add SPI bus parameter to ao_spi_speed
[fw/altos] / src / samd21 / ao_arch_funcs.h
index 32670b45ca1897bc1f6a3016a4fd9c1cf4902930..754ca3b51c3c84ecc4c8a6e2079ea64c8c8f54ba 100644 (file)
@@ -282,10 +282,11 @@ ao_spi_put_bit(struct samd21_port *port, uint8_t bit, uint16_t spi_index)
 }
 
 static inline uint8_t
-ao_spi_speed(uint32_t hz)
+ao_spi_speed(int index, uint32_t hz)
 {
        int32_t baud = (int32_t) (AO_SYSCLK / (2 * hz)) - 1;
 
+       (void) index;
        if (baud < 1)
                baud = 1;
        if (baud > 255)