altos: Switch ao_radio_recv timeout to AO_TICK_TYPE
[fw/altos] / src / kernel / ao.h
index be663775e91fab86eb119d7690a67fb961c7e1ff..c1a8609c6526c2ba24e67dab76192e0bb8b24542 100644 (file)
@@ -86,7 +86,7 @@ typedef AO_PORT_TYPE ao_port_t;
 
 /* Stop the operating system, beeping and blinking the reason */
 void
-ao_panic(uint8_t reason);
+ao_panic(uint8_t reason) __attribute__((noreturn));
 
 /*
  * ao_romconfig.c
@@ -112,7 +112,7 @@ extern volatile AO_TICK_TYPE ao_tick_count;
 #define AO_HERTZ               100
 #endif
 #define AO_MS_TO_TICKS(ms)     ((ms) / (1000 / AO_HERTZ))
-#define AO_SEC_TO_TICKS(s)     ((s) * AO_HERTZ)
+#define AO_SEC_TO_TICKS(s)     ((AO_TICK_TYPE) (s) * AO_HERTZ)
 
 /* Returns the current time in ticks */
 AO_TICK_TYPE
@@ -389,7 +389,7 @@ ao_spi_slave(void);
 #define AO_GPS_NEW_TRACKING    2
 
 extern uint8_t ao_gps_new;
-extern uint16_t ao_gps_tick;
+extern AO_TICK_TYPE ao_gps_tick;
 extern uint8_t ao_gps_mutex;
 extern struct ao_telemetry_location ao_gps_data;
 extern struct ao_telemetry_satellite ao_gps_tracking_data;
@@ -603,7 +603,7 @@ ao_radio_send(const void *d, uint8_t size);
 
 #if HAS_RADIO_RECV
 uint8_t
-ao_radio_recv(void *d, uint8_t size, uint8_t timeout);
+ao_radio_recv(void *d, uint8_t size, AO_TICK_TYPE timeout);
 
 void
 ao_radio_recv_abort(void);