interrupt.c

来自「AVR单片机 C语言程序设计经典实用」· C语言 代码 · 共 30 行

C
30
字号
//***************************************************************
// File Name : Interrupt.c
// Author    : Steaven
// Created   : 2008-06-09
// Modified  : 
// Revision  : V0.0
//***************************************************************

#include "app.h"

//***************************************************************
// Function    : Timer2_Interrupt
// Input       : none
// Output      : none
// Description : Kernel Clock Interrupt Service Routine
//***************************************************************
#pragma interrupt_handler Timer2_Interrupt:4
void Timer2_Interrupt(void)
{
	//Clear Timer2 OCIF Flag
	TIFR  |= 0x80;
    TCNT2 = 0x00;
	//Key Detection
	Key_Detection();
	//Update Task Status
	OS_Task_Update();
}

//===========================END OF FILE========================//

⌨️ 快捷键说明

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