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

📄 main.c

📁 codewarrior dsp 56807 中断编程实现灯闪烁,有详细的注释
💻 C
字号:




/*  metrowerks sample code  */



/*
	this source illustrates code called by ISR 
	and #pragma directives necessary for ISR-safe code		
*/

/*	
	main program creates a timer compare interrupt 
	to blink EVM LEDs; pushing IRQA/B will switch LED group.

    IRQA corresponds to LED 1
	IRQB corresponds to LED 3
	
	to boot in standalone mode from flash:
	1. disconnect parallel cable & power cable
	2. power down
	3. power on
	
*/



#include <stdlib.h>
#include "led.h"
#include "isr.h"

int main(void)
{
	initLED ();
	initIsr (); 
	
	while (1)
	{
		/* press IRQA/IRQB to decide LED group */
		asm(nop);
		asm(nop);
		asm(nop);
		asm(nop);
		asm(nop);
		asm(nop);
	}
	
	exit(0);  /* Call Exit to flush all IO buffers */
}

⌨️ 快捷键说明

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