AVR platforms: use 32 bit clock_time_t.
This commit is contained in:
parent
6def22b3c5
commit
2e78558964
|
@ -56,18 +56,10 @@
|
||||||
*/
|
*/
|
||||||
/* Clock ticks per second */
|
/* Clock ticks per second */
|
||||||
#define CLOCK_CONF_SECOND 128
|
#define CLOCK_CONF_SECOND 128
|
||||||
#if 1
|
|
||||||
/* 16 bit counter overflows every ~10 minutes */
|
typedef uint32_t clock_time_t;
|
||||||
typedef unsigned short clock_time_t;
|
#define CLOCK_LT(a,b) ((int32_t)((a)-(b)) < 0)
|
||||||
#define CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffff
|
|
||||||
#define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#else
|
|
||||||
typedef unsigned long clock_time_t;
|
|
||||||
#define CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffffffff
|
|
||||||
#endif
|
|
||||||
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
||||||
void clock_delay_msec(uint16_t howlong);
|
void clock_delay_msec(uint16_t howlong);
|
||||||
void clock_adjust_ticks(clock_time_t howmany);
|
void clock_adjust_ticks(clock_time_t howmany);
|
||||||
|
|
|
@ -68,18 +68,10 @@
|
||||||
*/
|
*/
|
||||||
/* Clock ticks per second */
|
/* Clock ticks per second */
|
||||||
#define CLOCK_CONF_SECOND 128
|
#define CLOCK_CONF_SECOND 128
|
||||||
#if 1
|
|
||||||
/* 16 bit counter overflows every ~10 minutes */
|
typedef uint32_t clock_time_t;
|
||||||
typedef unsigned short clock_time_t;
|
#define CLOCK_LT(a,b) ((int32_t)((a)-(b)) < 0)
|
||||||
#define CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffff
|
|
||||||
#define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#else
|
|
||||||
typedef unsigned long clock_time_t;
|
|
||||||
#define CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffffffff
|
|
||||||
#endif
|
|
||||||
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
||||||
void clock_delay_msec(uint16_t howlong);
|
void clock_delay_msec(uint16_t howlong);
|
||||||
void clock_adjust_ticks(clock_time_t howmany);
|
void clock_adjust_ticks(clock_time_t howmany);
|
||||||
|
|
|
@ -70,18 +70,10 @@
|
||||||
*/
|
*/
|
||||||
/* Clock ticks per second */
|
/* Clock ticks per second */
|
||||||
#define CLOCK_CONF_SECOND 125
|
#define CLOCK_CONF_SECOND 125
|
||||||
#if 1
|
|
||||||
/* 16 bit counter overflows every ~10 minutes */
|
typedef uint32_t clock_time_t;
|
||||||
typedef unsigned short clock_time_t;
|
#define CLOCK_LT(a,b) ((int32_t)((a)-(b)) < 0)
|
||||||
#define CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffff
|
|
||||||
#define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#else
|
|
||||||
typedef unsigned long clock_time_t;
|
|
||||||
#define CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffffffff
|
|
||||||
#endif
|
|
||||||
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
||||||
void clock_delay_msec(uint16_t howlong);
|
void clock_delay_msec(uint16_t howlong);
|
||||||
void clock_adjust_ticks(clock_time_t howmany);
|
void clock_adjust_ticks(clock_time_t howmany);
|
||||||
|
|
|
@ -62,18 +62,10 @@
|
||||||
*/
|
*/
|
||||||
/* Clock ticks per second */
|
/* Clock ticks per second */
|
||||||
#define CLOCK_CONF_SECOND 125
|
#define CLOCK_CONF_SECOND 125
|
||||||
#if 1
|
|
||||||
/* 16 bit counter overflows every ~10 minutes */
|
typedef uint32_t clock_time_t;
|
||||||
typedef unsigned short clock_time_t;
|
#define CLOCK_LT(a,b) ((int32_t)((a)-(b)) < 0)
|
||||||
#define CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffff
|
|
||||||
#define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#else
|
|
||||||
typedef unsigned long clock_time_t;
|
|
||||||
#define CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffffffff
|
|
||||||
#endif
|
|
||||||
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
||||||
void clock_delay_msec(uint16_t howlong);
|
void clock_delay_msec(uint16_t howlong);
|
||||||
void clock_adjust_ticks(clock_time_t howmany);
|
void clock_adjust_ticks(clock_time_t howmany);
|
||||||
|
|
|
@ -62,18 +62,10 @@
|
||||||
*/
|
*/
|
||||||
/* Clock ticks per second */
|
/* Clock ticks per second */
|
||||||
#define CLOCK_CONF_SECOND 125
|
#define CLOCK_CONF_SECOND 125
|
||||||
#if 1
|
|
||||||
/* 16 bit counter overflows every ~10 minutes */
|
typedef uint32_t clock_time_t;
|
||||||
typedef unsigned short clock_time_t;
|
#define CLOCK_LT(a,b) ((int32_t)((a)-(b)) < 0)
|
||||||
#define CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffff
|
|
||||||
#define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#else
|
|
||||||
typedef unsigned long clock_time_t;
|
|
||||||
#define CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffffffff
|
|
||||||
#endif
|
|
||||||
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
||||||
void clock_delay_msec(uint16_t howlong);
|
void clock_delay_msec(uint16_t howlong);
|
||||||
void clock_adjust_ticks(clock_time_t howmany);
|
void clock_adjust_ticks(clock_time_t howmany);
|
||||||
|
|
|
@ -56,18 +56,10 @@
|
||||||
*/
|
*/
|
||||||
/* Clock ticks per second */
|
/* Clock ticks per second */
|
||||||
#define CLOCK_CONF_SECOND 128
|
#define CLOCK_CONF_SECOND 128
|
||||||
#if 1
|
|
||||||
/* 16 bit counter overflows every ~10 minutes */
|
typedef uint32_t clock_time_t;
|
||||||
typedef unsigned short clock_time_t;
|
#define CLOCK_LT(a,b) ((int32_t)((a)-(b)) < 0)
|
||||||
#define CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffff
|
|
||||||
#define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */
|
|
||||||
#else
|
|
||||||
typedef unsigned long clock_time_t;
|
|
||||||
#define CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
|
|
||||||
#define INFINITE_TIME 0xffffffff
|
|
||||||
#endif
|
|
||||||
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
/* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */
|
||||||
void clock_delay_msec(uint16_t howlong);
|
void clock_delay_msec(uint16_t howlong);
|
||||||
void clock_adjust_ticks(clock_time_t howmany);
|
void clock_adjust_ticks(clock_time_t howmany);
|
||||||
|
|
Loading…
Reference in a new issue