⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 STM32_LCD5110资料
💻 C
字号:
#include <stm32f10x_lib.h>
#include "COM.h"
#include "Delay.h"
#include "Init_RCC.h"
#include "Init_GPIO.h"
#include "Init_SPI.h"
#include "LCD5110.h"

int main(void)
{
	Init_RCC();	/* 设置系统时钟 */
	Init_GPIO(); /* 设置GPIO端口 */
	Init_DELAY(72);	/* 初始化Delay */
	Init_LCD5110(); /* 初始化LCD5110 */

	LCD_clear();
	
	bit_set(LED_GPIO, LED_YELLOW);
	bit_set(LED_RED_GPIO, LED_RED);
	bit_set(LED_GPIO, LED_BLUE);
		
	LcdPutString(0, 0, "5110 for STM32");
	LcdPutString(0, 1, "年月日时分");
	LcdPutString(0, 3, "12345678910@#%");
	delay_ms(1000);
	LcdDrawBitmap(0, 0, 84, 6, (unsigned char *)image0);
	delay_ms(1000);
	LCD_clear();

	while(1)
	{

		LcdDrawBitmap(50, 2, 32, 4, (unsigned char *)anidog1);
		bit_xbi(LED_RED_GPIO, LED_RED);
		delay_ms(100);
		LcdDrawBitmap(50, 2, 32, 4, (unsigned char *)anidog2);
		bit_xbi(LED_RED_GPIO, LED_RED);
		delay_ms(100); 
		LcdDrawBitmap(50, 2, 32, 4, (unsigned char *)anidog3);
		bit_xbi(LED_RED_GPIO, LED_RED);
		delay_ms(100);
		LcdDrawBitmap(50, 2, 32, 4, (unsigned char *)anidog4);
		bit_xbi(LED_RED_GPIO, LED_RED);
		delay_ms(100);	
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -