📄 test.c
字号:
#include "F2407REGS_C.h"
void initial()
{
/*1.Set ST0 and ST1 */
asm(" setc SXM");
asm(" clrc OVM");
asm(" clrc CNF");
asm(" setc INTM");
/**WSGR=0x060; */
/*2. Set SCSR1 and SCSR2*/
*SCSR1= 0x81FE;
*SCSR2= 0xFF8E;
/*3. Set Watch_Dog and Interrupt parameters*/
*WDCR= 0x0E8;/*Set Watch_Dog Disable */
*IMR=0x000;/*Set all Interrupt Disable*/
*IFR=0x0FFFF; /*Clear all Interrupt flag*/
}
void Delay()
{
int i;
for(i=0;i<0xFFFF;i++)
i=i;
}
void Function_LedTunkle()
{
int i=0,j=0;
*MCRA=0;
*PBDATDIR=0xFFFF;
while(1)
{
*PBDATDIR=0xFF00;
Delay();
*PBDATDIR=0xFFFF;
Delay();
}
}
void main()
{
initial();
Function_LedTunkle();
}
void interrupt nothing()
{
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -