1、9341底层驱动程序
2、各种GUI函数包括画点、线、圆、整屏和局部刷屏等函数。
3、采用STM32的FSMC接口,速度更快。
模块实验程序16bit+9341(STM32)
单片机源程序如下:
- #include <stm32f10x_lib.h>
- #include "sys.h"
- #include "usart.h"
- #include "delay.h"
- #include "led.h"
- #include "key.h"
- #include "exti.h"
- #include "wdg.h"
- #include "timer.h"
- #include "lcd.h"
- #include "24cxx.h"
- #include "touch.h"
- #include "mmc_sd.h"
- u8 buf[512];//SD卡数据缓存区
- void Load_Drow_Dialog(void)
- {
- LCD_Clear(WHITE);//清屏
- POINT_COLOR=BLUE;//设置字体为蓝色
- LCD_ShowString(216,0,"RST");//显示清屏区域
- POINT_COLOR=RED;//设置画笔蓝色
- }
- //主函数
- int main(void)
- {
- Stm32_Clock_Init(9);//系统时钟设置
- delay_init(72); //延时初始化
- uart_init(72,9600); //串口1初始化
- LED_Init();
- LCD_Init(); //液晶初始化
- POINT_COLOR=RED;
-
- //显示基本颜色
- LCD_Clear(RED);
- delay_ms(1000);
- LCD_Clear(GREEN);
- delay_ms(1000);
- LCD_Clear(BLUE);
- delay_ms(1000);
-
- LCD_ShowString(10,0,"TFT_LCD_TEST_DEMO ^_^");
- LCD_ShowString(10,20,"2.4'/2.8' TFTLCD TEST");
- LCD_ShowString(10,40,"WWW.51LCM.COM");
- LCD_ShowString(10,60,"2013/12/30");
-
- delay_ms(3000);
- LCD_Clear(WHITE); //清屏
- LCD_ShowString(10,0,"Init TP!");
- delay_ms(1000);
- Touch_Init();
-
- while(SD_Init()!=0)//检测不到SD卡
- {
- LCD_ShowString(60,130,"SD Card Failed!");
- delay_ms(500);
- LCD_ShowString(60,130,"Please Check! ");
- delay_ms(500);
- LED0=!LED0;//DS0闪烁
- }
- delay_ms(1000);
- //检测SD卡成功
- while(1)
- {
- }
- }
复制代码
所有资料51hei提供下载:
模块实验程序16bit+9341(STM32).rar
(99.18 KB, 下载次数: 131)
|