add 4.01f demo
This commit is contained in:
parent
c65eec8e5e
commit
7b958776c8
52 changed files with 11250 additions and 1902 deletions
|
|
@ -128,46 +128,6 @@ void Epd::Reset(void) {
|
|||
DelayMs(200);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : show 7 kind of color block
|
||||
parameter:
|
||||
******************************************************************************/
|
||||
void Epd::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};
|
||||
SendCommand(0x61);//Set Resolution setting
|
||||
SendData(0x02);
|
||||
SendData(0x58);
|
||||
SendData(0x01);
|
||||
SendData(0xC0);
|
||||
SendCommand(0x10);
|
||||
|
||||
for(i=0; i<224; i++) {
|
||||
for(k = 0 ; k < 4; k ++) {
|
||||
for(j = 0 ; j < 75; j ++) {
|
||||
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 ++) {
|
||||
SendData((Color_seven[k]<<4) |Color_seven[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
SendCommand(0x04);//0x04
|
||||
EPD_5IN65F_BusyHigh();
|
||||
SendCommand(0x12);//0x12
|
||||
EPD_5IN65F_BusyHigh();
|
||||
SendCommand(0x02); //0x02
|
||||
EPD_5IN65F_BusyLow();
|
||||
DelayMs(200);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Sends the image buffer in RAM to e-Paper and displays
|
||||
parameter:
|
||||
|
|
@ -181,8 +141,9 @@ void Epd::EPD_5IN65F_Display(const UBYTE *image) {
|
|||
SendData(0xC0);
|
||||
SendCommand(0x10);
|
||||
for(i=0; i<height; i++) {
|
||||
for(j=0; j<width/2; j++)
|
||||
for(j=0; j<width/2; j++) {
|
||||
SendData(image[j+((width/2)*i)]);
|
||||
}
|
||||
}
|
||||
SendCommand(0x04);//0x04
|
||||
EPD_5IN65F_BusyHigh();
|
||||
|
|
@ -208,13 +169,14 @@ void Epd::EPD_5IN65F_Display_part(const UBYTE *image, UWORD xstart, UWORD ystart
|
|||
SendData(0xC0);
|
||||
SendCommand(0x10);
|
||||
for(i=0; i<height; i++) {
|
||||
for(j=0; j< width/2; j++)
|
||||
for(j=0; j< width/2; j++) {
|
||||
if(i<image_heigh+ystart && i>=ystart && j<(image_width+xstart)/2 && j>=xstart/2) {
|
||||
SendData(pgm_read_byte(&image[(j-xstart/2) + (image_width/2*(i-ystart))]));
|
||||
}
|
||||
else {
|
||||
SendData(0x11);
|
||||
}
|
||||
else {
|
||||
SendData(0x11);
|
||||
}
|
||||
}
|
||||
}
|
||||
SendCommand(0x04);//0x04
|
||||
EPD_5IN65F_BusyHigh();
|
||||
|
|
@ -237,9 +199,10 @@ void Epd::Clear(UBYTE color) {
|
|||
SendData(0xC0);
|
||||
SendCommand(0x10);
|
||||
for(int i=0; i<width/2; i++) {
|
||||
for(int j=0; j<height; j++)
|
||||
for(int j=0; j<height; j++) {
|
||||
SendData((color<<4)|color);
|
||||
}
|
||||
}
|
||||
}
|
||||
SendCommand(0x04);//0x04
|
||||
EPD_5IN65F_BusyHigh();
|
||||
SendCommand(0x12);//0x12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue