📄 zylogo.c
字号:
/****************************************Copyright (c)****************************************************
** Guangzou ZLG-MCU Development Co.,LTD.
** graduate school
** http://www.zlgmcu.com
**
**--------------File Info---------------------------------------------------------------------------------
** File name: ZYlogo.c
** Last modified Date: 2008-04-18
** Last Version: 1.0
** Descriptions: show the logo
**
**--------------------------------------------------------------------------------------------------------
** Created by: Houxiaolong
** Created date: 2008-04-16
** Version: 1.0
** Descriptions: show the logo
**
**--------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
*********************************************************************************************************/
#include "Logo.h"
#include "config.h"
unsigned char number[]={0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39};
/* 0~9的ASCII */
/*********************************************************************************************************
** Function name: __progbarDemo
** Descriptions: some operation of the progbar
** Input parameters: none
** Output parameters: none
*********************************************************************************************************/
static void __progbarDemo(void)
{
char cValue;
uint8 cVa,cVb,cVc;
long lValue;
int ixsize = GUI_LCM_XMAX;
int iysize = GUI_LCM_YMAX;
lcd_FillRect(0, 300, (ixsize - 1), (iysize - 1), LGRAY); /* 填充灰白色进度栏 */
disp_color = WHITE; /* 设置前景色 */
for (cValue = 0; cValue < ixsize; cValue++) {
GUI_RLine(cValue, 300, (unsigned short)(iysize - 1), BLUE); /* 填充进度条 */
GUI_ProgbarPutChar(125, 308, 307, 0x25); /* 显示'%' */
lValue = (long)((100 * cValue) /240 + 1);
cVa = (unsigned char)(lValue % 100 % 10);
cVb = (unsigned char)(lValue % 100 / 10);
cVc = (unsigned char)(lValue / 100);
GUI_ProgbarPutChar(118, 308, 307, number[cVa]); /* 显示个位 */
if (lValue > 9) {
GUI_ProgbarPutChar(112, 308, 307, number[cVb]); /* 显示十位 */
if (lValue >99) {
GUI_ProgbarPutChar(106, 308, 307, number[cVc]); /* 显示百位 */
}
}
delay_Ns(20);
}
}
/*********************************************************************************************************
** Function name: showLogo
** Descriptions: show the logo
** Input parameters: none
** Output parameters: none
*********************************************************************************************************/
void showLogo(void)
{
char i;
char cText0[] = {0x5a, 0x4c, 0x47, 0x47, 0x55, 0x49}; /* "ZLGGUI"的ASCII码 */
char cText1[] = {0x44, 0x45, 0x4D, 0x4F}; /* "DEMO"的ASCII码 */
GUI_FillSCR(RED); /* 用红色清屏 */
GUI_DrawBmp(4, 40, 232, 60, logo); /* 显示logo */
delay_Ns(300);
GUI_SetColor(GREEN, RED);
for (i = 0; i < 6; i++) {
GUI_PutChar8_8(100 + i * 8 + 1, 160, cText0[i]); /* 显示"ZLGGUI" */
}
GUI_SetColor(BLUE, RED);
for (i = 0; i < 4; i++) {
GUI_PutChar8_8(108 + i * 8 + 1, 180, cText1[i]); /* 显示"DEMO" */
}
__progbarDemo(); /* 显示进度条 */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -