isr.c
来自「spce061a实现的按键唤醒单片机程序」· C语言 代码 · 共 108 行
C
108 行
#include"SPCE061A.h"
unsigned char Output , Delay;
void BREAK(void) __attribute__ ((ISR));
void FIQ(void) __attribute__ ((ISR));
void IRQ0(void) __attribute__ ((ISR));
void IRQ1(void) __attribute__ ((ISR));
void IRQ2(void) __attribute__ ((ISR));
void IRQ3(void) __attribute__ ((ISR));
void IRQ4(void) __attribute__ ((ISR));
void IRQ5(void) __attribute__ ((ISR));
void IRQ6(void) __attribute__ ((ISR));
void IRQ7(void) __attribute__ ((ISR));
void BREAK(void)
{
//add your code here
}
void FIQ(void)
{
//add your code here
}
void IRQ0(void)
{
//add your code here
}
void IRQ1(void)
{
//add your code here
}
void IRQ2(void)
{
//add your code here
}
void IRQ3(void)
{
if(*P_INT_Ctrl & 0x0100)
{
//IRQ3_Ext1
*P_INT_Clear = 0x0100;
}
else if(*P_INT_Ctrl & 0x0200)
{
//IRQ3_Ext2
*P_INT_Clear = 0x0200;
}
else
{
//IRQ_KEY
for(Output = 0x7fff; Output > 0x007f; Output >>= 1)
{
*P_IOA_Data = Output;
Delay = 0x7fff;
while(--Delay);
*ClearWatchdog = 1;
}
*P_INT_Clear = 0x0080;
}
}
void IRQ4(void)
{
//add your code here
}
void IRQ5(void)
{
//add your code here
}
void IRQ6(void)
{
//add your code here
}
void IRQ7(void)
{
//add your code here
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?