📄 lcd.c
字号:
/*
\\\|///
\\ - - //
( @ @ )
+---------------------oOOo-(_)-oOOo-------------------------+
| 智林STM32开发板试验程序 |
| Timer2 PWM 输出方式试验 |
| 刘笑然 by Xiaoran Liu |
| 2008.4.16 |
| |
| 智林测控技术研究所 ZERO research group |
| www.the0.net |
| Oooo |
+-----------------------oooO--( )-------------------------+
( ) ) /
\ ( (_/
\_)
*/
/*----------------------------------------------------------*\
| 引入相关芯片的头文件 |
\*----------------------------------------------------------*/
#include <stm32f10x_lib.h> // STM32F10x Library Definitions
#include "STM32_Init.h" // STM32 Initialization
#include "TFT018.h"
/*----------------------------------------------------------*\
| HARDWARE DEFINE |
\*----------------------------------------------------------*/
#define LED ( 1 << 5 ) // PB5: LED D2
/*----------------------------------------------------------*\
| Delay |
| 延时 Inserts a delay time. |
| nCount: 延时时间 |
| nCount: specifies the delay time length. |
\*----------------------------------------------------------*/
void Delay(vu32 nCount) {
for(; nCount != 0; nCount--);
}
/*----------------------------------------------------------*\
| MIAN ENTRY |
\*----------------------------------------------------------*/
int main (void) {
stm32_Init (); // STM32 setup
LCD_Init();
LCD_Clear_Screen(Blue);
for(;;) {
GPIOB->ODR &= ~LED; // switch on LED
Delay(2000000);
GPIOB->ODR |= LED; // switch off LED
Delay(2000000);
Font = 0;
LCD_PutString(10,30,"STM32F EVAL BOARD",Cyan,Blue);
Font = 1;
LCD_PutString(38,46,"Version 1.0",Green,Blue);
Font = 0;
LCD_PutString(30,65,"ZERO Research",Yellow,Blue);
LCD_PutString(36,81,"www.the0.net",Magenta,Blue);
}
}
/*----------------------------------------------------------*\
| END OF FILE |
\*----------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -