?? 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 + -