ZDBMS/code_drv/Interrupt.c

86 lines
1.6 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/********************************************************************************
Copyright (C), Sinowealth Electronic. Ltd.
Author: Sino
Version: V0.0
Date: 2020/04/26
History:
V2.0 2020/04/26 Preliminary
********************************************************************************/
#include "Main.h"
/*************************************************************************************************
* 函数名: InterruptINT4
* 参 数: 无
* 返回值: 无
* 描 述: 中断入口函数判断对应的外部中断后会调用APP处理函数
*************************************************************************************************/
void InterruptINT4(void) interrupt 10
{
_push_(INSCON);
McuBank0Sel();
if(IF40)
{
IF40 = 0;
InterruptINT4App(0x01);
}
if(IF41)
{
IF41 = 0;
InterruptINT4App(0x02);
}
if(IF42)
{
IF42 = 0;
InterruptINT4App(0x04);
}
if(IF43)
{
IF43 = 0;
InterruptINT4App(0x08);
}
if(IF44)
{
IF44 = 0;
InterruptINT4App(0x10);
}
if(IF45)
{
IF45 = 0;
InterruptINT4App(0x20);
}
if(IF46)
{
IF46 = 0;
InterruptINT4App(0x40);
}
if(IF47)
{
IF47 = 0;
InterruptINT4App(0x80);
}
_pop_(INSCON);
}
/*************************************************************************************************
* 函数名: InterruptTimer3
* 参 数: 无
* 返回值: 无
* 描 述: 中断入口函数会调用APP处理函数
*************************************************************************************************/
void InterruptTimer3(void) interrupt 5
{
_push_(INSCON);
McuBank1Sel();
TF3 = 0;
McuBank0Sel();
InterruptTimer3App();
_pop_(INSCON);
}