mirror of
https://github.com/HalfSweetStudio/EPaperDrive.git
synced 2026-03-23 05:49:44 +08:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a97489d8a | ||
|
|
ba80034bf9 | ||
|
|
668b0c6309 | ||
|
|
a3264912ad | ||
|
|
1a620073f8 | ||
|
|
8797aaa8b3 | ||
|
|
50b7dfebe6 | ||
|
|
8728602643 | ||
|
|
18022510b2 | ||
|
|
ba30859408 | ||
|
|
7dfd29370a | ||
|
|
a2fa1a4778 | ||
|
|
5a874ea7cf | ||
|
|
322307fe45 |
@@ -2,10 +2,10 @@
|
|||||||
这是一个简单好用性能强大的Arduino墨水屏驱动库,支持目前市面上较常见的多种墨水屏。
|
这是一个简单好用性能强大的Arduino墨水屏驱动库,支持目前市面上较常见的多种墨水屏。
|
||||||
|
|
||||||
## 我应该如何使用它?
|
## 我应该如何使用它?
|
||||||
请着重参考[例程](https://github.com/HalfSweetStudio/EPaperDrive/tree/main/examples)与[API手册](docs/API手册.md),如果您遇到了例程不能使用的情况,请提交issue说明详细情况。
|
请着重参考[例程](https://github.com/HalfSweetStudio/EPaperDrive/tree/main/examples)、[API手册](docs/API手册.md)以及[用户手册](docs/用户手册.md),如果您遇到了例程不能使用的情况,请提交issue说明详细情况。
|
||||||
|
|
||||||
## 我应该采用什么样的驱动电路?
|
## 我应该采用什么样的驱动电路?
|
||||||
事实上,几乎所有的串口SPI的墨水屏驱动电路以及引脚定义都是相同的,如果您有微雪或者大连佳显等厂商提供的驱动板,您开源直接使用它。如果您是裸屏,那么我建议您采用这款[驱动板](https://oshwhub.com/ludas/mo-shui-ping-qu-dong)。需要注意的是,请您采用4-wire模式来驱动墨水屏,我们暂不支持3-wire模式。
|
事实上,几乎所有的串口SPI的墨水屏驱动电路以及引脚定义都是相同的,如果您有微雪或者大连佳显等厂商提供的驱动板,您可以直接使用它。如果您是裸屏,那么我建议您采用这款[驱动板](https://oshwhub.com/ludas/mo-shui-ping-qu-dong)。需要注意的是,请您采用4-wire模式来驱动墨水屏,我们暂不支持3-wire模式。
|
||||||
|
|
||||||
## 这个驱动库支持什么MCU?
|
## 这个驱动库支持什么MCU?
|
||||||
很遗憾,目前为止该驱动库仅支持ESP8266/ESP32或者别的带文件系统的MCU,我们会在之后重构整个驱动库来达到更好的兼容性。
|
很遗憾,目前为止该驱动库仅支持ESP8266/ESP32或者别的带文件系统的MCU,我们会在之后重构整个驱动库来达到更好的兼容性。
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ void setup()
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
EPD.SetHardSPI(&SPI);
|
EPD.SetHardSPI(&SPI);
|
||||||
|
LittleFS.begin();
|
||||||
EPD.SetFS(&LittleFS); //设置存放字体的文件系统,传入的为该文件系统的操作指针,可自行修改
|
EPD.SetFS(&LittleFS); //设置存放字体的文件系统,传入的为该文件系统的操作指针,可自行修改
|
||||||
|
|
||||||
EPD.EPD_Set_Model(HINKE0266A15A0); //设置屏幕类型,具体型号可以参考文档
|
EPD.EPD_Set_Model(HINKE0266A15A0); //设置屏幕类型,具体型号可以参考文档
|
||||||
|
|||||||
BIN
examples/HardSPIHelloWorld/data/font10
Normal file
BIN
examples/HardSPIHelloWorld/data/font10
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/font12
Normal file
BIN
examples/HardSPIHelloWorld/data/font12
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/font32
Normal file
BIN
examples/HardSPIHelloWorld/data/font32
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/font60
Normal file
BIN
examples/HardSPIHelloWorld/data/font60
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/font70
Normal file
BIN
examples/HardSPIHelloWorld/data/font70
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/weathericon
Normal file
BIN
examples/HardSPIHelloWorld/data/weathericon
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/weathericon32
Normal file
BIN
examples/HardSPIHelloWorld/data/weathericon32
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/weathericon50
Normal file
BIN
examples/HardSPIHelloWorld/data/weathericon50
Normal file
Binary file not shown.
BIN
examples/HardSPIHelloWorld/data/weathericon80
Normal file
BIN
examples/HardSPIHelloWorld/data/weathericon80
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/font10
Normal file
BIN
examples/HelloWorld/data/font10
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/font12
Normal file
BIN
examples/HelloWorld/data/font12
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/font32
Normal file
BIN
examples/HelloWorld/data/font32
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/font60
Normal file
BIN
examples/HelloWorld/data/font60
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/font70
Normal file
BIN
examples/HelloWorld/data/font70
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/weathericon
Normal file
BIN
examples/HelloWorld/data/weathericon
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/weathericon32
Normal file
BIN
examples/HelloWorld/data/weathericon32
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/weathericon50
Normal file
BIN
examples/HelloWorld/data/weathericon50
Normal file
Binary file not shown.
BIN
examples/HelloWorld/data/weathericon80
Normal file
BIN
examples/HelloWorld/data/weathericon80
Normal file
Binary file not shown.
86
examples/ThreeColor/ThreeColor.ino
Normal file
86
examples/ThreeColor/ThreeColor.ino
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/**
|
||||||
|
* @file HelloWorld.ino
|
||||||
|
* @author HalfSweet (Email:HalfSweet@HalfSweet.cn or QQ:2522182733)
|
||||||
|
* @brief 该文件为支持三色的墨水屏显示出三种颜色的例程
|
||||||
|
* @version 0.1
|
||||||
|
* @date 2022-04-20
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) 2022
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <EPaperDrive.h>
|
||||||
|
//包含你需要使用的文件系统,例如:
|
||||||
|
#include <LittleFS.h>
|
||||||
|
|
||||||
|
#define BAUD_SPEED 74880 //串口调试的波特率,可自行修改
|
||||||
|
|
||||||
|
#define CS 15
|
||||||
|
#define RST 2
|
||||||
|
#define DC 0
|
||||||
|
#define BUSY 4
|
||||||
|
#define CLK 14
|
||||||
|
#define DIN 13
|
||||||
|
EPaperDrive EPD(0, CS, RST, DC, BUSY, CLK, DIN); //驱动库的实例化,此处为使用软件SPI
|
||||||
|
|
||||||
|
const uint8_t city_icon[24] = {
|
||||||
|
/* 0X01,0X01,0X0C,0X00,0X0C,0X00, */
|
||||||
|
0X00,
|
||||||
|
0X00,
|
||||||
|
0X1C,
|
||||||
|
0X00,
|
||||||
|
0X77,
|
||||||
|
0X00,
|
||||||
|
0X41,
|
||||||
|
0X80,
|
||||||
|
0X9C,
|
||||||
|
0X60,
|
||||||
|
0XA2,
|
||||||
|
0X30,
|
||||||
|
0XA2,
|
||||||
|
0X30,
|
||||||
|
0X9C,
|
||||||
|
0XC0,
|
||||||
|
0X41,
|
||||||
|
0X80,
|
||||||
|
0X77,
|
||||||
|
0X00,
|
||||||
|
0X1C,
|
||||||
|
0X00,
|
||||||
|
0X00,
|
||||||
|
0X00,
|
||||||
|
};
|
||||||
|
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
Serial.begin(BAUD_SPEED);
|
||||||
|
LittleFS.begin(); //请务必先手动初始化一遍文件系统再将指针传入
|
||||||
|
EPD.SetFS(&LittleFS); //设置存放字体的文件系统,传入的为该文件系统的操作指针,可自行修改
|
||||||
|
|
||||||
|
EPD.EPD_Set_Model(DKE42_3COLOR); //设置屏幕类型,具体型号可以参考文档
|
||||||
|
EPD.EPD_init_Full(); //全刷初始化,使用全刷波形
|
||||||
|
EPD.clearbuffer(); //清空缓存(全白)
|
||||||
|
EPD.fontscale = 2; //字体缩放系数(支持1和2,对图片也有效,用完记得重新改成1)
|
||||||
|
EPD.SetFont(FONT12); //选择字体,具体支持的字体见文档
|
||||||
|
EPD.DrawUTF(0, 0, "Hello World"); //绘制字符串
|
||||||
|
EPD.DrawUTF(26, 0, "我喜欢墨水屏"); //绘制字符串
|
||||||
|
EPD.fontscale = 1; //字体缩放系数改回1
|
||||||
|
EPD.DrawXbm_P(100, 0, 12, 12, (uint8_t *)city_icon); //绘制图片
|
||||||
|
EPD.EPD_Transfer_Full_BW((unsigned char *)EPD.EPDbuffer, 1); //将黑白图像传入缓存
|
||||||
|
EPD.clearbuffer();
|
||||||
|
EPD.fontscale = 2;
|
||||||
|
EPD.DrawUTF(40, 0, "现在是红色");
|
||||||
|
EPD.fontscale = 1;
|
||||||
|
EPD.DrawXbm_P(100, 30, 12, 12, (uint8_t *)city_icon); //绘制图片
|
||||||
|
EPD.EPD_Transfer_Full_RED((unsigned char *)EPD.EPDbuffer,1);
|
||||||
|
Serial.printf("缓存图像绘制完毕,准备全刷 \n");
|
||||||
|
EPD.EPD_Update();
|
||||||
|
EPD.ReadBusy_long();//等待屏幕刷新完成后才继续往下运行
|
||||||
|
EPD.deepsleep(); //让屏幕进入休眠模式
|
||||||
|
Serial.println("全刷完毕");
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop()
|
||||||
|
{
|
||||||
|
delay(1); //防止看门狗咬
|
||||||
|
}
|
||||||
0
examples/ThreeColor/data/ThreeColor.ino
Normal file
0
examples/ThreeColor/data/ThreeColor.ino
Normal file
BIN
examples/ThreeColor/data/font10
Normal file
BIN
examples/ThreeColor/data/font10
Normal file
Binary file not shown.
BIN
examples/ThreeColor/data/font12
Normal file
BIN
examples/ThreeColor/data/font12
Normal file
Binary file not shown.
BIN
examples/ThreeColor/data/font32
Normal file
BIN
examples/ThreeColor/data/font32
Normal file
Binary file not shown.
BIN
examples/ThreeColor/data/font60
Normal file
BIN
examples/ThreeColor/data/font60
Normal file
Binary file not shown.
BIN
examples/ThreeColor/data/font70
Normal file
BIN
examples/ThreeColor/data/font70
Normal file
Binary file not shown.
BIN
examples/ThreeColor/data/weathericon32
Normal file
BIN
examples/ThreeColor/data/weathericon32
Normal file
Binary file not shown.
BIN
examples/ThreeColor/data/weathericon50
Normal file
BIN
examples/ThreeColor/data/weathericon50
Normal file
Binary file not shown.
BIN
examples/ThreeColor/data/weathericon80
Normal file
BIN
examples/ThreeColor/data/weathericon80
Normal file
Binary file not shown.
@@ -18,6 +18,7 @@ EPaperDrive::EPaperDrive(bool SPIMode, uint8_t CS, uint8_t RST, uint8_t DC, uint
|
|||||||
pinMode(CS, OUTPUT); // io初始化
|
pinMode(CS, OUTPUT); // io初始化
|
||||||
pinMode(DC, OUTPUT);
|
pinMode(DC, OUTPUT);
|
||||||
pinMode(RST, OUTPUT);
|
pinMode(RST, OUTPUT);
|
||||||
|
digitalWrite(RST, HIGH);
|
||||||
pinMode(BUSY, INPUT);
|
pinMode(BUSY, INPUT);
|
||||||
pinMode(CLK, OUTPUT);
|
pinMode(CLK, OUTPUT);
|
||||||
pinMode(DIN, OUTPUT);
|
pinMode(DIN, OUTPUT);
|
||||||
@@ -27,6 +28,7 @@ EPaperDrive::EPaperDrive(bool SPIMode, uint8_t CS, uint8_t RST, uint8_t DC, uint
|
|||||||
pinMode(CS, OUTPUT);
|
pinMode(CS, OUTPUT);
|
||||||
pinMode(DC, OUTPUT);
|
pinMode(DC, OUTPUT);
|
||||||
pinMode(RST, OUTPUT);
|
pinMode(RST, OUTPUT);
|
||||||
|
digitalWrite(RST, HIGH);
|
||||||
pinMode(BUSY, INPUT);
|
pinMode(BUSY, INPUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -182,8 +184,8 @@ void EPaperDrive::DrawEmptyBox(int x, int y, int w, int h)
|
|||||||
{
|
{
|
||||||
DrawXline(y, y + w, x);
|
DrawXline(y, y + w, x);
|
||||||
DrawXline(y, y + w, x + h);
|
DrawXline(y, y + w, x + h);
|
||||||
DrawYline(x, x + w, y);
|
DrawYline(x, x + h, y);
|
||||||
DrawYline(x, x + w, y + w);
|
DrawYline(x, x + h, y + w);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EPaperDrive::DrawChart(int x, int y, int w, int c1, int c2, int c3, int c4, int c5, int c6)
|
void EPaperDrive::DrawChart(int x, int y, int w, int c1, int c2, int c3, int c4, int c5, int c6)
|
||||||
@@ -312,30 +314,30 @@ void EPaperDrive::DrawCircleChart(int x, int y, int r, int w, int c1, int c2, in
|
|||||||
int EPaperDrive::getIcon(int weathercodeindex)
|
int EPaperDrive::getIcon(int weathercodeindex)
|
||||||
{
|
{
|
||||||
if (weathercodeindex == 0)
|
if (weathercodeindex == 0)
|
||||||
return 12;
|
return 12; //晴
|
||||||
if (weathercodeindex == 1)
|
if (weathercodeindex == 1)
|
||||||
return 58;
|
return 58; //多云
|
||||||
if (weathercodeindex == 2)
|
if (weathercodeindex == 2)
|
||||||
return 58;
|
return 58; //少云
|
||||||
if (weathercodeindex == 3)
|
if (weathercodeindex == 3)
|
||||||
return 58;
|
return 58; //晴间多云
|
||||||
if (weathercodeindex == 4)
|
if (weathercodeindex == 4)
|
||||||
return 54;
|
return 54; //阴
|
||||||
if (weathercodeindex >= 5 && weathercodeindex <= 18)
|
if (weathercodeindex >= 5 && weathercodeindex <= 18)
|
||||||
return 0;
|
return 0;
|
||||||
if (weathercodeindex >= 19 && weathercodeindex <= 32)
|
if (weathercodeindex >= 19 && weathercodeindex <= 32)
|
||||||
return 19;
|
return 19; //雨
|
||||||
if (weathercodeindex >= 33 && weathercodeindex <= 36)
|
if (weathercodeindex >= 33 && weathercodeindex <= 36)
|
||||||
return 16;
|
return 16; //雪
|
||||||
if (weathercodeindex >= 37 && weathercodeindex <= 40)
|
if (weathercodeindex >= 37 && weathercodeindex <= 40)
|
||||||
return 16;
|
return 16; //雪(雨夹雪)
|
||||||
if (weathercodeindex == 41)
|
if (weathercodeindex == 41)
|
||||||
return 37;
|
return 37; //雾(薄雾)
|
||||||
if (weathercodeindex == 42)
|
if (weathercodeindex == 42)
|
||||||
return 37;
|
return 37; //雾
|
||||||
if (weathercodeindex == 43)
|
if (weathercodeindex == 43)
|
||||||
return 37;
|
return 37; //雾(霾)
|
||||||
return 17;
|
return 17; //阵雨夹雪
|
||||||
}
|
}
|
||||||
void EPaperDrive::DrawWeatherChart(int xmin, int xmax, int ymin, int ymax, int point_n, int show_n, String tmax, String tmin, String code_d, String code_n, String text_d, String text_n, String date, String week) //绘制天气温度变化曲线
|
void EPaperDrive::DrawWeatherChart(int xmin, int xmax, int ymin, int ymax, int point_n, int show_n, String tmax, String tmin, String code_d, String code_n, String text_d, String text_n, String date, String week) //绘制天气温度变化曲线
|
||||||
{
|
{
|
||||||
@@ -661,6 +663,7 @@ void EPaperDrive::DrawUnicodeChar(int16_t x, int16_t y, uint8_t width, uint8_t h
|
|||||||
else
|
else
|
||||||
sizeofsinglechar = (height / 8 + 1) * width;
|
sizeofsinglechar = (height / 8 + 1) * width;
|
||||||
offset = (code[0] * 0x100 + code[1]) * sizeofsinglechar;
|
offset = (code[0] * 0x100 + code[1]) * sizeofsinglechar;
|
||||||
|
Serial.printf("offset:%d",offset);
|
||||||
// Serial.println("code[1]");
|
// Serial.println("code[1]");
|
||||||
// Serial.println(code[1]);
|
// Serial.println(code[1]);
|
||||||
//Serial.println("sizeofsinglechar");
|
//Serial.println("sizeofsinglechar");
|
||||||
@@ -2086,8 +2089,8 @@ void EPaperDrive::EPD_init_Full(void)
|
|||||||
// Serial.printf("即将写入全刷波形 \n");
|
// Serial.printf("即将写入全刷波形 \n");
|
||||||
EPD_Write((uint8_t *)LUTDefault_full_GDEY042Z98, sizeof(LUTDefault_full_GDEY042Z98));
|
EPD_Write((uint8_t *)LUTDefault_full_GDEY042Z98, sizeof(LUTDefault_full_GDEY042Z98));
|
||||||
|
|
||||||
EPD_WriteCMD(0x3F);
|
//EPD_WriteCMD(0x3F);
|
||||||
EPD_WriteData(*(LUTDefault_full_GDEY042Z98 + 227 + 1));
|
//EPD_WriteData(*(LUTDefault_full_GDEY042Z98 + 227 + 1));
|
||||||
|
|
||||||
EPD_WriteCMD(0x03); //门电压 gate voltage
|
EPD_WriteCMD(0x03); //门电压 gate voltage
|
||||||
EPD_WriteData(*(LUTDefault_full_GDEY042Z98 + 228 + 1));
|
EPD_WriteData(*(LUTDefault_full_GDEY042Z98 + 228 + 1));
|
||||||
@@ -2452,6 +2455,10 @@ void EPaperDrive::EPD_Dis_Full(uint8_t *DisBuffer, uint8_t Label)
|
|||||||
|
|
||||||
else if (EPD_Type == WF29 || EPD_Type == WF58 || EPD_Type == WF29BZ03 || EPD_Type == C154 || EPD_Type == WF42 || EPD_Type == WFT0290CZ10)
|
else if (EPD_Type == WF29 || EPD_Type == WF58 || EPD_Type == WF29BZ03 || EPD_Type == C154 || EPD_Type == WF42 || EPD_Type == WFT0290CZ10)
|
||||||
{
|
{
|
||||||
|
if(EPD_Type == WFT0290CZ10)
|
||||||
|
{
|
||||||
|
EPD_WriteDispRam_Old(xDot / 8, yDot, (uint8_t *)DisBuffer, 0, 0xff);
|
||||||
|
}
|
||||||
if (Label == 2)
|
if (Label == 2)
|
||||||
{
|
{
|
||||||
EPD_WriteDispRam(xDot / 8, yDot, (uint8_t *)DisBuffer, 0, 0xff); // white
|
EPD_WriteDispRam(xDot / 8, yDot, (uint8_t *)DisBuffer, 0, 0xff); // white
|
||||||
@@ -2537,6 +2544,15 @@ void EPaperDrive::EPD_Dis_Part(int xStart, int xEnd, int yStart, int yEnd, uint8
|
|||||||
EPD_SetRamPointer(xStart / 8, yEnd % 256, yEnd / 256);
|
EPD_SetRamPointer(xStart / 8, yEnd % 256, yEnd / 256);
|
||||||
EPD_WriteDispRam_Old(Xsize, Ysize, (uint8_t *)DisBuffer, offset, 1);
|
EPD_WriteDispRam_Old(Xsize, Ysize, (uint8_t *)DisBuffer, offset, 1);
|
||||||
}
|
}
|
||||||
|
else if(EPD_Type == OPM42 || EPD_Type == DKE42_3COLOR)
|
||||||
|
{
|
||||||
|
EPD_WriteDispRam(Xsize, Ysize, (uint8_t *)DisBuffer, offset, 1);
|
||||||
|
}
|
||||||
|
else if(EPD_Type == WX29)
|
||||||
|
{
|
||||||
|
EPD_SetRamPointer(xStart / 8, yEnd % 256, yEnd / 256);
|
||||||
|
EPD_WriteDispRam(Xsize, Ysize, (uint8_t *)DisBuffer, offset, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// EPD_WriteDispRam_Old(Xsize, Ysize,(uint8_t *)DisBuffer,offset,1);
|
// EPD_WriteDispRam_Old(Xsize, Ysize,(uint8_t *)DisBuffer,offset,1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -463,6 +463,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
void EPD_Write(uint8_t *value, uint8_t datalen);
|
void EPD_Write(uint8_t *value, uint8_t datalen);
|
||||||
|
|
||||||
|
void EPD_WriteDispRam_Old(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
|
||||||
|
void EPD_WriteDispRam(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
|
||||||
|
void EPD_SetRamPointer(uint16_t addrX, uint8_t addrY, uint8_t addrY1);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t _CS;
|
uint8_t _CS;
|
||||||
uint8_t _RST;
|
uint8_t _RST;
|
||||||
@@ -489,14 +494,13 @@ private:
|
|||||||
void driver_delay_xms(unsigned long xms);
|
void driver_delay_xms(unsigned long xms);
|
||||||
|
|
||||||
void EPD_WriteDispRam_RED(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
|
void EPD_WriteDispRam_RED(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
|
||||||
void EPD_WriteDispRam(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
|
|
||||||
// void EPD_SetRamArea(uint16_t Xstart,uint16_t Xend,uint8_t Ystart,uint8_t Ystart1,uint8_t Yend,uint8_t Yend1);
|
// void EPD_SetRamArea(uint16_t Xstart,uint16_t Xend,uint8_t Ystart,uint8_t Ystart1,uint8_t Yend,uint8_t Yend1);
|
||||||
void EPD_SetRamPointer(uint16_t addrX, uint8_t addrY, uint8_t addrY1);
|
|
||||||
void EPD_WirteLUT(uint8_t *LUTvalue, uint8_t Size);
|
void EPD_WirteLUT(uint8_t *LUTvalue, uint8_t Size);
|
||||||
|
|
||||||
void EPD_Init(void);
|
void EPD_Init(void);
|
||||||
void EPD_WriteCMD_p1(uint8_t command, uint8_t para);
|
void EPD_WriteCMD_p1(uint8_t command, uint8_t para);
|
||||||
void EPD_WriteDispRam_Old(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
|
|
||||||
void EPD_SetRamArea(uint16_t Xstart, uint16_t Xend, uint8_t Ystart, uint8_t Ystart1, uint8_t Yend, uint8_t Yend1);
|
void EPD_SetRamArea(uint16_t Xstart, uint16_t Xend, uint8_t Ystart, uint8_t Ystart1, uint8_t Yend, uint8_t Yend1);
|
||||||
|
|
||||||
int getIcon(int weathercodeindex);
|
int getIcon(int weathercodeindex);
|
||||||
|
|||||||
@@ -814,8 +814,8 @@ const uint8_t lut_bb_part_WFT0290CZ10[]={
|
|||||||
const uint8_t LUTDefault_full_GDEY042Z98[] = {
|
const uint8_t LUTDefault_full_GDEY042Z98[] = {
|
||||||
0x32,
|
0x32,
|
||||||
//VCOM
|
//VCOM
|
||||||
0x01, 0x28, 0x28, 0x14, 0x3C, 0x01, 0x01,
|
0x01, 0x23, 0x23, 0x05, 0x3C, 0x02, 0x03,
|
||||||
0x01, 0x28, 0x28, 0x14, 0x3C, 0x01, 0x01,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@@ -823,8 +823,8 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
//RED
|
//RED
|
||||||
0x01, 0x28, 0x28, 0x94, 0xFC, 0x01, 0x01,
|
0x01, 0x63, 0xA3, 0x85, 0xFC, 0x02, 0x03,
|
||||||
0x01, 0x28, 0x28, 0x94, 0xFC, 0x01, 0x01,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@@ -832,8 +832,8 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
//WHITE
|
//WHITE
|
||||||
0x01, 0x68, 0xA8, 0x14, 0x3C, 0x01, 0x01,
|
0x01, 0x63, 0xA3, 0x05, 0x3C, 0x02, 0x03,
|
||||||
0x01, 0x68, 0xA8, 0x14, 0x3C, 0x01, 0x01,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@@ -841,8 +841,8 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
//BLACK
|
//BLACK
|
||||||
0x01, 0xA8, 0x68, 0x14, 0x3C, 0x01, 0x01,
|
0x01, 0xA3, 0x63, 0x05, 0x3C, 0x02, 0x03,
|
||||||
0x01, 0xA8, 0x68, 0x14, 0x3C, 0x01, 0x01,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@@ -850,9 +850,10 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
||||||
0x02, 0x00, 0x00, 0x22, 0x17, 0x41, 0xA8,
|
0x03, 0x00, 0x00, 0x22, 0x17, 0x41, 0xA8,
|
||||||
0x32, 0x48,
|
0x32, 0x48,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t LUTDefault_part_GDEY042Z98[] = {
|
const uint8_t LUTDefault_part_GDEY042Z98[] = {
|
||||||
@@ -907,6 +908,94 @@ const uint8_t LUTDefault_part_GDEY042Z98[] = {
|
|||||||
0x32, 0x08,
|
0x32, 0x08,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const uint8_t LUT_gray_GDEY042Z98[] = {
|
||||||
|
0x32,
|
||||||
|
//VCOM
|
||||||
|
0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
//RED
|
||||||
|
0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
//WHITE
|
||||||
|
0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
//BLACK
|
||||||
|
0x01, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
||||||
|
0x02, 0x00, 0x00, 0x22, 0x17, 0x4B, 0xA8,
|
||||||
|
0x32, 0x48,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t LUT_gray_red_GDEY042Z98[] = {
|
||||||
|
0x32,
|
||||||
|
//VCOM
|
||||||
|
0x01, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
//RED
|
||||||
|
0x01, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
//WHITE
|
||||||
|
0x01, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
//BLACK
|
||||||
|
0x01, 0xC9, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
||||||
|
0x03, 0x00, 0x00, 0x22, 0x17, 0x4B, 0xA8,
|
||||||
|
0x32, 0x48,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
static const uint8_t LUTDefault_full_HINKE0266A15A0[] = {
|
static const uint8_t LUTDefault_full_HINKE0266A15A0[] = {
|
||||||
0x32, // command
|
0x32, // command
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user