TSCH: use RTIMER_CLOCK_DIFF to compute estimated drift, fixing a bug that would occur on 16-bit rtimer platforms
This commit is contained in:
parent
5b5f07ba52
commit
bb5e5d5c6b
14 changed files with 24 additions and 22 deletions
|
@ -55,10 +55,12 @@
|
|||
|
||||
#include "contiki-conf.h"
|
||||
|
||||
#ifndef RTIMER_CLOCK_LT
|
||||
#ifndef RTIMER_CLOCK_DIFF
|
||||
typedef unsigned short rtimer_clock_t;
|
||||
#define RTIMER_CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
|
||||
#endif /* RTIMER_CLOCK_LT */
|
||||
#define RTIMER_CLOCK_DIFF(a,b) ((signed short)((a)-(b)))
|
||||
#endif /* RTIMER_CLOCK_DIFF */
|
||||
|
||||
#define RTIMER_CLOCK_LT(a, b) (RTIMER_CLOCK_DIFF((a),(b)) < 0)
|
||||
|
||||
#include "rtimer-arch.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue