Adafruit-GFX-Library icon indicating copy to clipboard operation
Adafruit-GFX-Library copied to clipboard

add virtual functions for porting to various hardware platforms.

Open yhfudev opened this issue 5 years ago • 0 comments

This patch is to add several APIs to uniform the control logic of some device driver subclasses, and help to easy port the application to various hardware platforms.

  • begin()/end() some device driver use it to allocate resources. such as SSD1306.
  • display() some driver need this function to sync the internal memory with the real LCD device.
  • clear() provides a fast way to clean the screen

Some device subclass need to be adjusted according to the APIs. For example, an begin() function needed adding to the device driver SSD1306 to porting the app code to other platform, such as ILI9341.

This patch was tested with SSD1306 and ILI9341.

yhfudev avatar May 04 '20 16:05 yhfudev