update STM32&Arduino

This commit is contained in:
SSYYL 2021-03-18 17:55:38 +08:00
parent 2613454540
commit 16d3b59ae2
13 changed files with 158 additions and 320 deletions

View File

@ -254,7 +254,8 @@ void Epd::SetMemoryPointer(int x, int y) {
*/
void Epd::Sleep() {
SendCommand(DEEP_SLEEP_MODE);
WaitUntilIdle();
SendData(0x01);
// WaitUntilIdle();
}
const unsigned char lut_full_update[] = {

View File

@ -374,7 +374,7 @@ void Epd::SetMemoryPointer(int x, int y) {
void Epd::Sleep() {
SendCommand(0x10);
SendData(0x01);
WaitUntilIdle();
// WaitUntilIdle();
}
/* END OF FILE */

View File

@ -31,57 +31,6 @@
#include <stdlib.h>
#include "epd2in9d.h"
/**
* full screen update LUT
**/
const unsigned char EPD_2IN9D_lut_vcomDC[] = {
0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
0x60, 0x28, 0x28, 0x00, 0x00, 0x01,
0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_ww[] = {
0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_bw[] = {
0x40, 0x17, 0x00, 0x00, 0x00, 0x02,
0x90, 0x0F, 0x0F, 0x00, 0x00, 0x03,
0x40, 0x0A, 0x01, 0x00, 0x00, 0x01,
0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_wb[] = {
0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_bb[] = {
0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/**
* partial screen update LUT
**/
@ -175,44 +124,7 @@ void Epd::WaitUntilIdle(void)
busy = DigitalRead(busy_pin);
busy =!(busy & 0x01);
} while(busy);
DelayMs(200);
}
/******************************************************************************
function : LUT download
parameter:
******************************************************************************/
void Epd::SetFullReg(void)
{
SendCommand(0X50); //VCOM AND DATA INTERVAL SETTING
SendData(0xb7); //WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
unsigned int count;
SendCommand(0x20);
for(count=0; count<44; count++) {
SendData(EPD_2IN9D_lut_vcomDC[count]);
}
SendCommand(0x21);
for(count=0; count<42; count++) {
SendData(EPD_2IN9D_lut_ww[count]);
}
SendCommand(0x22);
for(count=0; count<42; count++) {
SendData(EPD_2IN9D_lut_bw[count]);
}
SendCommand(0x23);
for(count=0; count<42; count++) {
SendData(EPD_2IN9D_lut_wb[count]);
}
SendCommand(0x24);
for(count=0; count<42; count++) {
SendData(EPD_2IN9D_lut_bb[count]);
}
DelayMs(20);
}
/******************************************************************************
@ -221,10 +133,38 @@ parameter:
******************************************************************************/
void Epd::SetPartReg(void)
{
SendCommand(0x82); //vcom_DC setting
SendCommand(0x01); //POWER SETTING
SendData(0x03);
SendData(0x00);
SendData(0x2b);
SendData(0x2b);
SendData(0x03);
SendCommand(0x06); //boost soft start
SendData(0x17); //A
SendData(0x17); //B
SendData(0x17); //C
SendCommand(0x04);
WaitUntilIdle();
SendCommand(0x00); //panel setting
SendData(0xbf); //LUT from OTP128x296
SendCommand(0x30); //PLL setting
SendData(0x3a); // 3a 100HZ 29 150Hz 39 200HZ 31 171HZ
SendCommand(0x61); //resolution setting
SendData(EPD_WIDTH);
SendData((EPD_WIDTH >> 8) & 0xff);
SendData(EPD_HEIGHT & 0xff);
SendCommand(0x82); //vcom_DC setting
SendData(0x12);
SendCommand(0X50);
SendData(0xb7);
SendData(0x97);
unsigned int count;
SendCommand(0x20);
@ -270,35 +210,19 @@ int Epd::Init(void)
Reset();
SendCommand(0x01); //POWER SETTING
SendData(0x03);
SendData(0x00);
SendData(0x2b);
SendData(0x2b);
SendData(0x03);
SendCommand(0x04);
WaitUntilIdle();//waiting for the electronic paper IC to release the idle signal
SendCommand(0x06); //boost soft start
SendData(0x17); //A
SendData(0x17); //B
SendData(0x17); //C
SendCommand(0x00); //panel setting
SendData(0x1f); //LUT from OTPKW-BF KWR-AF BWROTP 0f BWOTP 1f
SendCommand(0x04);
WaitUntilIdle();
SendCommand(0x61); //resolution setting
SendData (0x80);
SendData (0x01);
SendData (0x28);
SendCommand(0x00); //panel setting
SendData(0xbf); //LUT from OTP128x296
SendData(0x0e); //VCOM to 0V fast
SendCommand(0x30); //PLL setting
SendData(0x3a); // 3a 100HZ 29 150Hz 39 200HZ 31 171HZ
SendCommand(0x61); //resolution setting
SendData(EPD_WIDTH);
SendData((EPD_HEIGHT >> 8) & 0xff);
SendData(EPD_HEIGHT & 0xff);
SendCommand(0x82); //vcom_DC setting
SendData(0x28);
SendCommand(0X50); //VCOM AND DATA INTERVAL SETTING
return 0;
}
@ -311,11 +235,19 @@ int Epd::Init(void)
void Epd::Reset(void)
{
DigitalWrite(reset_pin, HIGH);
DelayMs(200);
DelayMs(20);
DigitalWrite(reset_pin, LOW); //module reset
DelayMs(10);
DelayMs(2);
DigitalWrite(reset_pin, HIGH);
DelayMs(200);
DelayMs(20);
DigitalWrite(reset_pin, LOW); //module reset
DelayMs(2);
DigitalWrite(reset_pin, HIGH);
DelayMs(20);
DigitalWrite(reset_pin, LOW); //module reset
DelayMs(2);
DigitalWrite(reset_pin, HIGH);
DelayMs(20);
}
void Epd::Clear(void)
@ -338,7 +270,6 @@ void Epd::Clear(void)
}
}
SetFullReg();
TurnOnDisplay();
}
@ -363,7 +294,6 @@ void Epd::Display(const unsigned char* frame_buffer)
}
// Dev_Delay_ms(10);
SetFullReg();
TurnOnDisplay();
}

View File

@ -146,9 +146,17 @@ void Epd::WaitUntilIdle(void) {
*/
void Epd::Reset(void) {
DigitalWrite(reset_pin, LOW);
DelayMs(200);
DelayMs(2);
DigitalWrite(reset_pin, HIGH);
DelayMs(200);
DelayMs(20);
DigitalWrite(reset_pin, LOW);
DelayMs(2);
DigitalWrite(reset_pin, HIGH);
DelayMs(20);
DigitalWrite(reset_pin, LOW);
DelayMs(2);
DigitalWrite(reset_pin, HIGH);
DelayMs(20);
}
/**

View File

@ -71,7 +71,7 @@ int Epd::Init(void) {
SendData(0x1D);
SendCommand(0x30);
SendData(0x3C);
SendCommand(0x40);
SendCommand(0x41);
SendData(0x00);
SendCommand(0x50);
SendData(0x37);

File diff suppressed because one or more lines are too long

View File

@ -244,7 +244,7 @@
<Group>
<GroupName>Application/MDK-ARM</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@ -3,7 +3,7 @@
<title>Static Call Graph - [epd-demo\epd-demo.axf]</title></head>
<body><HR>
<H1>Static Call Graph for image epd-demo\epd-demo.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Mon Feb 22 15:54:10 2021
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Thu Mar 18 17:52:13 2021
<BR><P>
<H3>Maximum Stack Usage = 136 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>

View File

@ -1159,7 +1159,7 @@ Removing Unused input sections from the image.
Removing epd_2in9d_test.o(.rev16_text), (4 bytes).
Removing epd_2in9d_test.o(.revsh_text), (4 bytes).
Removing epd_2in9d_test.o(.rrx_text), (6 bytes).
Removing epd_2in9d_test.o(.text), (1048 bytes).
Removing epd_2in9d_test.o(.text), (1068 bytes).
Removing epd_2in13_test.o(.rev16_text), (4 bytes).
Removing epd_2in13_test.o(.revsh_text), (4 bytes).
Removing epd_2in13_test.o(.rrx_text), (6 bytes).
@ -1319,8 +1319,8 @@ Removing Unused input sections from the image.
Removing epd_2in9d.o(.rev16_text), (4 bytes).
Removing epd_2in9d.o(.revsh_text), (4 bytes).
Removing epd_2in9d.o(.rrx_text), (6 bytes).
Removing epd_2in9d.o(.text), (1044 bytes).
Removing epd_2in9d.o(.constdata), (424 bytes).
Removing epd_2in9d.o(.text), (1012 bytes).
Removing epd_2in9d.o(.constdata), (212 bytes).
Removing epd_2in13.o(.rev16_text), (4 bytes).
Removing epd_2in13.o(.revsh_text), (4 bytes).
Removing epd_2in13.o(.rrx_text), (6 bytes).
@ -1365,7 +1365,7 @@ Removing Unused input sections from the image.
Removing epd_4in2.o(.rev16_text), (4 bytes).
Removing epd_4in2.o(.revsh_text), (4 bytes).
Removing epd_4in2.o(.rrx_text), (6 bytes).
Removing epd_4in2.o(.text), (1732 bytes).
Removing epd_4in2.o(.text), (1796 bytes).
Removing epd_4in2.o(.constdata), (634 bytes).
Removing epd_4in2bc.o(.rev16_text), (4 bytes).
Removing epd_4in2bc.o(.revsh_text), (4 bytes).
@ -1450,7 +1450,7 @@ Removing Unused input sections from the image.
Removing cdrcmple.o(.text), (48 bytes).
Removing depilogue.o(.text), (186 bytes).
458 unused section(s) (total 964795 bytes) removed from the image.
458 unused section(s) (total 964635 bytes) removed from the image.
==============================================================================

View File

@ -127,14 +127,14 @@ int EPD_2in9d_test(void)
#endif
printf("Clear...\r\n");
// EPD_2IN9D_Init();
EPD_2IN9D_Init();
EPD_2IN9D_Clear();
DEV_Delay_ms(2000);//important, at least 2s
printf("Goto Sleep...\r\n");
EPD_2IN9D_Sleep();
free(BlackImage);
BlackImage = NULL;
DEV_Delay_ms(2000);//important, at least 2s
// close 5V
printf("close 5V, Module enters 0 power consumption ...\r\n");
DEV_Module_Exit();

View File

@ -4,8 +4,8 @@
* | Function : 2.9inch e-paper d
* | Info :
*----------------
* | This version: V2.0
* | Date : 2019-06-12
* | This version: V3.1
* | Date : 2021-03-18
* | Info :
* -----------------------------------------------------------------------------
* V3.0(2019-06-12):
@ -54,57 +54,6 @@
#include "EPD_2in9d.h"
#include "Debug.h"
/**
* full screen update LUT
**/
const unsigned char EPD_2IN9D_lut_vcomDC[] = {
0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
0x60, 0x28, 0x28, 0x00, 0x00, 0x01,
0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_ww[] = {
0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_bw[] = {
0x40, 0x17, 0x00, 0x00, 0x00, 0x02,
0x90, 0x0F, 0x0F, 0x00, 0x00, 0x03,
0x40, 0x0A, 0x01, 0x00, 0x00, 0x01,
0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_wb[] = {
0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char EPD_2IN9D_lut_bb[] = {
0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/**
* partial screen update LUT
**/
@ -163,11 +112,19 @@ parameter:
static void EPD_2IN9D_Reset(void)
{
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(200);
DEV_Delay_ms(20);
DEV_Digital_Write(EPD_RST_PIN, 0);
DEV_Delay_ms(2);
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(200);
DEV_Delay_ms(20);
DEV_Digital_Write(EPD_RST_PIN, 0);
DEV_Delay_ms(2);
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(20);
DEV_Digital_Write(EPD_RST_PIN, 0);
DEV_Delay_ms(2);
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(20);
}
/******************************************************************************
@ -209,56 +166,48 @@ void EPD_2IN9D_ReadBusy(void)
busy = DEV_Digital_Read(EPD_BUSY_PIN);
busy =!(busy & 0x01);
} while(busy);
DEV_Delay_ms(200);
DEV_Delay_ms(20);
Debug("e-Paper busy release\r\n");
}
/******************************************************************************
function : LUT download
parameter:
******************************************************************************/
static void EPD_SetFullReg(void)
{
EPD_2IN9D_SendCommand(0X50); //VCOM AND DATA INTERVAL SETTING
EPD_2IN9D_SendData(0xb7); //WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
unsigned int count;
EPD_2IN9D_SendCommand(0x20);
for(count=0; count<44; count++) {
EPD_2IN9D_SendData(EPD_2IN9D_lut_vcomDC[count]);
}
EPD_2IN9D_SendCommand(0x21);
for(count=0; count<42; count++) {
EPD_2IN9D_SendData(EPD_2IN9D_lut_ww[count]);
}
EPD_2IN9D_SendCommand(0x22);
for(count=0; count<42; count++) {
EPD_2IN9D_SendData(EPD_2IN9D_lut_bw[count]);
}
EPD_2IN9D_SendCommand(0x23);
for(count=0; count<42; count++) {
EPD_2IN9D_SendData(EPD_2IN9D_lut_wb[count]);
}
EPD_2IN9D_SendCommand(0x24);
for(count=0; count<42; count++) {
EPD_2IN9D_SendData(EPD_2IN9D_lut_bb[count]);
}
}
/******************************************************************************
function : LUT download
parameter:
******************************************************************************/
static void EPD_2IN9D_SetPartReg(void)
{
EPD_2IN9D_SendCommand(0x82); //vcom_DC setting
EPD_2IN9D_SendCommand(0x01); //POWER SETTING
EPD_2IN9D_SendData(0x03);
EPD_2IN9D_SendData(0x00);
EPD_2IN9D_SendData(0x2b);
EPD_2IN9D_SendData(0x2b);
EPD_2IN9D_SendData(0x03);
EPD_2IN9D_SendCommand(0x06); //boost soft start
EPD_2IN9D_SendData(0x17); //A
EPD_2IN9D_SendData(0x17); //B
EPD_2IN9D_SendData(0x17); //C
EPD_2IN9D_SendCommand(0x04);
EPD_2IN9D_ReadBusy();
EPD_2IN9D_SendCommand(0x00); //panel setting
EPD_2IN9D_SendData(0xbf); //LUT from OTP128x296
EPD_2IN9D_SendCommand(0x30); //PLL setting
EPD_2IN9D_SendData(0x3a); // 3a 100HZ 29 150Hz 39 200HZ 31 171HZ
EPD_2IN9D_SendCommand(0x61); //resolution setting
EPD_2IN9D_SendData(EPD_2IN9D_WIDTH);
EPD_2IN9D_SendData((EPD_2IN9D_HEIGHT >> 8) & 0xff);
EPD_2IN9D_SendData(EPD_2IN9D_HEIGHT & 0xff);
EPD_2IN9D_SendCommand(0x82); //vcom_DC setting
EPD_2IN9D_SendData(0x12);
EPD_2IN9D_SendCommand(0X50);
EPD_2IN9D_SendData(0xb7);
EPD_2IN9D_SendData(0x97);
unsigned int count;
EPD_2IN9D_SendCommand(0x20);
@ -306,36 +255,20 @@ parameter:
void EPD_2IN9D_Init(void)
{
EPD_2IN9D_Reset();
EPD_2IN9D_SendCommand(0x04);
EPD_2IN9D_ReadBusy();//waiting for the electronic paper IC to release the idle signal
EPD_2IN9D_SendCommand(0x01); //POWER SETTING
EPD_2IN9D_SendData(0x03);
EPD_2IN9D_SendData(0x00);
EPD_2IN9D_SendData(0x2b);
EPD_2IN9D_SendData(0x2b);
EPD_2IN9D_SendData(0x03);
EPD_2IN9D_SendCommand(0x00); //panel setting
EPD_2IN9D_SendData(0x1f); //LUT from OTPKW-BF KWR-AF BWROTP 0f BWOTP 1f
EPD_2IN9D_SendCommand(0x06); //boost soft start
EPD_2IN9D_SendData(0x17); //A
EPD_2IN9D_SendData(0x17); //B
EPD_2IN9D_SendData(0x17); //C
EPD_2IN9D_SendCommand(0x61); //resolution setting
EPD_2IN9D_SendData (0x80);
EPD_2IN9D_SendData (0x01);
EPD_2IN9D_SendData (0x28);
EPD_2IN9D_SendCommand(0x04);
EPD_2IN9D_ReadBusy();
EPD_2IN9D_SendCommand(0x00); //panel setting
EPD_2IN9D_SendData(0xbf); //LUT from OTP128x296
EPD_2IN9D_SendData(0x0e); //VCOM to 0V fast
EPD_2IN9D_SendCommand(0x30); //PLL setting
EPD_2IN9D_SendData(0x3a); // 3a 100HZ 29 150Hz 39 200HZ 31 171HZ
EPD_2IN9D_SendCommand(0x61); //resolution setting
EPD_2IN9D_SendData(EPD_2IN9D_WIDTH);
EPD_2IN9D_SendData((EPD_2IN9D_HEIGHT >> 8) & 0xff);
EPD_2IN9D_SendData(EPD_2IN9D_HEIGHT & 0xff);
EPD_2IN9D_SendCommand(0x82); //vcom_DC setting
EPD_2IN9D_SendData(0x28);
EPD_2IN9D_SendCommand(0X50); //VCOM AND DATA INTERVAL SETTING
EPD_2IN9D_SendData(0x97); //WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
}
/******************************************************************************
@ -361,8 +294,6 @@ void EPD_2IN9D_Clear(void)
EPD_2IN9D_SendData(0xFF);
}
}
EPD_SetFullReg();
EPD_2IN9D_TurnOnDisplay();
}
@ -382,7 +313,6 @@ void EPD_2IN9D_Display(UBYTE *Image)
EPD_2IN9D_SendData(0x00);
}
}
// Dev_Delay_ms(10);
EPD_2IN9D_SendCommand(0x13);
for (UWORD j = 0; j < Height; j++) {
@ -390,9 +320,7 @@ void EPD_2IN9D_Display(UBYTE *Image)
EPD_2IN9D_SendData(Image[i + j * Width]);
}
}
// Dev_Delay_ms(10);
EPD_SetFullReg();
EPD_2IN9D_TurnOnDisplay();
}
@ -430,7 +358,6 @@ void EPD_2IN9D_DisplayPart(UBYTE *Image)
EPD_2IN9D_TurnOnDisplay();
}
/******************************************************************************
function : Enter sleep mode
parameter:

View File

@ -271,11 +271,19 @@ parameter:
static void EPD_4IN2_Reset(void)
{
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(200);
DEV_Delay_ms(20);
DEV_Digital_Write(EPD_RST_PIN, 0);
DEV_Delay_ms(2);
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(200);
DEV_Delay_ms(20);
DEV_Digital_Write(EPD_RST_PIN, 0);
DEV_Delay_ms(2);
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(20);
DEV_Digital_Write(EPD_RST_PIN, 0);
DEV_Delay_ms(2);
DEV_Digital_Write(EPD_RST_PIN, 1);
DEV_Delay_ms(20);
}
/******************************************************************************

View File

@ -105,7 +105,7 @@ void EPD_5IN65F_Init(void)
EPD_5IN65F_SendData(0x1D);
EPD_5IN65F_SendCommand(0x30);
EPD_5IN65F_SendData(0x3C);
EPD_5IN65F_SendCommand(0x40);
EPD_5IN65F_SendCommand(0x41);
EPD_5IN65F_SendData(0x00);
EPD_5IN65F_SendCommand(0x50);
EPD_5IN65F_SendData(0x37);