altosui: Add config and pyro tabs to graph widget
[fw/altos] / src / stm32l0 / ao_arch_funcs.h
index 297bd66c76684b9762fba85f6e67f68fd7b206a3..5f0f07dea9ed0d7a6ce3ce2a67170beebf55c7d9 100644 (file)
@@ -36,8 +36,9 @@
 /* Companion bus wants something no faster than 200kHz */
 
 static inline uint32_t
-ao_spi_speed(uint32_t hz)
+ao_spi_speed(int index, uint32_t hz)
 {
+       (void) index;
        if (hz >= 4000000) return _AO_SPI_SPEED_4MHz;
        if (hz >= 2000000) return _AO_SPI_SPEED_2MHz;
        if (hz >= 1000000) return _AO_SPI_SPEED_1MHz;
@@ -133,14 +134,13 @@ ao_spi_recv_byte(uint8_t spi_index)
        stm_spi->dr = 0xff;
        while (!(stm_spi->sr & (1 << STM_SPI_SR_RXNE)))
                ;
-       return stm_spi->dr;
+       return (uint8_t) stm_spi->dr;
 }
 
 void
 ao_spi_recv(void *block, uint16_t len, uint8_t spi_index);
 
-void
-ao_spi_duplex(const void *out, void *in, uint16_t len, uint8_t spi_index);
+#define AO_SPI_DUPLEX  0
 
 void
 ao_spi_init(void);