Skip to content

Commit e591422

Browse files
committed
[add]tick long long unit
1 parent 443d56c commit e591422

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

include/rttypes.h

+6-1
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_USING_TICK_LL_UNIT
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_USING_TICK_LL_UNIT */
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

+6
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_USING_TICK_LL_UNIT
120+
bool "Using long long as tick unit"
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)