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:
parent
0360026678
commit
a0cfa6d054
|
@ -735,7 +735,7 @@ typedef struct {
|
||||||
* @xclass
|
* @xclass
|
||||||
*/
|
*/
|
||||||
#define chVTTimeElapsedSinceX(start) \
|
#define chVTTimeElapsedSinceX(start) \
|
||||||
((systime_t)(chVTGetSystemTimeX() - start))
|
((systime_t)(chVTGetSystemTimeX() - (start)))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks if the specified time is within the specified time window.
|
* @brief Checks if the specified time is within the specified time window.
|
||||||
|
@ -752,7 +752,7 @@ typedef struct {
|
||||||
* @xclass
|
* @xclass
|
||||||
*/
|
*/
|
||||||
#define chVTIsTimeWithinX(time, start, end) \
|
#define chVTIsTimeWithinX(time, start, end) \
|
||||||
((bool)((time) - (start) < (end) - (start)))
|
((bool)((systime_t)((time) - (start)) < (systime_t)((end) - (start))))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Condition assertion.
|
* @brief Condition assertion.
|
||||||
|
|
|
@ -197,7 +197,7 @@ void chSysTimerHandlerI(void) {
|
||||||
chSchReadyI(tp, MSG_TIMEOUT);
|
chSchReadyI(tp, MSG_TIMEOUT);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (tp->timeout <= next - 1)
|
if (tp->timeout <= (systime_t)(next - 1))
|
||||||
next = tp->timeout;
|
next = tp->timeout;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue