OLED显示屏

news/2024/11/23 2:40:36/

@[TOC]stm32 OLED显示

1、OLED基本结构

大小:128X64个点阵
X方向128bit
Y方向64B,且分为8页,一页8B
在这里插入图片描述

2、显现原理

当对应的某一个像素点为1时,对应的小方格点亮。且每一列对应一个字节,低位在最上面,高位在下面

3、字体大小

一般英文8X16,中文16X16

4、驱动芯片(SSD1306)

SSD1306常用命令
在这里插入图片描述

5、将文字写入相应的位置

需要设置同时两个命令,一个是列地址低4位命令,一个是列地址高4位命令,假如我当前要锁定第125列,125对应的16进制是0x7D,那么我只需要同时发0x17和0x0D就可以了(其中没有先后顺序)

6、字模的获取

(1)我用的是PCtoLCD2002完美版
在这里插入图片描述
(2)取模方法
在这里插入图片描述
如果想要显示图片则选择图片模式(注意选择图片模式,图片不能是彩色,只能是纯白和纯黑的组合,且图片是BMP文件,像素大小不能大于128X64)
在这里插入图片描述在这里插入图片描述
(3)设置好后,可以在方框内输入自己需要显现的文字
在这里插入图片描述在这里插入图片描述
(4)再将生成的字模复制到文件中即可

7、和单片机相连常用的协议

I2c,和SPI

8、以下为用I2C实现OLED的显示的主要代码

以下是oled.c文件

#include "oled.h"
#include "stdarg.h"
#include "stdio.h"
#include "redirect.h"/* 初始化命令 */
uint8_t CMD_Data[]={
0xAE, 0x00, 0x10, 0x40, 0xB0, 0x81, 0xFF, 0xA1, 0xA6, 0xA8, 0x3F,
0xC8, 0xD3, 0x00, 0xD5, 0x80, 0xD8, 0x05, 0xD9, 0xF1, 0xDA, 0x12,				
0xD8, 0x30, 0x8D, 0x14, 0xAF};/* 向设备写控制命令 */
void OLED_WR_CMD(uint8_t cmd)
{HAL_I2C_Mem_Write(&OLED_I2C , 0x78, 0x00, I2C_MEMADD_SIZE_8BIT, &cmd, 1, 0xFF);
}/* 向设备写数据 */
void OLED_WR_DATA(uint8_t data)
{HAL_I2C_Mem_Write(&OLED_I2C , 0x78, 0x40, I2C_MEMADD_SIZE_8BIT, &data, 1, 0xFF);
}/* 设置光标坐标 */
void OLED_Set_Pos(uint8_t x, uint8_t y)
{ 	OLED_WR_CMD(0xb0+y);OLED_WR_CMD(((x&0xf0)>>4)|0x10);OLED_WR_CMD(x&0x0f);
}/* 写一个字节到指定坐标 */
void WriteByte(uint8_t x, uint8_t y, uint8_t data)
{OLED_Set_Pos(x, y);OLED_WR_DATA(data);
}/* 写全屏屏幕 */
void OLED_FILL(uint8_t *data)
{for(int i = 0; i<(OLED_HEIGHT / 8); i++){OLED_Set_Pos(0, i);HAL_I2C_Mem_Write(&OLED_I2C , 0x78, 0x40, I2C_MEMADD_SIZE_8BIT, data + OLED_WIDTH * i, OLED_WIDTH, 0xFF);}
}/* OLED显示一个字符 */
void OLED_ShowChar(uint16_t x, uint16_t y, FontDef_t *Size, uint8_t c)
{#define ROW Size->FontWidth * Size->FontHeight / 8 + 1int num = 0;while(c != Size->data[num])num += ROW;for(int b = 0; b < (Size->FontHeight / 8); b++)for(int a=0; a < Size->FontWidth; a++)WriteByte(x + a, y + b, Size->data[num + 1 + a + (b * Size->FontWidth)]);
}/* OLED显示一串字符 */
static char dat[128];	//16*8
void OLED_ShowString(uint16_t x, uint16_t y, FontDef_t *Size, const char *fmt, ...)
{va_list args;va_start(args, fmt);vsnprintf(dat, sizeof(dat) - 1, fmt, args);va_end(args);int i = 0;while(dat[i] != '\0'){OLED_ShowChar(x ,y, Size, dat[i]);x += Size->FontWidth;i++;}
}/* OLED显示一个中文 */
void OLED_ShowChineseChar(uint16_t x, uint16_t y, CN16FontDef_t *Size, char CN[2])
{int num = 0;while (1){if((Size->data[num].Index[0] == *(CN + 0)) && (Size->data[num].Index[1] == *(CN + 1)))break;num++;}for(int b = 0; b < (Size->FontHeight / 8); b++)for(int a=0; a < Size->FontWidth; a++)WriteByte(x + a, y + b, Size->data[num].Msk[a + (b * Size->FontWidth)]);
}/* OLED显示串中文字符 */
static char Cdat[256];	//16*16
void OLED_ShowChineseString(uint16_t x, uint16_t y, CN16FontDef_t *Size, const char *fmt, ...)
{va_list args;va_start(args, fmt);vsnprintf(Cdat, sizeof(Cdat) - 1, fmt, args);va_end(args);int i = 0;while(Cdat[2*i] != '\0'){OLED_ShowChineseChar(x ,y, Size, (Cdat+2*i));//数组,128行,2列,最多显示128个字符x += Size->FontWidth;i++;}
}/* 清屏 */
void OLED_Clear(void)
{	    for(int i=0;i < (OLED_HEIGHT / 8);i++)  {OLED_WR_CMD(0xb0 + i);OLED_WR_CMD (0x00);OLED_WR_CMD (0x10);for(int n = 0; n < OLED_WIDTH; n++)OLED_WR_DATA(0x00);} 
}/* 初始化oled屏幕 */
void OLED_Init(void)
{HAL_I2C_Mem_Write(&OLED_I2C , 0x78, 0x00, I2C_MEMADD_SIZE_8BIT, CMD_Data, sizeof(CMD_Data), 0x100);OLED_Clear();
}

以下为oled.h文件

/* OLED底层驱动 */
#ifndef __OLED_H__
#define __OLED_H__
#include "fonts.h"
#include "i2c.h"/* 修改对应的I2C句柄和屏幕大小 */
#define OLED_I2C hi2c2
#define  OLED_WIDTH    128
#define  OLED_HEIGHT   64
#define  OLED_WIDTH_HALF    OLED_WIDTH / 2
#define  OLED_HEIGHT_HALF   OLED_HEIGHT / 2/* 英文字库 */
extern FontDef_t Font_8x16;
/* 中文字库 */
extern CN16FontDef_t CN16Font_16x16;
/* 设置图标 */
extern uint8_t bmp[];
/*笑脸*/
extern uint8_t SmilingFace[];
/*火柴人图标*/
extern uint8_t matchman3_1[];
extern uint8_t matchman3_2[];
extern uint8_t matchman3_3[];
extern uint8_t matchman3_4[];//OLED初始化
void OLED_Init(void);
//清屏
void OLED_Clear(void);
//OLED显示一个字符
void OLED_ShowChar(uint16_t x, uint16_t y, FontDef_t *Size, uint8_t c);
//OLED显示一个中文
void OLED_ShowChineseChar(uint16_t x, uint16_t y, CN16FontDef_t *Size, char CN[2]);
//显示字符串
void OLED_ShowString(uint16_t x, uint16_t y, FontDef_t *Size, const char *fmt, ...);
//显示中文字符串
void OLED_ShowChineseString(uint16_t x, uint16_t y, CN16FontDef_t *Size, const char *fmt, ...);
//更新屏幕
void OLED_FILL(uint8_t *data);#endif

以下为字模文件部分(因为字模较多,我就只摘取了一部分)

/*英文字符*/
const uint8_t F8x16[] =
{' ',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//  0'!',0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1'\'',0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 2'#',0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3'$',0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4'%',0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5'&',0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6'\'',0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7'(',0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8')',0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9'*',0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10'+',0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11',',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12'-',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13'.',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14'/',0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15'0',0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16'1',0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17'2',0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18'3',0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19'4',0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20'5',0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21'6',0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22'7',0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23'8',0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24'9',0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25':',0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26';',0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27'<',0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28'=',0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29'>',0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30'?',0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31'@',0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32'A',0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33'B',0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34'C',0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35'D',0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36'E',0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37'F',0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38'G',0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39'H',0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40'I',0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41'J',0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42'K',0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43'L',0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44'M',0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45'N',0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46'O',0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47'P',0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48'Q',0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49'R',0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50'S',0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51'T',0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52'U',0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53'V',0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54'W',0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55'X',0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56'Y',0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57'Z',0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58'[',0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59'\\',0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60']',0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61'^',0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62'_',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63'`',0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64'a',0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65'b',0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66'c',0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67'd',0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68'e',0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69'f',0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70'g',0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71'h',0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72'i',0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73'j',0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74'k',0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75'l',0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76'm',0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77'n',0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78'o',0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79'p',0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80'q',0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81'r',0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82's',0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83't',0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84'u',0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85'v',0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86'w',0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87'x',0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88'y',0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89'z',0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90'{',0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91'|',0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92'}',0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93'~',0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
};

其头文件部分

/* OLED字库 */
#ifndef __FONTS_H__
#define __FONTS_H__#include "stdint.h"typedef struct// 汉字字模数据结构 
{uint8_t  Index[2];// 汉字内码索引,一个汉字占两个字节	uint8_t  Msk[32]; 
}CN16CharTypeDef;typedef struct {	//中文字符结构体uint8_t FontWidth;uint8_t FontHeight;const CN16CharTypeDef *data;
} CN16FontDef_t;typedef struct {	//英文字符结构体uint8_t FontWidth;uint8_t FontHeight;const uint8_t *data;
} FontDef_t;#endif

http://www.ppmy.cn/news/110581.html

相关文章

LCD显示屏和OLED显示屏的区别

LCE显示屏是液晶显示屏的全称&#xff0c;LED是发光二极管的英文缩写。LCD显示屏和OLED显示屏的主要区别是发光原理不同&#xff0c;而发光原理的不同使得两者在厚度、形态、显示效果、耗电程度、屏闪情况也不同。 LCD的发光原理主要是依靠背光层,通常由大量的ED背光灯造成,彩色…

纯干货:LCD屏和OLED屏的区别?手机屏幕材质各有什么区别?

纯干货&#xff1a;LCD屏和OLED屏的区别&#xff1f;手机屏幕材质各有什么区别&#xff1f; 慢慢买比价 ​ 已认证的官方帐号 74 人赞同了该文章 今天我就为大家带来一篇纯干货知识点整理&#xff0c;关于手机屏幕那点事看完秒懂。 以及大家对于苹果手机LCD屏和OLED的区别…

OLED屏幕的手机和LCD屏幕的手机,到底哪个好?

手机屏幕是我日常最直接接触的一个手机部件&#xff0c;现在手机市场上主要流行两种屏幕&#xff0c;一种是LCD屏&#xff08;液晶显示屏&#xff09;&#xff0c;另一种是OLED屏&#xff08;二极管显示屏&#xff09;&#xff0c;那么这两种屏幕&#xff0c;哪种更好呢&#x…

OLED屏简介

OLED简介 产品介绍 OLED (Organic Light-Emitting Diode)&#xff1a;有机发光二极管又称为有机电激光显示&#xff0c;OLED显示技术具有自发光的特性&#xff0c;采用薄的有机材料涂层和玻璃基板&#xff0c;当有电流通过时&#xff0c;这些有机材料就会发光&#xff0c;而且…

ML | 6 支持向量机

ML | 6 支持向量机 文章目录 ML | 6 支持向量机SVM介绍线性不可分数据线性可分数据 寻找最大间隔分类器求解的优化问题 SMO高效优化算法简化版SMO处理小规模数据集伪代码程序清单 完整Platt SMO 算法加速优化完整 Platt SMO的支持函数完整Platt SMO算法中的优化例程完整Platt S…

【JavaSE】Java基础语法(三十九):网络编程入门

文章目录 1. 网络编程概述2. 网络编程三要素3. IP地址4. InetAddress5. 端口和协议 1. 网络编程概述 计算机网络 是指将地理位置不同的具有独立功能的多台计算机及其外部设备&#xff0c;通过通信线路连接起来&#xff0c;在网络 操作系统&#xff0c;网络管理软件及网络通信协…

山特UPS电源/山特UPS 10KW电源逆变器设计方案

山特UPS电源/山特UPS 10KW电源逆变器设计方案 成熟量产源码&#xff0c;包含PCB 原理图及好评后赠送TMS310F2809全套源码id666594501002&

计算机什么ups又称在线式ups,在线式ups电源的介绍

在线式UPS&#xff1a;在线式UPS电源是指不管电网电压是否正常&#xff0c;负载所用的交流电压都要经过逆变电路&#xff0c;逆变器一直处于工作状态。所以当停电时&#xff0c;UPS能马上将其存储的电能通过逆变器转化为交流电对负载进行供电&#xff0c;从而达到了输出电压零中…