⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isr.c

📁 spce061a实现的按键唤醒单片机程序
💻 C
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -