caemor / epd-waveshare

Drivers for various EPDs from Waveshare
ISC License
207 stars 128 forks source link

How can I retrieve the old (currently displayed) screen data? #172

Closed wsndshx closed 9 months ago

wsndshx commented 9 months ago

I have referred to the example code provided by Good Display, which uses the old display data when implementing partial refresh.

      for(i=0;i<PART_COLUMN*PART_LINE/8;i++)       
        EPD_W21_WriteDATA(oldDataA[i]);              

    EPD_W21_WriteCMD(0x13);     //writes New data to SRAM.  

    for(i=0;i<PART_COLUMN*PART_LINE/8;i++)  
    {     
      EPD_W21_WriteDATA(pgm_read_byte(&datas_A[i]));  
      oldDataA[i]=pgm_read_byte(&datas_A[i]);
    }         

    EPD_Update();

I am not sure how to implement this in epd-waveshare. Should we add the input parameter for the old data to the update_partial_frame function?