From 161f2a3aa7f7364c6d972df4199200828dfe3294 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 28 Jan 2022 14:12:31 -0800 Subject: [PATCH] altos: Switch ao_radio_recv timeout to AO_TICK_TYPE Make sure all times are in the wider type. Signed-off-by: Keith Packard --- src/kernel/ao.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/ao.h b/src/kernel/ao.h index af070cc1..c1a8609c 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -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); -- 2.30.2