altos: Switch ao_radio_recv timeout to AO_TICK_TYPE
authorKeith Packard <keithp@keithp.com>
Fri, 28 Jan 2022 22:12:31 +0000 (14:12 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 17 Feb 2022 01:26:49 +0000 (17:26 -0800)
Make sure all times are in the wider type.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao.h

index af070cc11c5fdded1ca1a8e5d63b76315a57a933..c1a8609c6526c2ba24e67dab76192e0bb8b24542 100644 (file)
@@ -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
@@ -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);