高级会员
- 积分
- 865
- 金钱
- 865
- 注册时间
- 2016-8-25
- 在线时间
- 485 小时
|
楼主 |
发表于 2017-7-12 18:27:19
|
显示全部楼层
本帖最后由 学习stm32f4 于 2017-7-12 18:29 编辑
眼看着自己的帖子快沉下去了,重新顶起
[mw_shl_code=c,true]
#include "sys.h"
#include "delay.h"
#include "usart.h"
#include "led.h"
#include "lcd.h"
#include "math.h"
#define M_PI 3.14159265358979323846
int main(void)
{
u16 t;
u8 x=0;
u8 lcd_id[12];
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
delay_init(168);
uart_init(115200);
LED_Init();
LCD_Init();
POINT_COLOR=RED;
sprintf((char*)lcd_id,"LCD ID:%04X",lcddev.id);
LCD_Clear(BLACK);
LCD_Fill(0,0,240,30,RED);
LCD_Fill(0,290,240,320,RED);
LCD_Fill(0,0,240,30,RED);
LCD_Fill(0,290,240,320,RED);
while(1)
{
for(t=0;t<=360;t++)
{
POINT_COLOR=RED;
LCD_Draw_Circle(120,160,120);
LCD_DrawLine(120,160,(u16)(120+120*cos(t*PI/180)),(u16)(160+120*sin(t*PI/180)));
delay_ms(10);
POINT_COLOR=BLACK;
LCD_DrawLine(120,160,(u16)(120+120*cos(t*PI/180)),(u16)(160+120*sin(t*PI/180)));
}
t=0;
}
}
[/mw_shl_code]
|
|