altos: Fix pretend pad range for TeleLCO
[fw/altos] / src / stm32l0 / ao_arch_funcs.h
index 65cf3f6ffaae27b5657942081e1ae80754eb1421..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);
@@ -386,6 +386,8 @@ struct ao_stm_usart {
 #endif
 };
 
+#include <ao_lpuart.h>
+
 void
 ao_debug_out(char c);
 
@@ -591,4 +593,7 @@ ao_arch_wait_interrupt(void) {
 
 void start(void);
 
+bool
+ao_storage_device_is_erased(uint32_t pos);
+
 #endif /* _AO_ARCH_FUNCS_H_ */