From: Keith Packard Date: Fri, 28 Jan 2022 22:12:31 +0000 (-0800) Subject: altos: Switch ao_radio_recv timeout to AO_TICK_TYPE X-Git-Tag: 1.9.10.4~39 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=161f2a3aa7f7364c6d972df4199200828dfe3294 altos: Switch ao_radio_recv timeout to AO_TICK_TYPE Make sure all times are in the wider type. Signed-off-by: Keith Packard --- 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);