add 4.01f demo
This commit is contained in:
parent
c65eec8e5e
commit
7b958776c8
52 changed files with 11250 additions and 1902 deletions
259
RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_2in13_V3.c
Normal file
259
RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_2in13_V3.c
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
/*****************************************************************************
|
||||
* | File : EPD_2in13_V3.c
|
||||
* | Author : Waveshare team
|
||||
* | Function : 2.13inch e-paper V3
|
||||
* | Info :
|
||||
*----------------
|
||||
* | This version: V1.0
|
||||
* | Date : 2020-12-22
|
||||
* | Info :
|
||||
* -----------------------------------------------------------------------------
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
******************************************************************************/
|
||||
#include "EPD_2in13_V3.h"
|
||||
#include "Debug.h"
|
||||
|
||||
/******************************************************************************
|
||||
function : Software reset
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
static void EPD_2in13_V3_Reset(void)
|
||||
{
|
||||
DEV_Digital_Write(EPD_RST_PIN, 1);
|
||||
DEV_Delay_ms(100);
|
||||
DEV_Digital_Write(EPD_RST_PIN, 0);
|
||||
DEV_Delay_ms(2);
|
||||
DEV_Digital_Write(EPD_RST_PIN, 1);
|
||||
DEV_Delay_ms(100);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : send command
|
||||
parameter:
|
||||
Reg : Command register
|
||||
******************************************************************************/
|
||||
static void EPD_2in13_V3_SendCommand(UBYTE Reg)
|
||||
{
|
||||
DEV_Digital_Write(EPD_DC_PIN, 0);
|
||||
DEV_Digital_Write(EPD_CS_PIN, 0);
|
||||
DEV_SPI_WriteByte(Reg);
|
||||
DEV_Digital_Write(EPD_CS_PIN, 1);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : send data
|
||||
parameter:
|
||||
Data : Write data
|
||||
******************************************************************************/
|
||||
static void EPD_2in13_V3_SendData(UBYTE Data)
|
||||
{
|
||||
DEV_Digital_Write(EPD_DC_PIN, 1);
|
||||
DEV_Digital_Write(EPD_CS_PIN, 0);
|
||||
DEV_SPI_WriteByte(Data);
|
||||
DEV_Digital_Write(EPD_CS_PIN, 1);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Wait until the busy_pin goes LOW
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
void EPD_2in13_V3_ReadBusy(void)
|
||||
{
|
||||
Debug("e-Paper busy\r\n");
|
||||
while(1)
|
||||
{ //=1 BUSY
|
||||
if(DEV_Digital_Read(EPD_BUSY_PIN)==0)
|
||||
break;
|
||||
DEV_Delay_ms(50);
|
||||
}
|
||||
DEV_Delay_ms(50);
|
||||
Debug("e-Paper busy release\r\n");
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Turn On Display
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
static void EPD_2in13_V3_TurnOnDisplay(void)
|
||||
{
|
||||
EPD_2in13_V3_SendCommand(0x22); //Display Update Control
|
||||
EPD_2in13_V3_SendData(0xF7);
|
||||
EPD_2in13_V3_SendCommand(0x20); //Activate Display Update Sequence
|
||||
EPD_2in13_V3_ReadBusy();
|
||||
}
|
||||
|
||||
static void EPD_2in13_V3_TurnOnDisplay_Partial(void)
|
||||
{
|
||||
EPD_2in13_V3_SendCommand(0x22); //Display Update Control
|
||||
EPD_2in13_V3_SendData(0xFF);
|
||||
EPD_2in13_V3_SendCommand(0x20); //Activate Display Update Sequence
|
||||
EPD_2in13_V3_ReadBusy();
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Setting the display window
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
static void EPD_2in13_V3_SetWindows(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend)
|
||||
{
|
||||
EPD_2in13_V3_SendCommand(0x44); // SET_RAM_X_ADDRESS_START_END_POSITION
|
||||
EPD_2in13_V3_SendData((Xstart>>3) & 0xFF);
|
||||
EPD_2in13_V3_SendData((Xend>>3) & 0xFF);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x45); // SET_RAM_Y_ADDRESS_START_END_POSITION
|
||||
EPD_2in13_V3_SendData(Ystart & 0xFF);
|
||||
EPD_2in13_V3_SendData((Ystart >> 8) & 0xFF);
|
||||
EPD_2in13_V3_SendData(Yend & 0xFF);
|
||||
EPD_2in13_V3_SendData((Yend >> 8) & 0xFF);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Set Cursor
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
static void EPD_2in13_V3_SetCursor(UWORD Xstart, UWORD Ystart)
|
||||
{
|
||||
EPD_2in13_V3_SendCommand(0x4E); // SET_RAM_X_ADDRESS_COUNTER
|
||||
EPD_2in13_V3_SendData(Xstart & 0xFF);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x4F); // SET_RAM_Y_ADDRESS_COUNTER
|
||||
EPD_2in13_V3_SendData(Ystart & 0xFF);
|
||||
EPD_2in13_V3_SendData((Ystart >> 8) & 0xFF);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Initialize the e-Paper register
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
void EPD_2in13_V3_Init(void)
|
||||
{
|
||||
EPD_2in13_V3_Reset();
|
||||
DEV_Delay_ms(100);
|
||||
|
||||
EPD_2in13_V3_ReadBusy();
|
||||
EPD_2in13_V3_SendCommand(0x12); //SWRESET
|
||||
EPD_2in13_V3_ReadBusy();
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x01); //Driver output control
|
||||
EPD_2in13_V3_SendData(0x27);
|
||||
EPD_2in13_V3_SendData(0x01);
|
||||
EPD_2in13_V3_SendData(0x00);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x11); //data entry mode
|
||||
EPD_2in13_V3_SendData(0x03);
|
||||
|
||||
EPD_2in13_V3_SetWindows(0, 0, EPD_2in13_V3_WIDTH-1, EPD_2in13_V3_HEIGHT-1);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x3C); //BorderWavefrom
|
||||
EPD_2in13_V3_SendData(0x05);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x21); // Display update control
|
||||
EPD_2in13_V3_SendData(0x00);
|
||||
EPD_2in13_V3_SendData(0x80);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x18); //Read built-in temperature sensor
|
||||
EPD_2in13_V3_SendData(0x80);
|
||||
|
||||
EPD_2in13_V3_SetCursor(0, 0);
|
||||
EPD_2in13_V3_ReadBusy();
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Clear screen
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
void EPD_2in13_V3_Clear(void)
|
||||
{
|
||||
UWORD i;
|
||||
EPD_2in13_V3_SendCommand(0x24); //write RAM for black(0)/white (1)
|
||||
for(i=0;i<4736;i++)
|
||||
{
|
||||
EPD_2in13_V3_SendData(0xff);
|
||||
}
|
||||
EPD_2in13_V3_TurnOnDisplay();
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Sends the image buffer in RAM to e-Paper and displays
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
void EPD_2in13_V3_Display(UBYTE *Image)
|
||||
{
|
||||
UWORD i;
|
||||
EPD_2in13_V3_SendCommand(0x24); //write RAM for black(0)/white (1)
|
||||
for(i=0;i<4736;i++)
|
||||
{
|
||||
EPD_2in13_V3_SendData(Image[i]);
|
||||
}
|
||||
EPD_2in13_V3_TurnOnDisplay();
|
||||
}
|
||||
|
||||
void EPD_2in13_V3_Display_Base(UBYTE *Image)
|
||||
{
|
||||
UWORD i;
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x24); //Write Black and White image to RAM
|
||||
for(i=0;i<4736;i++)
|
||||
{
|
||||
EPD_2in13_V3_SendData(Image[i]);
|
||||
}
|
||||
EPD_2in13_V3_SendCommand(0x26); //Write Black and White image to RAM
|
||||
for(i=0;i<4736;i++)
|
||||
{
|
||||
EPD_2in13_V3_SendData(Image[i]);
|
||||
}
|
||||
EPD_2in13_V3_TurnOnDisplay();
|
||||
}
|
||||
|
||||
void EPD_2in13_V3_Display_Partial(UBYTE *Image)
|
||||
{
|
||||
UWORD i;
|
||||
|
||||
//Reset
|
||||
DEV_Digital_Write(EPD_RST_PIN, 0);
|
||||
DEV_Delay_ms(5);
|
||||
DEV_Digital_Write(EPD_RST_PIN, 1);
|
||||
DEV_Delay_ms(10);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x3C); //BorderWavefrom
|
||||
EPD_2in13_V3_SendData(0x80);
|
||||
|
||||
EPD_2in13_V3_SetWindows(0, 0, EPD_2in13_V3_WIDTH-1, EPD_2in13_V3_HEIGHT-1);
|
||||
EPD_2in13_V3_SetCursor(0, 0);
|
||||
|
||||
EPD_2in13_V3_SendCommand(0x24); //Write Black and White image to RAM
|
||||
for(i=0;i<4736;i++)
|
||||
{
|
||||
EPD_2in13_V3_SendData(Image[i]);
|
||||
}
|
||||
EPD_2in13_V3_TurnOnDisplay_Partial();
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Enter sleep mode
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
void EPD_2in13_V3_Sleep(void)
|
||||
{
|
||||
EPD_2in13_V3_SendCommand(0x10); //enter deep sleep
|
||||
EPD_2in13_V3_SendData(0x01);
|
||||
DEV_Delay_ms(100);
|
||||
}
|
||||
47
RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_2in13_V3.h
Normal file
47
RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_2in13_V3.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*****************************************************************************
|
||||
* | File : EPD_2Iin13_V3.h
|
||||
* | Author : Waveshare team
|
||||
* | Function : 2.13inch e-paper V3
|
||||
* | Info :
|
||||
*----------------
|
||||
* | This version: V1.0
|
||||
* | Date : 2020-12-22
|
||||
* | Info :
|
||||
* -----------------------------------------------------------------------------
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
******************************************************************************/
|
||||
#ifndef __EPD_2in13_V3_H_
|
||||
#define __EPD_2in13_V3_H_
|
||||
|
||||
#include "DEV_Config.h"
|
||||
|
||||
// Display resolution
|
||||
#define EPD_2in13_V3_WIDTH 122
|
||||
#define EPD_2in13_V3_HEIGHT 250
|
||||
|
||||
void EPD_2in13_V3_Init(void);
|
||||
void EPD_2in13_V3_Clear(void);
|
||||
void EPD_2in13_V3_Display(UBYTE *Image);
|
||||
void EPD_2in13_V3_Display_Base(UBYTE *Image);
|
||||
void EPD_2in13_V3_Display_Partial(UBYTE *Image);
|
||||
void EPD_2in13_V3_Sleep(void);
|
||||
|
||||
#endif
|
||||
|
|
@ -214,7 +214,7 @@ void EPD_3IN7_4Gray_Init(void)
|
|||
|
||||
EPD_3IN7_SendCommand(0x2C); // set vcom value
|
||||
EPD_3IN7_SendData(0x44);
|
||||
|
||||
|
||||
EPD_3IN7_SendCommand(0x37); // set display option, these setting turn on previous function
|
||||
EPD_3IN7_SendData(0x00);
|
||||
EPD_3IN7_SendData(0x00);
|
||||
|
|
@ -260,7 +260,7 @@ void EPD_3IN7_1Gray_Init(void)
|
|||
EPD_3IN7_SendCommand(0x47);
|
||||
EPD_3IN7_SendData(0xF7);
|
||||
EPD_3IN7_ReadBusy_HIGH();
|
||||
|
||||
|
||||
EPD_3IN7_SendCommand(0x01); // setting gaet number
|
||||
EPD_3IN7_SendData(0xDF);
|
||||
EPD_3IN7_SendData(0x01);
|
||||
|
|
@ -548,30 +548,30 @@ notes:
|
|||
******************************************************************************/
|
||||
void EPD_3IN7_1Gray_Display_Part(const UBYTE *Image, UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend)
|
||||
{
|
||||
UWORD i, Width;
|
||||
Width = (Xend-Xstart)%8 == 0 ? (Xend-Xstart)/8 : (Xend-Xstart)/8+1;
|
||||
UWORD IMAGE_COUNTER = Width * (Yend-Ystart);
|
||||
UWORD i, Width;
|
||||
Width = (Xend-Xstart)%8 == 0 ? (Xend-Xstart)/8 : (Xend-Xstart)/8+1;
|
||||
UWORD IMAGE_COUNTER = Width * (Yend-Ystart);
|
||||
|
||||
EPD_3IN7_SendCommand(0x44);
|
||||
EPD_3IN7_SendData(Xstart & 0xff);
|
||||
EPD_3IN7_SendData((Xstart>>8) & 0x03);
|
||||
EPD_3IN7_SendData(Xend & 0xff);
|
||||
EPD_3IN7_SendData((Xend>>8) & 0x03);
|
||||
EPD_3IN7_SendCommand(0x45);
|
||||
EPD_3IN7_SendData(Ystart & 0xff);
|
||||
EPD_3IN7_SendData((Ystart>>8) & 0x03);
|
||||
EPD_3IN7_SendData(Yend & 0xff);
|
||||
EPD_3IN7_SendData((Yend>>8) & 0x03);
|
||||
EPD_3IN7_SendCommand(0x44);
|
||||
EPD_3IN7_SendData(Xstart & 0xff);
|
||||
EPD_3IN7_SendData((Xstart>>8) & 0x03);
|
||||
EPD_3IN7_SendData(Xend & 0xff);
|
||||
EPD_3IN7_SendData((Xend>>8) & 0x03);
|
||||
EPD_3IN7_SendCommand(0x45);
|
||||
EPD_3IN7_SendData(Ystart & 0xff);
|
||||
EPD_3IN7_SendData((Ystart>>8) & 0x03);
|
||||
EPD_3IN7_SendData(Yend & 0xff);
|
||||
EPD_3IN7_SendData((Yend>>8) & 0x03);
|
||||
|
||||
EPD_3IN7_SendCommand(0x24);
|
||||
for (i = 0; i < IMAGE_COUNTER; i++)
|
||||
{
|
||||
EPD_3IN7_SendData(Image[i]);
|
||||
}
|
||||
|
||||
EPD_3IN7_Load_LUT(2);
|
||||
EPD_3IN7_SendCommand(0x20);
|
||||
EPD_3IN7_ReadBusy_HIGH();
|
||||
EPD_3IN7_SendCommand(0x24);
|
||||
for (i = 0; i < IMAGE_COUNTER; i++)
|
||||
{
|
||||
EPD_3IN7_SendData(Image[i]);
|
||||
}
|
||||
|
||||
EPD_3IN7_Load_LUT(2);
|
||||
EPD_3IN7_SendCommand(0x20);
|
||||
EPD_3IN7_ReadBusy_HIGH();
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ function:
|
|||
void EPD_4IN01F_Display(const UBYTE *image)
|
||||
{
|
||||
unsigned long i, j;
|
||||
// UBYTE k = 0;
|
||||
UBYTE k = 0;
|
||||
EPD_4IN01F_SendCommand(0x61);//Set Resolution setting
|
||||
EPD_4IN01F_SendData(0x02);
|
||||
EPD_4IN01F_SendData(0x80);
|
||||
|
|
@ -205,12 +205,12 @@ void EPD_4IN01F_Display(const UBYTE *image)
|
|||
for(i=0; i<EPD_4IN01F_HEIGHT; i++) {
|
||||
for(j=0; j<EPD_4IN01F_WIDTH/2; j++) {
|
||||
EPD_4IN01F_SendData(image[j+((EPD_4IN01F_WIDTH/2)*i)]);
|
||||
// printf("0x%x, ", image[j+((EPD_4IN01F_WIDTH/2)*i)]);
|
||||
// k++;
|
||||
// if(k == 16) {
|
||||
// printf("\n");
|
||||
// k = 0;
|
||||
// }
|
||||
printf("0x%x, ", image[j+((EPD_4IN01F_WIDTH/2)*i)]);
|
||||
k++;
|
||||
if(k == 16) {
|
||||
printf("\n");
|
||||
k = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
EPD_4IN01F_SendCommand(0x04);//0x04
|
||||
|
|
|
|||
|
|
@ -150,45 +150,6 @@ void EPD_5IN65F_Clear(UBYTE color)
|
|||
DEV_Delay_ms(500);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function:
|
||||
show 7 kind of color block
|
||||
******************************************************************************/
|
||||
void EPD_5IN65F_Show7Block(void)
|
||||
{
|
||||
unsigned long i,j,k;
|
||||
unsigned char const Color_seven[8] =
|
||||
{EPD_5IN65F_BLACK,EPD_5IN65F_BLUE,EPD_5IN65F_GREEN,EPD_5IN65F_ORANGE,
|
||||
EPD_5IN65F_RED,EPD_5IN65F_YELLOW,EPD_5IN65F_WHITE,EPD_5IN65F_WHITE};
|
||||
EPD_5IN65F_SendCommand(0x61);//Set Resolution setting
|
||||
EPD_5IN65F_SendData(0x02);
|
||||
EPD_5IN65F_SendData(0x58);
|
||||
EPD_5IN65F_SendData(0x01);
|
||||
EPD_5IN65F_SendData(0xC0);
|
||||
EPD_5IN65F_SendCommand(0x10);
|
||||
for(i=0; i<224; i++) {
|
||||
for(k = 0 ; k < 4; k ++) {
|
||||
for(j = 0 ; j < 75; j ++) {
|
||||
EPD_5IN65F_SendData((Color_seven[k]<<4) |Color_seven[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(i=0; i<224; i++) {
|
||||
for(k = 4 ; k < 8; k ++) {
|
||||
for(j = 0 ; j < 75; j ++) {
|
||||
EPD_5IN65F_SendData((Color_seven[k]<<4) |Color_seven[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
EPD_5IN65F_SendCommand(0x04);//0x04
|
||||
EPD_5IN65F_BusyHigh();
|
||||
EPD_5IN65F_SendCommand(0x12);//0x12
|
||||
EPD_5IN65F_BusyHigh();
|
||||
EPD_5IN65F_SendCommand(0x02); //0x02
|
||||
EPD_5IN65F_BusyLow();
|
||||
DEV_Delay_ms(200);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function:
|
||||
refresh display
|
||||
|
|
@ -236,19 +197,19 @@ void EPD_5IN65F_Display_part(const UBYTE *image, UWORD xstart, UWORD ystart,
|
|||
EPD_5IN65F_SendCommand(0x10);
|
||||
for(i=0; i<EPD_5IN65F_HEIGHT; i++) {
|
||||
for(j=0; j< EPD_5IN65F_WIDTH/2; j++) {
|
||||
if(i<image_heigh+ystart && i>=ystart && j<(image_width+xstart)/2 && j>=xstart/2) {
|
||||
EPD_5IN65F_SendData(image[(j-xstart/2) + (image_width/2*(i-ystart))]);
|
||||
// printf("0x%x, ", image[j+((EPD_5IN65F_WIDTH/2)*i)]);
|
||||
// k++;
|
||||
// if(k == 16) {
|
||||
// printf("\r\n");
|
||||
// k = 0;
|
||||
// }
|
||||
}
|
||||
else {
|
||||
EPD_5IN65F_SendData(0x11);
|
||||
}
|
||||
}
|
||||
if(i<image_heigh+ystart && i>=ystart && j<(image_width+xstart)/2 && j>=xstart/2) {
|
||||
EPD_5IN65F_SendData(image[(j-xstart/2) + (image_width/2*(i-ystart))]);
|
||||
// printf("0x%x, ", image[j+((EPD_5IN65F_WIDTH/2)*i)]);
|
||||
// k++;
|
||||
// if(k == 16) {
|
||||
// printf("\r\n");
|
||||
// k = 0;
|
||||
// }
|
||||
}
|
||||
else {
|
||||
EPD_5IN65F_SendData(0x11);
|
||||
}
|
||||
}
|
||||
}
|
||||
EPD_5IN65F_SendCommand(0x04);//0x04
|
||||
EPD_5IN65F_BusyHigh();
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ Color Index
|
|||
void EPD_5IN65F_Clear(UBYTE color);
|
||||
void EPD_5IN65F_Sleep(void);
|
||||
void EPD_Init(void);
|
||||
void EPD_5IN65F_Show7Block(void);
|
||||
void EPD_5IN65F_Display(const UBYTE *image);
|
||||
void EPD_5IN65F_Init(void);
|
||||
void EPD_5IN65F_Display_part(const UBYTE *image, UWORD xstart, UWORD ystart,
|
||||
|
|
|
|||
|
|
@ -80,11 +80,10 @@ static void EPD_5in83_V2_ReadBusy(void)
|
|||
Debug("e-Paper busy\r\n");
|
||||
do {
|
||||
EPD_5in83_V2_SendCommand(0x71);
|
||||
DEV_Delay_ms(50);
|
||||
DEV_Delay_ms(10);
|
||||
}
|
||||
while(!DEV_Digital_Read(EPD_BUSY_PIN));
|
||||
Debug("e-Paper busy release\r\n");
|
||||
DEV_Delay_ms(50);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
|||
|
|
@ -126,12 +126,6 @@ UBYTE EPD_7IN5_V2_Init(void)
|
|||
EPD_SendData(0x01); //gate 480
|
||||
EPD_SendData(0xE0);
|
||||
|
||||
// EPD_SendCommand(0x06);
|
||||
// EPD_SendData(0xff);
|
||||
// EPD_SendData(0xff);
|
||||
// EPD_SendData(0xff);
|
||||
// EPD_SendData(0xff);
|
||||
|
||||
EPD_SendCommand(0X15);
|
||||
EPD_SendData(0x00);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue