📄 sampint4.c
字号:
#include <reg166.h>
#include <cxfuncs.h>
extern byte t0_cnt;
extern byte go_ahead;
extern char int_mesg;
interrupt( 0x24) void
t4_handler( void )
{
K_OS_Tick_Update(); /* call the CMX tick function */
if (go_ahead) /* see if task has enable message sending */
{
if (++t0_cnt == 2) /* see if count = 2. */
{
t0_cnt = 0; /* reset count */
/* The following allows an interrupt to use a CMX function, but
it must use it indirectly. Thus the interrupt must call
the CMX int_pipe function, which will place the requested
function and it's parameters into the CMX interrupt pipe
for later execution. */
K_Intrp_Mesg_Send(0,&int_mesg);
}
}
T3IC |= 0x80; /* set flag */
K_OS_Intrp_Exit(); /* no call right CMX interrupt exit routine. MUST be
last instruction within interrupt's code */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -