Speed up the refresh of some screens (experimental)(1.54 v2、2.13 v3、2.9 v2、7.5 v2)
This commit is contained in:
parent
b36cfab0ea
commit
452880de52
16 changed files with 432 additions and 74 deletions
|
|
@ -54,6 +54,29 @@ UBYTE _WF_PARTIAL_2IN9[159] =
|
|||
0x22,0x17,0x41,0xB0,0x32,0x36,
|
||||
};
|
||||
|
||||
UBYTE WS_20_30[159] =
|
||||
{
|
||||
0x80, 0x66, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0,
|
||||
0x10, 0x66, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0,
|
||||
0x80, 0x66, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0,
|
||||
0x10, 0x66, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x14, 0x8, 0x0, 0x0, 0x0, 0x0, 0x1,
|
||||
0xA, 0xA, 0x0, 0xA, 0xA, 0x0, 0x1,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x14, 0x8, 0x0, 0x1, 0x0, 0x0, 0x1,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x0, 0x0, 0x0,
|
||||
0x22, 0x17, 0x41, 0x0, 0x32, 0x36
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
function : Software reset
|
||||
parameter:
|
||||
|
|
@ -61,11 +84,11 @@ parameter:
|
|||
static void EPD_2IN9_V2_Reset(void)
|
||||
{
|
||||
DEV_Digital_Write(EPD_RST_PIN, 1);
|
||||
DEV_Delay_ms(100);
|
||||
DEV_Delay_ms(10);
|
||||
DEV_Digital_Write(EPD_RST_PIN, 0);
|
||||
DEV_Delay_ms(2);
|
||||
DEV_Digital_Write(EPD_RST_PIN, 1);
|
||||
DEV_Delay_ms(100);
|
||||
DEV_Delay_ms(10);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
@ -111,15 +134,31 @@ void EPD_2IN9_V2_ReadBusy(void)
|
|||
Debug("e-Paper busy release\r\n");
|
||||
}
|
||||
|
||||
static void EPD_2IN9_V2_LUT(void)
|
||||
static void EPD_2IN9_V2_LUT(UBYTE *lut)
|
||||
{
|
||||
UBYTE count;
|
||||
EPD_2IN9_V2_SendCommand(0x32);
|
||||
for(count=0; count<153; count++)
|
||||
EPD_2IN9_V2_SendData(_WF_PARTIAL_2IN9[count]);
|
||||
EPD_2IN9_V2_SendData(lut[count]);
|
||||
EPD_2IN9_V2_ReadBusy();
|
||||
}
|
||||
|
||||
static void EPD_2IN9_V2_LUT_by_host(UBYTE *lut)
|
||||
{
|
||||
EPD_2IN9_V2_LUT((UBYTE *)lut); //lut
|
||||
EPD_2IN9_V2_SendCommand(0x3f);
|
||||
EPD_2IN9_V2_SendData(*(lut+153));
|
||||
EPD_2IN9_V2_SendCommand(0x03); // gate voltage
|
||||
EPD_2IN9_V2_SendData(*(lut+154));
|
||||
EPD_2IN9_V2_SendCommand(0x04); // source voltage
|
||||
EPD_2IN9_V2_SendData(*(lut+155)); // VSH
|
||||
EPD_2IN9_V2_SendData(*(lut+156)); // VSH2
|
||||
EPD_2IN9_V2_SendData(*(lut+157)); // VSL
|
||||
EPD_2IN9_V2_SendCommand(0x2c); // VCOM
|
||||
EPD_2IN9_V2_SendData(*(lut+158));
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Turn On Display
|
||||
parameter:
|
||||
|
|
@ -127,7 +166,7 @@ parameter:
|
|||
static void EPD_2IN9_V2_TurnOnDisplay(void)
|
||||
{
|
||||
EPD_2IN9_V2_SendCommand(0x22); //Display Update Control
|
||||
EPD_2IN9_V2_SendData(0xF7);
|
||||
EPD_2IN9_V2_SendData(0xc7);
|
||||
EPD_2IN9_V2_SendCommand(0x20); //Activate Display Update Sequence
|
||||
EPD_2IN9_V2_ReadBusy();
|
||||
}
|
||||
|
|
@ -200,6 +239,8 @@ void EPD_2IN9_V2_Init(void)
|
|||
|
||||
EPD_2IN9_V2_SetCursor(0, 0);
|
||||
EPD_2IN9_V2_ReadBusy();
|
||||
|
||||
EPD_2IN9_V2_LUT_by_host(WS_20_30);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
@ -209,6 +250,7 @@ parameter:
|
|||
void EPD_2IN9_V2_Clear(void)
|
||||
{
|
||||
UWORD i;
|
||||
|
||||
EPD_2IN9_V2_SendCommand(0x24); //write RAM for black(0)/white (1)
|
||||
for(i=0;i<4736;i++)
|
||||
{
|
||||
|
|
@ -255,11 +297,11 @@ void EPD_2IN9_V2_Display_Partial(UBYTE *Image)
|
|||
|
||||
//Reset
|
||||
DEV_Digital_Write(EPD_RST_PIN, 0);
|
||||
DEV_Delay_ms(5);
|
||||
DEV_Delay_ms(1);
|
||||
DEV_Digital_Write(EPD_RST_PIN, 1);
|
||||
DEV_Delay_ms(10);
|
||||
DEV_Delay_ms(2);
|
||||
|
||||
EPD_2IN9_V2_LUT();
|
||||
EPD_2IN9_V2_LUT(_WF_PARTIAL_2IN9);
|
||||
EPD_2IN9_V2_SendCommand(0x37);
|
||||
EPD_2IN9_V2_SendData(0x00);
|
||||
EPD_2IN9_V2_SendData(0x00);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue