Search
Search

The Lasted E-Paper Display

The process of porting E Ink program

  • Categories:Blog
  • Author:
  • Origin:
  • Time of issue:2024-02-08 12:05
  • Views:

(Summary description)

The process of porting E Ink program

(Summary description)

  • Categories:Blog
  • Author:
  • Origin:
  • Time of issue:2024-02-08 12:05
  • Views:
Information

1. Overview
The so-called program porting refers to the transfer of an application from one platform to another, ensuring its smooth operation on the new platform. Program porting typically involves a series of steps and considerations, including:

 

1) Assessing source code and target environment:
Understand the structure and functionality of the source code, and identify the characteristics, limitations, and requirements of the target environment. Identify parts of the source code related to specific platforms or operating systems.

 

2) Modifying and adjusting code:
Modify parts of the source code related to specific platforms based on the requirements of the target environment.

 

3) Fixing potentially incompatible code segments:
Adjust the code to fit the target operating system's API or libraries.

 

4) Recompiling and testing:
Use appropriate compilers or development tools to compile the modified code into a program executable on the target system. Test the program on the target system to ensure stable, correct operation without functional issues.

 

5) Troubleshooting and optimizing performance:
Address issues and errors discovered during the porting process. Optimize the program to enhance performance and efficiency in the target environment.

 

2. Operating Steps
The process of porting a program involves the following steps:


1) Observe which files the program to be ported is calling and place these files into the porting project.
In the e-paper program, users may utilize five program files, listed below:

The "Ap_29demo.h" file is used to store the image data that needs to be refreshed, i.e., all the images we have modeled are placed here.

The "Display_EPD_W21_spi.c" file includes functions for configuring ePaper IO and SPI read/write operations.

The corresponding declarations for these functions are found in the "Display_EPD_W21_spi.h" file.

The "Display_EPD_W21.c" file comprises all the functions for operating the ePaper.

Declarations for these functions are included in the "Display_EPD_W21.h" file.

Note: In the two SPI files mentioned above, the GPIO section needs to be modified by the user based on the actual configuration of their platform.

 

2)    Add these files to Keil

 

3) In the main function, include the relevant header files for ePaper:
In general, the necessary header files are included using the #include directive.
//EPD
#include "Display_EPD_W21_spi.h"
#include "Display_EPD_W21.h"
#include "Ap_29demo.h"    

 

4) In the main function, incorporate a subroutine for the E Ink refresh operation.
Users can customize this part of the code based on their specific requirements. The function EPD_WhiteScreen_White() serves as the clear screen function, while EPD_WhiteScreen_ALL(gImage_1) functions as the image refresh function. The image to be updated is typically stored in the "Ap_29demo.h" header file.

EPD_DeepSleep() function is responsible for putting the e-paper display into deep sleep mode. After executing the e-paper refresh function, it is common practice to put the e-paper display into deep sleep mode to prolong its lifespan. Additionally, waking up the e-paper display from deep sleep requires reinitialization steps.

Scan the QR code to read on your phone

logo

Time of issue:2020-04-27 00:00:00

Contact

Time of issue:2020-04-27 00:00:00
Powerby:300.cn DaLian

copyright

Time of issue:2020-04-27 00:00:00

©2007-2025    DALIAN GOOD DISPLAY CO., LTD.         All Rights Reserved.      ICP08000578-1