- 20
- 0
- 约1.13千字
- 约 2页
- 2020-10-16 发布于浙江
- 举报
#define GPFCON (*(volatile unsigned *)0
#define GPFDAT (*(volatile unsigned *)0
#define GPFUP (*(volatile unsigned *)0
#define GPBCON (*(volatile unsigned *)0
#define GPBDAT (*(volatile unsigned *)0
#define GPBUP (*(volatile unsigned *)0
/*延时函数*/
void Delay(unsigned int x)
{
unsigned int i,j,k;
for(i=0;i=x;i++)
{
for(j=0;j0xff;j++)
{
for(k=0;k0xff;k++)
{
;
}
}
}
}
int LedMain()
{
GPFUP = 0x87;//IO 上拉使能
GPFCON = 0xD57F;//输出有效,首位清0
GPFCON |= 0x1540;//输出有效,末位置1
GPFDAT |= 0x78;//清零
GPBUP = 0x3DF;//IO 上拉使能
G
原创力文档

文档评论(0)