STM32 水质水位检测项目 显示模块

Driver层

FSMC(之前代码)

Interface层

LCD(之前代码)

App层

Display(显示模块)

display.h

cs 复制代码
#ifndef __DISPLAY_H__
#define __DISPLAY_H__

#include "lcd.h"

//初始化
void Display_Init(void);

//清屏
void Display_Clear(void);

//显示信息  (英文,指定字体大小和颜色)
void Display_String(uint16_t x,uint16_t y,uint8_t * str);

//显示标题 (LOGO + 汉字)
void Display_Title(void);

#endif /* __DISPLAY_H__ */

display.c

cs 复制代码
#include "display.h"

//初始化
void Display_Init(void){
    LCD_Init();

    Display_Clear();
}

//清屏
void Display_Clear(void){
    LCD_fillColor(0,0,320,480,WHITE);
}

//显示信息  (英文,指定字体大小和颜色)
void Display_String(uint16_t x,uint16_t y,uint8_t * str){
    LCD_ShowAsciiString(x,y,str,WHITE,BLUE,BIG);
}

void Display_Title(void){
    //显示LOGO
    LCD_ShowBeauty1();

    for (uint8_t i = 0; i < 9; i++)
    {
        LCD_ShowChinereChar(16+i*32,80,WHITE,BLUE,i);
    }    
}
相关推荐
就是我几秒前
开发“业务组件库”,该从哪里入手?
前端·javascript·面试
Mintopia3 分钟前
在数字画布上雕刻曲线:NURBS 的奇幻冒险之旅
前端·javascript·计算机图形学
Hacker_seagull7 分钟前
Chrome安装代理插件ZeroOmega(保姆级别)
前端·chrome
石小石Orz11 分钟前
因为没有使用路由懒加载,产生了一个难以寻找的bug
前端
Mintopia11 分钟前
Three.js 力导向图:让数据跳起优雅的华尔兹
前端·javascript·three.js
江山如画,佳人北望16 分钟前
stm32-c8t6实现语音识别(LD3320)
stm32·单片机·嵌入式硬件
墨渊君26 分钟前
React Native 跨平台组件库实践: GlueStack UI 上手指南
前端
baowxz29 分钟前
航芯MCU使用IAR+Jlink调试
单片机·嵌入式硬件
wangxinwei200030 分钟前
stm32_LAN8720驱动
stm32·单片机·嵌入式硬件
大叔带刺33 分钟前
AUTOSAR实战教程--DoIP_01_配置项解释
单片机·嵌入式硬件