Paperd.Ink Library 0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
GxEPD2_565c.h
Go to the documentation of this file.
1// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
2// Requires HW SPI and Adafruit_GFX. Caution: the e-paper panels require 3.3V supply AND data lines!
3//
4// based on Demo Example from Good Display: http://www.e-paper-display.com/download_detail/downloadsId=808.html
5// Panel: 5.65inch ACeP 7-Color E-Paper : https://www.waveshare.com/product/displays/e-paper/5.65inch-e-paper-module-f.htm
6// Controller: unknonw
7//
8// Author: Jean-Marc Zingg
9//
10// Version: see library.properties
11//
12// Library: https://github.com/ZinggJM/GxEPD2
13
14#ifndef _GxEPD2_565c_H_
15#define _GxEPD2_565c_H_
16
17#include "../GxEPD2_EPD.h"
18
19class GxEPD2_565c : public GxEPD2_EPD
20{
21 public:
22 // attributes
23 static const uint16_t WIDTH = 600;
24 static const uint16_t WIDTH_VISIBLE = WIDTH;
25 static const uint16_t HEIGHT = 448;
27 static const bool hasColor = true;
28 static const bool hasPartialUpdate = false;
29 static const bool hasFastPartialUpdate = false;
30 static const uint16_t power_on_time = 100; // ms, e.g. 96001us
31 static const uint16_t power_off_time = 100; // ms, e.g. 60001us
32 static const uint16_t full_refresh_time = 12000; // ms, e.g. 11354001us
33 static const uint16_t partial_refresh_time = 12000; // ms, e.g. 11354001us
34 // constructor
35 GxEPD2_565c(int16_t cs, int16_t dc, int16_t rst, int16_t busy);
36 // methods (virtual)
37 // Support for Bitmaps (Sprites) to Controller Buffer and to Screen
38 void clearScreen(uint8_t value = 0xFF); // init controller memory and screen (default white)
39 void clearScreen(uint8_t black_value, uint8_t color_value); // init controller memory and screen
40 void writeScreenBuffer(uint8_t value = 0xFF); // init controller memory (default white)
41 void writeScreenBuffer(uint8_t black_value, uint8_t color_value); // init controller memory
42 // write to controller memory, without screen refresh; x and w should be multiple of 8
43 void writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
44 void writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
45 int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
46 void writeImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
47 void writeImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
48 int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
49 // write sprite of native data to controller memory, without screen refresh; x and w should be multiple of 8
50 void writeNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
51 void writeNativePart(const uint8_t* data1, const uint8_t* data2, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
52 int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
53 // write to controller memory, with screen refresh; x and w should be multiple of 8
54 void drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
55 void drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
56 int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
57 void drawImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
58 void drawImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
59 int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
60 // write sprite of native data to controller memory, with screen refresh; x and w should be multiple of 8
61 void drawNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
62 void refresh(bool partial_update_mode = false); // screen refresh from controller memory to full screen
63 void refresh(int16_t x, int16_t y, int16_t w, int16_t h); // screen refresh from controller memory, partial screen
64 void powerOff(); // turns off generation of panel driving voltages, avoids screen fading over time
65 void hibernate(); // turns powerOff() and sets controller to deep sleep for minimum power use, ONLY if wakeable by RST (rst >= 0)
66 void setPaged(); // for GxEPD2_154c and GxEPD2_565c paged workaround
67 private:
68 void _PowerOn();
69 void _PowerOff();
70 void _InitDisplay();
71 void _Init_Full();
72 void _Init_Part();
73 void _Update_Full();
74 void _Update_Part();
75 private:
76 bool _paged;
77};
78
79#endif
void writeScreenBuffer(uint8_t value=0xFF)
static const bool hasFastPartialUpdate
Definition GxEPD2_565c.h:29
static const bool hasColor
Definition GxEPD2_565c.h:27
void writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
static const uint16_t partial_refresh_time
Definition GxEPD2_565c.h:33
static const uint16_t power_on_time
Definition GxEPD2_565c.h:30
void drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
static const uint16_t HEIGHT
Definition GxEPD2_565c.h:25
static const uint16_t WIDTH_VISIBLE
Definition GxEPD2_565c.h:24
void writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
void writeNativePart(const uint8_t *data1, const uint8_t *data2, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
void refresh(bool partial_update_mode=false)
void writeNative(const uint8_t *data1, const uint8_t *data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
GxEPD2_565c(int16_t cs, int16_t dc, int16_t rst, int16_t busy)
void drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
static const GxEPD2::Panel panel
Definition GxEPD2_565c.h:26
static const uint16_t full_refresh_time
Definition GxEPD2_565c.h:32
void clearScreen(uint8_t value=0xFF)
void drawNative(const uint8_t *data1, const uint8_t *data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
static const uint16_t power_off_time
Definition GxEPD2_565c.h:31
static const bool hasPartialUpdate
Definition GxEPD2_565c.h:28
static const uint16_t WIDTH
Definition GxEPD2_565c.h:23
Panel
Definition GxEPD2.h:37
@ ACeP565
Definition GxEPD2.h:94