Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
a35520f8
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a35520f8
编写于
8月 30, 2021
作者:
Thomas_Fly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the return
上级
320c44ad
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
40 addition
and
40 deletion
+40
-40
src/irq.c
src/irq.c
+3
-3
src/timer.c
src/timer.c
+37
-37
未找到文件。
src/irq.c
浏览文件 @
a35520f8
...
@@ -27,7 +27,7 @@ static void (*rt_interrupt_leave_hook)(void);
...
@@ -27,7 +27,7 @@ static void (*rt_interrupt_leave_hook)(void);
*
*
* @note The hook function must be simple and never be blocked or suspend.
* @note The hook function must be simple and never be blocked or suspend.
*
*
* @param hook
T
he function point to be called
* @param hook
t
he function point to be called
*/
*/
void
rt_interrupt_enter_sethook
(
void
(
*
hook
)(
void
))
void
rt_interrupt_enter_sethook
(
void
(
*
hook
)(
void
))
{
{
...
@@ -41,7 +41,7 @@ void rt_interrupt_enter_sethook(void (*hook)(void))
...
@@ -41,7 +41,7 @@ void rt_interrupt_enter_sethook(void (*hook)(void))
*
*
* @note The hook function must be simple and never be blocked or suspend.
* @note The hook function must be simple and never be blocked or suspend.
*
*
* @param hook
T
he function point to be called
* @param hook
t
he function point to be called
*/
*/
void
rt_interrupt_leave_sethook
(
void
(
*
hook
)(
void
))
void
rt_interrupt_leave_sethook
(
void
(
*
hook
)(
void
))
{
{
...
@@ -112,7 +112,7 @@ RTM_EXPORT(rt_interrupt_leave);
...
@@ -112,7 +112,7 @@ RTM_EXPORT(rt_interrupt_leave);
* User application can invoke this function to get whether current
* User application can invoke this function to get whether current
* context is interrupt context.
* context is interrupt context.
*
*
* @return
rt_uint8_t
the number of nested interrupts.
* @return the number of nested interrupts.
*/
*/
RT_WEAK
rt_uint8_t
rt_interrupt_get_nest
(
void
)
RT_WEAK
rt_uint8_t
rt_interrupt_get_nest
(
void
)
{
{
...
...
src/timer.c
浏览文件 @
a35520f8
...
@@ -63,7 +63,7 @@ static void (*rt_timer_exit_hook)(struct rt_timer *timer);
...
@@ -63,7 +63,7 @@ static void (*rt_timer_exit_hook)(struct rt_timer *timer);
* @brief This function will set a hook function on timer,
* @brief This function will set a hook function on timer,
* which will be invoked when enter timer timeout callback function.
* which will be invoked when enter timer timeout callback function.
*
*
* @param hook
T
he function point of timer
* @param hook
is t
he function point of timer
*/
*/
void
rt_timer_enter_sethook
(
void
(
*
hook
)(
struct
rt_timer
*
timer
))
void
rt_timer_enter_sethook
(
void
(
*
hook
)(
struct
rt_timer
*
timer
))
{
{
...
@@ -74,7 +74,7 @@ void rt_timer_enter_sethook(void (*hook)(struct rt_timer *timer))
...
@@ -74,7 +74,7 @@ void rt_timer_enter_sethook(void (*hook)(struct rt_timer *timer))
* @brief This function will set a hook function, which will be
* @brief This function will set a hook function, which will be
* invoked when exit timer timeout callback function.
* invoked when exit timer timeout callback function.
*
*
* @param hook
T
he function point of timer
* @param hook
is t
he function point of timer
*/
*/
void
rt_timer_exit_sethook
(
void
(
*
hook
)(
struct
rt_timer
*
timer
))
void
rt_timer_exit_sethook
(
void
(
*
hook
)(
struct
rt_timer
*
timer
))
{
{
...
@@ -92,15 +92,15 @@ void rt_timer_exit_sethook(void (*hook)(struct rt_timer *timer))
...
@@ -92,15 +92,15 @@ void rt_timer_exit_sethook(void (*hook)(struct rt_timer *timer))
*
*
* @see rt_timer_init
* @see rt_timer_init
*
*
* @param timer
The static
timer object
* @param timer
is
timer object
*
*
* @param timeout
T
he timeout function
* @param timeout
is t
he timeout function
*
*
* @param parameter
T
he parameter of timeout function
* @param parameter
is t
he parameter of timeout function
*
*
* @param time
T
he tick of timer
* @param time
is t
he tick of timer
*
*
* @param flag
T
he flag of timer
* @param flag
t
he flag of timer
*/
*/
static
void
_timer_init
(
rt_timer_t
timer
,
static
void
_timer_init
(
rt_timer_t
timer
,
void
(
*
timeout
)(
void
*
parameter
),
void
(
*
timeout
)(
void
*
parameter
),
...
@@ -132,9 +132,9 @@ static void _timer_init(rt_timer_t timer,
...
@@ -132,9 +132,9 @@ static void _timer_init(rt_timer_t timer,
/**
/**
* @brief Find the next emtpy timer ticks
* @brief Find the next emtpy timer ticks
*
*
* @param timer_list
The timer of the next timeou
t
* @param timer_list
is the array of time lis
t
*
*
* @return
rt_tick_t T
he next timer's ticks
* @return
t
he next timer's ticks
*/
*/
static
rt_tick_t
_timer_list_next_timeout
(
rt_list_t
timer_list
[])
static
rt_tick_t
_timer_list_next_timeout
(
rt_list_t
timer_list
[])
{
{
...
@@ -161,7 +161,7 @@ static rt_tick_t _timer_list_next_timeout(rt_list_t timer_list[])
...
@@ -161,7 +161,7 @@ static rt_tick_t _timer_list_next_timeout(rt_list_t timer_list[])
/**
/**
* @brief Remove the timer
* @brief Remove the timer
*
*
* @param timer
T
he point of the timer
* @param timer
t
he point of the timer
*/
*/
rt_inline
void
_timer_remove
(
rt_timer_t
timer
)
rt_inline
void
_timer_remove
(
rt_timer_t
timer
)
{
{
...
@@ -179,7 +179,7 @@ rt_inline void _timer_remove(rt_timer_t timer)
...
@@ -179,7 +179,7 @@ rt_inline void _timer_remove(rt_timer_t timer)
*
*
* @param timer the head of timer
* @param timer the head of timer
*
*
* @return
int the
count of timer
* @return count of timer
*/
*/
static
int
_timer_count_height
(
struct
rt_timer
*
timer
)
static
int
_timer_count_height
(
struct
rt_timer
*
timer
)
{
{
...
@@ -224,17 +224,17 @@ void rt_timer_dump(rt_list_t timer_heads[])
...
@@ -224,17 +224,17 @@ void rt_timer_dump(rt_list_t timer_heads[])
* @brief This function will initialize a timer
* @brief This function will initialize a timer
* normally this function is used to initialize a static timer object.
* normally this function is used to initialize a static timer object.
*
*
* @param timer
The static timer object
* @param timer
is the point of timer
*
*
* @param name
The name of
timer
* @param name
is a pointer to the name of the
timer
*
*
* @param timeout
The timeout function
* @param timeout
is the callback of timer
*
*
* @param parameter
The parameter of timeout function
* @param parameter
is the param of the callback
*
*
* @param time
The tick
of timer
* @param time
is the ticks
of timer
*
*
* @param flag
T
he flag of timer
* @param flag
is t
he flag of timer
*/
*/
void
rt_timer_init
(
rt_timer_t
timer
,
void
rt_timer_init
(
rt_timer_t
timer
,
const
char
*
name
,
const
char
*
name
,
...
@@ -256,9 +256,9 @@ RTM_EXPORT(rt_timer_init);
...
@@ -256,9 +256,9 @@ RTM_EXPORT(rt_timer_init);
/**
/**
* @brief This function will detach a timer from timer management.
* @brief This function will detach a timer from timer management.
*
*
* @param timer
T
he timer to be detached
* @param timer
is t
he timer to be detached
*
*
* @return
rt_err_t T
he status of detach
* @return
t
he status of detach
*/
*/
rt_err_t
rt_timer_detach
(
rt_timer_t
timer
)
rt_err_t
rt_timer_detach
(
rt_timer_t
timer
)
{
{
...
@@ -289,17 +289,17 @@ RTM_EXPORT(rt_timer_detach);
...
@@ -289,17 +289,17 @@ RTM_EXPORT(rt_timer_detach);
/**
/**
* @brief This function will create a timer
* @brief This function will create a timer
*
*
* @param name
T
he name of timer
* @param name
t
he name of timer
*
*
* @param timeout
T
he timeout function
* @param timeout
t
he timeout function
*
*
* @param parameter
T
he parameter of timeout function
* @param parameter
t
he parameter of timeout function
*
*
* @param time
T
he tick of timer
* @param time
t
he tick of timer
*
*
* @param flag
T
he flag of timer
* @param flag
t
he flag of timer
*
*
* @return
T
he created timer object
* @return
t
he created timer object
*/
*/
rt_timer_t
rt_timer_create
(
const
char
*
name
,
rt_timer_t
rt_timer_create
(
const
char
*
name
,
void
(
*
timeout
)(
void
*
parameter
),
void
(
*
timeout
)(
void
*
parameter
),
...
@@ -325,9 +325,9 @@ RTM_EXPORT(rt_timer_create);
...
@@ -325,9 +325,9 @@ RTM_EXPORT(rt_timer_create);
/**
/**
* @brief This function will delete a timer and release timer memory
* @brief This function will delete a timer and release timer memory
*
*
* @param timer
T
he timer to be deleted
* @param timer
t
he timer to be deleted
*
*
* @return
rt_err_t T
he operation status, RT_EOK on OK; RT_ERROR on error
* @return
t
he operation status, RT_EOK on OK; RT_ERROR on error
*/
*/
rt_err_t
rt_timer_delete
(
rt_timer_t
timer
)
rt_err_t
rt_timer_delete
(
rt_timer_t
timer
)
{
{
...
@@ -358,9 +358,9 @@ RTM_EXPORT(rt_timer_delete);
...
@@ -358,9 +358,9 @@ RTM_EXPORT(rt_timer_delete);
/**
/**
* @brief This function will start the timer
* @brief This function will start the timer
*
*
* @param timer
T
he timer to be started
* @param timer
t
he timer to be started
*
*
* @return
T
he operation status, RT_EOK on OK, -RT_ERROR on error
* @return
t
he operation status, RT_EOK on OK, -RT_ERROR on error
*/
*/
rt_err_t
rt_timer_start
(
rt_timer_t
timer
)
rt_err_t
rt_timer_start
(
rt_timer_t
timer
)
{
{
...
@@ -481,9 +481,9 @@ RTM_EXPORT(rt_timer_start);
...
@@ -481,9 +481,9 @@ RTM_EXPORT(rt_timer_start);
/**
/**
* @brief This function will stop the timer
* @brief This function will stop the timer
*
*
* @param timer
T
he timer to be stopped
* @param timer
t
he timer to be stopped
*
*
* @return
T
he operation status, RT_EOK on OK, -RT_ERROR on error
* @return
t
he operation status, RT_EOK on OK, -RT_ERROR on error
*/
*/
rt_err_t
rt_timer_stop
(
rt_timer_t
timer
)
rt_err_t
rt_timer_stop
(
rt_timer_t
timer
)
{
{
...
@@ -515,11 +515,11 @@ RTM_EXPORT(rt_timer_stop);
...
@@ -515,11 +515,11 @@ RTM_EXPORT(rt_timer_stop);
/**
/**
* @brief This function will get or set some options of the timer
* @brief This function will get or set some options of the timer
*
*
* @param timer
T
he timer to be get or set
* @param timer
t
he timer to be get or set
* @param cmd
T
he control command
* @param cmd
t
he control command
* @param arg
T
he argument
* @param arg
t
he argument
*
*
* @return
rt_err_t
the statu of control
* @return the statu of control
*/
*/
rt_err_t
rt_timer_control
(
rt_timer_t
timer
,
int
cmd
,
void
*
arg
)
rt_err_t
rt_timer_control
(
rt_timer_t
timer
,
int
cmd
,
void
*
arg
)
{
{
...
@@ -648,7 +648,7 @@ void rt_timer_check(void)
...
@@ -648,7 +648,7 @@ void rt_timer_check(void)
/**
/**
* @brief This function will return the next timeout tick in the system.
* @brief This function will return the next timeout tick in the system.
*
*
* @return
T
he next timeout tick in the system
* @return
t
he next timeout tick in the system
*/
*/
rt_tick_t
rt_timer_next_timeout_tick
(
void
)
rt_tick_t
rt_timer_next_timeout_tick
(
void
)
{
{
...
@@ -737,7 +737,7 @@ void rt_soft_timer_check(void)
...
@@ -737,7 +737,7 @@ void rt_soft_timer_check(void)
/**
/**
* @brief System timer thread entry
* @brief System timer thread entry
*
*
* @param parameter
T
he arg of the thread
* @param parameter
is t
he arg of the thread
*/
*/
static
void
_timer_thread_entry
(
void
*
parameter
)
static
void
_timer_thread_entry
(
void
*
parameter
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录