Tentative fix for bug #502.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6933 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2014-05-13 12:45:35 +00:00
parent 0360026678
commit a0cfa6d054
2 changed files with 3 additions and 3 deletions

View File

@ -735,7 +735,7 @@ typedef struct {
* @xclass
*/
#define chVTTimeElapsedSinceX(start) \
((systime_t)(chVTGetSystemTimeX() - start))
((systime_t)(chVTGetSystemTimeX() - (start)))
/**
* @brief Checks if the specified time is within the specified time window.
@ -752,7 +752,7 @@ typedef struct {
* @xclass
*/
#define chVTIsTimeWithinX(time, start, end) \
((bool)((time) - (start) < (end) - (start)))
((bool)((systime_t)((time) - (start)) < (systime_t)((end) - (start))))
/**
* @brief Condition assertion.

View File

@ -197,7 +197,7 @@ void chSysTimerHandlerI(void) {
chSchReadyI(tp, MSG_TIMEOUT);
}
else {
if (tp->timeout <= next - 1)
if (tp->timeout <= (systime_t)(next - 1))
next = tp->timeout;
}
}