[mw_shl_code=applescript,true]#include "stm32f10x.h"
#include "lcd.h"
u32 TimingDelay = 0;
void Delay_Ms(u32 nTime);
//Main Body
int main(void)
{
STM3210B_LCD_Init();
LCD_Clear(Yellow);
LCD_SetBackColor(Yellow);//±3¾°ÑÕé«
LCD_SetTextColor(Red); //Îı¾ÑÕé«
LCD_PowerOn();
SysTick_Config(SystemCoreClock/1000);//¶¨ê±1ms
LCD_DrawLine(120,0,320,Horizontal);
LCD_DrawLine(0,160,240,Vertical);
Delay_Ms(1000);
LCD_Clear(Blue);
LCD_DrawRect(70,210,100,100);
Delay_Ms(1000);
LCD_Clear(Red);
LCD_DrawCircle(120,160,50);
Delay_Ms(1000);
LCD_Clear(White);
LCD_DisplayStringLine(Line0 ,(unsigned char*)" fangchunxin ");
LCD_DisplayStringLine(Line1 ,(unsigned char*)" COME ON ");
Delay_Ms(1000);
LCD_SetBackColor(White);//°×é«
LCD_DisplayStringLine(Line0," ");
LCD_SetBackColor(Black);//oúé«
LCD_DisplayStringLine(Line1," ");
LCD_SetBackColor(Grey);//»òé«
LCD_DisplayStringLine(Line2," ");
LCD_SetBackColor(Blue);//à¶é«
LCD_DisplayStringLine(Line3," ");
LCD_SetBackColor(Blue2);//Ç3à¶é«
LCD_DisplayStringLine(Line4," ");
LCD_SetBackColor(Red);//oìé«
LCD_DisplayStringLine(Line5," ");
LCD_SetBackColor(Magenta);//ç-oìé«
LCD_DisplayStringLine(Line6," ");
LCD_SetBackColor(Green);//Âìé«
LCD_DisplayStringLine(Line7," ");
LCD_SetBackColor(Cyan);// Çàé«
LCD_DisplayStringLine(Line8," ");
LCD_SetBackColor(Yellow);//»Æé«
LCD_DisplayStringLine(Line9," ");
while(1);
}
//
void Delay_Ms(u32 nTime)
{
TimingDelay = nTime;
while(TimingDelay != 0);
}
[/mw_shl_code]
这段代码为什么只能执行到第一个延时函数处,就执行不下去了?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
好的,谢谢
一周热门 更多>