diff options
| author | liukangcc <[email protected]> | 2021-10-14 10:31:44 +0800 |
|---|---|---|
| committer | liukangcc <[email protected]> | 2021-10-14 10:32:22 +0800 |
| commit | 3ac36a31071f66a06217b4676fc7266ba66c906a (patch) | |
| tree | be32fc9b7abb102aa905fdba0165bf6adf4c065d /src/clock.c | |
| parent | 0369db718cd3b1ff58ceb2fc44a48641a0fecc66 (diff) | |
| parent | 33263d7e4ec22b118d0407ec7488ccfa60a8a0a1 (diff) | |
[update] Fix compiler flags issue
Diffstat (limited to 'src/clock.c')
| -rw-r--r-- | src/clock.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/clock.c b/src/clock.c index 77516b3775..21be3a4203 100644 --- a/src/clock.c +++ b/src/clock.c @@ -33,9 +33,9 @@ static volatile rt_tick_t rt_tick = 0; /**@{*/ /** - * This function will return current tick from operating system startup + * @brief This function will return current tick from operating system startup. * - * @return current tick + * @return Return current tick. */ rt_tick_t rt_tick_get(void) { @@ -45,7 +45,9 @@ rt_tick_t rt_tick_get(void) RTM_EXPORT(rt_tick_get); /** - * This function will set current tick + * @brief This function will set current tick. + * + * @param tick is the value that you will set. */ void rt_tick_set(rt_tick_t tick) { @@ -57,8 +59,8 @@ void rt_tick_set(rt_tick_t tick) } /** - * This function will notify kernel there is one tick passed. Normally, - * this function is invoked by clock ISR. + * @brief This function will notify kernel there is one tick passed. + * Normally, this function is invoked by clock ISR. */ void rt_tick_increase(void) { @@ -97,14 +99,14 @@ void rt_tick_increase(void) } /** - * This function will calculate the tick from millisecond. + * @brief This function will calculate the tick from millisecond. * - * @param ms the specified millisecond - * - Negative Number wait forever - * - Zero not wait - * - Max 0x7fffffff + * @param ms is the specified millisecond. + * - Negative Number wait forever + * - Zero not wait + * - Max 0x7fffffff * - * @return the calculated tick + * @return Return the calculated tick. */ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms) { @@ -126,9 +128,13 @@ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms) RTM_EXPORT(rt_tick_from_millisecond); /** - * This function will provide the passed millisecond from boot. + * @brief This function will return the passed millisecond from boot. + * + * @note if the value of RT_TICK_PER_SECOND is lower than 1000 or + * is not an integral multiple of 1000, this function will not + * provide the correct 1ms-based tick. * - * @return passed millisecond from boot + * @return Return passed millisecond from boot. */ RT_WEAK rt_tick_t rt_tick_get_millisecond(void) { |
