Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_46254178
rt-thread
提交
19bcf9ae
R
rt-thread
项目概览
weixin_46254178
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
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,发现更多精彩内容 >>
提交
19bcf9ae
编写于
8月 16, 2021
作者:
Thomas_Fly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add the formatted file
上级
30fd28a8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
32 deletion
+32
-32
src/irq.c
src/irq.c
+12
-12
src/timer.c
src/timer.c
+20
-20
未找到文件。
src/irq.c
浏览文件 @
19bcf9ae
...
...
@@ -22,11 +22,11 @@ static void (*rt_interrupt_leave_hook)(void);
/**
* @ingroup Hook
*
*
* @brief This function set a hook function when the system enter a interrupt
*
*
* @note the hook function must be simple and never be blocked or suspend.
*
*
* @param hook The function point to be called
*/
void
rt_interrupt_enter_sethook
(
void
(
*
hook
)(
void
))
...
...
@@ -36,11 +36,11 @@ void rt_interrupt_enter_sethook(void (*hook)(void))
/**
* @ingroup Hook
*
*
* @brief This function set a hook function when the system exit a interrupt.
*
*
* @note the hook function must be simple and never be blocked or suspend.
*
*
* @param hook The function point to be called
*/
void
rt_interrupt_leave_sethook
(
void
(
*
hook
)(
void
))
...
...
@@ -64,9 +64,9 @@ volatile rt_uint8_t rt_interrupt_nest = 0;
/**
* @brief This function will be invoked by BSP, when enter interrupt service routine
*
*
* @note please don't invoke this routine in application
*
*
* @see rt_interrupt_leave
*/
void
rt_interrupt_enter
(
void
)
...
...
@@ -86,9 +86,9 @@ RTM_EXPORT(rt_interrupt_enter);
/**
* @brief This function will be invoked by BSP, when leave interrupt service routine
*
*
* @note please don't invoke this routine in application
*
*
* @see rt_interrupt_enter
*/
void
rt_interrupt_leave
(
void
)
...
...
@@ -108,10 +108,10 @@ RTM_EXPORT(rt_interrupt_leave);
/**
* @brief This function will return the nest of interrupt.
*
*
* User application can invoke this function to get whether current
* context is interrupt context.
*
*
* @return rt_uint8_t the number of nested interrupts.
*/
RT_WEAK
rt_uint8_t
rt_interrupt_get_nest
(
void
)
...
...
src/timer.c
浏览文件 @
19bcf9ae
...
...
@@ -16,7 +16,7 @@
* 2012-12-15 Bernard fix the next timeout issue in soft timer
* 2014-07-12 Bernard does not lock scheduler when invoking soft-timer
* timeout function.
* 2021-08-15 supperthomas add the comment
* 2021-08-15 supperthomas add the comment
*/
#include <rtthread.h>
...
...
@@ -60,9 +60,9 @@ 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.
*
*
* @param hook the function point of timer
*/
void
rt_timer_enter_sethook
(
void
(
*
hook
)(
struct
rt_timer
*
timer
))
...
...
@@ -71,9 +71,9 @@ 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.
*
*
* @param hook the function point of timer
*/
void
rt_timer_exit_sethook
(
void
(
*
hook
)(
struct
rt_timer
*
timer
))
...
...
@@ -87,11 +87,11 @@ void rt_timer_exit_sethook(void (*hook)(struct rt_timer *timer))
/**
* @brief [internal] the init funtion of timer
*
*
* the internal called function of rt_timer_init
*
*
* @see rt_timer_init
*
*
* @param timer the static timer object
* @param timeout the timeout function
* @param parameter the parameter of timeout function
...
...
@@ -127,9 +127,9 @@ static void _rt_timer_init(rt_timer_t timer,
/**
* @brief find the next emtpy timer
*
*
* @param timer_list the timer of the next timeout
*
*
* @return rt_tick_t the point of timer
*/
static
rt_tick_t
rt_timer_list_next_timeout
(
rt_list_t
timer_list
[])
...
...
@@ -155,8 +155,8 @@ static rt_tick_t rt_timer_list_next_timeout(rt_list_t timer_list[])
}
/**
* @brief remove the timer
*
* @brief remove the timer
*
* @param timer the point of timer
*/
rt_inline
void
_rt_timer_remove
(
rt_timer_t
timer
)
...
...
@@ -172,8 +172,8 @@ rt_inline void _rt_timer_remove(rt_timer_t timer)
#if RT_DEBUG_TIMER
/**
* @brief the number of timer
*
* @param timer
*
* @param timer
* @return int the count
*/
static
int
rt_timer_count_height
(
struct
rt_timer
*
timer
)
...
...
@@ -189,7 +189,7 @@ static int rt_timer_count_height(struct rt_timer *timer)
}
/**
* @brief dump the all timer information
*
*
* @param timer_heads the head of timer
*/
void
rt_timer_dump
(
rt_list_t
timer_heads
[])
...
...
@@ -244,7 +244,7 @@ RTM_EXPORT(rt_timer_init);
/**
* @brief This function will detach a timer from timer management.
*
*
* @param timer the timer to be detached
* @return rt_err_t RT_EOK
*/
...
...
@@ -555,7 +555,7 @@ rt_err_t rt_timer_control(rt_timer_t timer, int cmd, void *arg)
RTM_EXPORT
(
rt_timer_control
);
/**
* @brief This function will check timer list, if a timeout event happens,
* @brief This function will check timer list, if a timeout event happens,
* the corresponding timeout function will be invoked.
*
* @note this function shall be invoked in operating system timer interrupt.
...
...
@@ -719,9 +719,9 @@ void rt_soft_timer_check(void)
}
/**
* @brief system timer thread entry
*
* @param parameter
* @brief system timer thread entry
*
* @param parameter
*/
static
void
rt_thread_timer_entry
(
void
*
parameter
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录