summaryrefslogtreecommitdiff
path: root/src/clock.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-09-14 22:33:51 +0800
committerGitHub <[email protected]>2021-09-14 22:33:51 +0800
commitb2c64b797774b394184b2aaef3fbc1fa50a38f5a (patch)
tree0948643a09b4ad6eeb91ef4c1bda39146051c8fd /src/clock.c
parentf76a192fb38470954f25db5be598351258a7aeb4 (diff)
parent6cb093aa272a0b1ef908cbd8e103cbd94120b3c6 (diff)
Merge pull request #5039 from Guozhanxin/kernel_comment
Improve the Kernel comment
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/clock.c b/src/clock.c
index 77516b3775..fb7ee447d2 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)
{