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

📄 main.c.bak

📁 coldfire5307的bootloader 将程序写入flash
💻 BAK
字号:
#include "mcf5307.h" 

MCF5307_IMM *imm;

void main(void)
{
 
 	unsigned long int i;
 unsigned int	LedOut=0x01;
 
 //to init imm
 imm=(MCF5307_IMM *)0x10000000;
 //cpu_cache_disable();
 //EnableCache();            //will close the int.

	while(1) 
	{
     	imm->parallel_port.PADAT=~LedOut;	
     	LedOut<<=1;
     	LedOut=LedOut/0x80+LedOut%0x80;     	
     	for(i=0;i<=0xfff0;i++)
     	{
				;
     	}
  }
   
} 
    

void Interrupt_UART1(void)   			// asigned to Level 5
{
 	//Add Code here!
}

void Interrupt_mbus(void)    			// asigned to Level 3
{
 	//Add Code here!
 	int i;
 	for(i=100;i>0;i--)
 	{
 		;	
 	}
 
 
  	*(unsigned short*)0x66500012=0x0000;	//clr the interrupt
  	*(unsigned short*)0x66500012=0xffff;
  
 
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0x00;
  	imm->parallel_port.PADAT=0xff;
}

void Interrupt_Level7(void)
{
 	//Add Code here!
}

void Interrupt_Level6(void)
{
 	//Add Code here!
    
}

void Interrupt_Level4(void)
{
 	//Add Code here!
}


void Interrupt_Level2(void)
{
 	//Add Code here!
}


void Interrupt_Level1(void)
{
 	//Add Code here!
}

void BusError(void)
{
 	//Add Code here!
}


⌨️ 快捷键说明

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