From 8e8efedf205904ba59ddf38365034e932005384f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 9 Dec 2017 10:03:56 +0000 Subject: Fixed tickles mode with 16 bits system time. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11136 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/include/ch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'os') diff --git a/os/nil/include/ch.h b/os/nil/include/ch.h index 464219c45..aca77e2c8 100644 --- a/os/nil/include/ch.h +++ b/os/nil/include/ch.h @@ -1420,8 +1420,8 @@ struct nil_system { * @xclass */ #define chTimeIsInRangeX(time, start, end) \ - ((bool)(((systime_t)(time) - (systime_t)(start)) < \ - ((systime_t)(end) - (systime_t)(start)))) + ((bool)((systime_t)((systime_t)(time) - (systime_t)(start)) < \ + (systime_t)((systime_t)(end) - (systime_t)(start)))) /** * @brief Function parameters check. -- cgit v1.2.3