cmxint.c

来自「CMEX source code RTOS for atmel atmega12」· C语言 代码 · 共 24 行

C
24
字号
// #include <io8515.h> 
#include <iom103.h> 
#include <cxfuncs.h>
extern byte t0_cnt;
extern byte go_ahead;
extern char int_mesg[];

#pragma vector=TIMER0_COMP_vect

__interrupt void TIMER0_COMP_interrupt(void)
{
	K_OS_Intrp_Entry();
	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 */
			K_Intrp_Mesg_Send(0,int_mesg);
			}
		}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?