📄 main.c
字号:
/****************************************Copyright (c)****************************************************
**
** http://www.powermcu.com
**
**--------------File Info---------------------------------------------------------------------------------
** File name: main.c
** Descriptions: The GLCD application function
**
**--------------------------------------------------------------------------------------------------------
** Created by: AVRman
** Created date: 2010-11-7
** Version: v1.0
** Descriptions: The original version
**
**--------------------------------------------------------------------------------------------------------
** Modified by: duquan——zhu
** Modified date: 2012-5-5
** Version: V3.2
** Descriptions:
**
*********************************************************************************************************/
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include "systick.h"
#include "GLCD.h"
/*******************************************************************************
* Function Name : main
* Description : Main program
* Input : None
* Output : None
* Return : None
* Attention : None
*******************************************************************************/
int main(void)
{
int m=0;
delay_init();
LCD_Initializtion();
LCD_Clear(Red);
/* Infinite loop */
while (1)
{
m++;
if(m==1)LCD_Clear(Red);
else if(m==2)LCD_Clear(Green);
else if(m==3)LCD_Clear(Blue);
else if(m==4)LCD_Clear(Black);
else if(m==5)LCD_Clear(Yellow);
else if(m==6){LCD_Clear(Magenta); m=0;}
GUI_Text(20, 50, "Welcome to K#512 Room!",Green, Red);
delay_ms(2000);
GUI_Text(10, 75, "ABCDEFGHIJKLMNOPQRSTUVWXYZ",Green, Yellow);
delay_ms(2000);
GUI_Chinese(50,100,"朱读全火牛开发板",White,Black);
delay_ms(2000);
GUI_Chinese(20,130,"彩色液晶显示程序的学习",White,Red);
delay_ms(2000);
GUI_Chinese(20,160,"时间",Red,White);
delay_ms(2000);
GUI_Text(58, 160, ":2012-5-4 22:22 PM",Green, Red);
delay_ms(2000);
LCD_DrawLine( 30, 250, 80, 280 , Red );
delay_ms(500);
LCD_DrawLine( 220, 170, 80, 280 , Red );
delay_ms(20000);
}
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while (1)
{
}
}
#endif
/*********************************************************************************************************
END FILE
*********************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -