📄 subled.c
字号:
/*******************************Copyright (c)**********************************
***************************************By Z.Q.Yang****************************/
/******************************************************************************
*文件名:subled
*功能:led演示服务函数
*头文件:"user.h","config.h"
*作者:Z.Q.Yang
*******************************************************************************/
#include"config.h"
#include"user.h"
/******************************************************************************
*函数名:Led
*功能:Led演示函数
*入口参数:无
*出口参数:无
******************************************************************************/
void Led(void)
{
static uint8 i; /*静态变量,用于控制流水等节奏*/
if(subinit==1)
{
IODIR|=0x001c0000;
GUIClr();
GUIPrintf(22,28,1,"This a LED example!");
GUIPrintf(53,56,1,"PRESS < BACK!");
LCDRefresh(GUIBuf);
subinit--;
}
i++;
if(i<10)
{
IOSET=0x000e0000;
IOCLR=(1<<17);
}
else if(i<20)
{
IOSET=0x000e0000;
IOCLR=(1<<18);
}
else if(i<30)
{
IOSET=0x000e0000;
IOCLR=(1<<19);
}
else i=0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -