File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,11 @@ extern "C" {
106106#define RT_UINT64_MAX 0xFFFFFFFFFFFFFFFFULL /**< Maximum number of UINT64 */
107107#endif /* RT_USING_LIBC */
108108
109+ #ifdef RT_TICK_USING_64BIT
110+ #define RT_TICK_MAX RT_UINT64_MAX /**< Maximum number of tick */
111+ #else
109112#define RT_TICK_MAX RT_UINT32_MAX /**< Maximum number of tick */
113+ #endif /* RT_TICK_USING_64BIT */
110114
111115/* maximum value of ipc type */
112116#define RT_SEM_VALUE_MAX RT_UINT16_MAX /**< Maximum number of semaphore .value */
Original file line number Diff line number Diff line change @@ -89,7 +89,13 @@ typedef rt_ubase_t rt_uintptr_t; /**< Type for unsigned
8989
9090typedef rt_base_t rt_err_t ; /**< Type for error number */
9191typedef rt_uint32_t rt_time_t ; /**< Type for time stamp */
92+
93+ #ifdef RT_TICK_USING_64BIT
94+ typedef rt_uint64_t rt_tick_t ; /**< Type for tick count */
95+ #else
9296typedef rt_uint32_t rt_tick_t ; /**< Type for tick count */
97+ #endif /* RT_TICK_USING_64BIT */
98+
9399typedef rt_base_t rt_flag_t ; /**< Type for flags */
94100typedef rt_ubase_t rt_dev_t ; /**< Type for device */
95101typedef rt_base_t rt_off_t ; /**< Type for offset */
Original file line number Diff line number Diff 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 integer for rt_tick_t"
121+ default n
122+ help
123+ Using long long as tick unit, this is useful when the tick frequency is very high or long running device.
124+
119125config RT_USING_OVERFLOW_CHECK
120126 bool "Using stack overflow checking"
121127 default y if RT_USING_DEBUG
You can’t perform that action at this time.
0 commit comments