📄 main.c
字号:
#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<=0x7FFFF;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 + -