Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76519099
rt-thread
提交
33a6700f
R
rt-thread
项目概览
2301_76519099
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
3
Star
1
Fork
1
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
33a6700f
编写于
8月 15, 2021
作者:
Thomas_Fly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add the comment of irq.c
上级
fea12e09
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
14 deletion
+25
-14
src/irq.c
src/irq.c
+25
-14
未找到文件。
src/irq.c
浏览文件 @
33a6700f
...
...
@@ -9,6 +9,7 @@
* 2006-05-03 Bernard add IRQ_DEBUG
* 2016-08-09 ArdaFu add interrupt enter and leave hook.
* 2018-11-22 Jesven rt_interrupt_get_nest function add disable irq
* 2021-08-15 Supperthomas fix the comment
*/
#include <rthw.h>
...
...
@@ -21,19 +22,26 @@ static void (*rt_interrupt_leave_hook)(void);
/**
* @ingroup Hook
* This function set a hook function when the system enter a interrupt
*
*
* @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
))
{
rt_interrupt_enter_hook
=
hook
;
}
/**
* @ingroup Hook
* This function set a hook function when the system exit a interrupt.
*
*
* @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
))
{
...
...
@@ -53,11 +61,12 @@ void rt_interrupt_leave_sethook(void (*hook)(void))
volatile
rt_uint8_t
rt_interrupt_nest
=
0
;
#endif
/* RT_USING_SMP */
/**
* This function will be invoked by BSP, when enter interrupt service routine
*
*
@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
)
...
...
@@ -74,11 +83,12 @@ void rt_interrupt_enter(void)
}
RTM_EXPORT
(
rt_interrupt_enter
);
/**
* This function will be invoked by BSP, when leave interrupt service routine
*
*
@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
)
...
...
@@ -95,13 +105,14 @@ void rt_interrupt_leave(void)
}
RTM_EXPORT
(
rt_interrupt_leave
);
/**
* This function will return the nest of interrupt.
*
*
@brief
This function will return the nest of interrupt.
*
* User application can invoke this function to get whether current
* context is interrupt context.
*
* @return the number of nested interrupts.
*
* @return
rt_uint8_t
the number of nested interrupts.
*/
RT_WEAK
rt_uint8_t
rt_interrupt_get_nest
(
void
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录