Skip to content

Commit 9ed39f1

Browse files
committed
[add]tick 64 bits
1 parent 443d56c commit 9ed39f1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

include/rttypes.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,14 @@ typedef rt_ubase_t rt_intptr_t; /**< Type for signed poi
8181
typedef rt_base_t rt_uintptr_t; /**< Type for unsigned pointer length integer */
8282
#endif /* defined(RT_USING_LIBC) && !defined(RT_USING_NANO) */
8383

84+
#ifdef RT_TICK_USING_64BIT
85+
typedef rt_uint64_t rt_tick_t; /**< Type for tick count */
86+
#else
87+
typedef rt_uint32_t rt_tick_t; /**< Type for tick count */
88+
#endif /* RT_TICK_USING_64BIT */
89+
8490
typedef rt_base_t rt_err_t; /**< Type for error number */
8591
typedef rt_uint32_t rt_time_t; /**< Type for time stamp */
86-
typedef rt_uint32_t rt_tick_t; /**< Type for tick count */
8792
typedef rt_base_t rt_flag_t; /**< Type for flags */
8893
typedef rt_ubase_t rt_dev_t; /**< Type for device */
8994
typedef rt_base_t rt_off_t; /**< Type for offset */

src/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ config RT_TICK_PER_SECOND
116116
help
117117
System's tick frequency, Hz.
118118

119+
config RT_TICK_USING_64BIT
120+
bool "Using 64-bit systick"
121+
default n
122+
help
123+
Using long long as tick unit, this is useful when the tick frequency is very high.
124+
119125
config RT_USING_HOOK
120126
bool "Enable system hook"
121127
default y

0 commit comments

Comments
 (0)