Paperd.Ink Library 0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
GxEPD2_213_T5D Class Reference

#include <GxEPD2_213_T5D.h>

Inheritance diagram for GxEPD2_213_T5D:
GxEPD2_EPD

Public Member Functions

 GxEPD2_213_T5D (int16_t cs, int16_t dc, int16_t rst, int16_t busy)
 
void clearScreen (uint8_t value=0xFF)
 
void writeScreenBuffer (uint8_t value=0xFF)
 
void writeScreenBufferAgain (uint8_t value=0xFF)
 
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)
 
void writeImageForFullRefresh (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)
 
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 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)
 
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, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
 
void writeImageAgain (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)
 
void writeImagePartAgain (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 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)
 
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)
 
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)
 
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)
 
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, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
 
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)
 
void refresh (bool partial_update_mode=false)
 
void refresh (int16_t x, int16_t y, int16_t w, int16_t h)
 
void powerOff ()
 
void hibernate ()
 
- Public Member Functions inherited from GxEPD2_EPD
 GxEPD2_EPD (int16_t cs, int16_t dc, int16_t rst, int16_t busy, int16_t busy_level, uint32_t busy_timeout, uint16_t w, uint16_t h, GxEPD2::Panel p, bool c, bool pu, bool fpu)
 
virtual void init (uint32_t serial_diag_bitrate=0)
 
virtual void init (uint32_t serial_diag_bitrate, bool initial, uint16_t reset_duration=10, bool pulldown_rst_mode=false)
 
virtual void setPaged ()
 
void setBusyCallback (void(*busyCallback)(const void *), const void *busy_callback_parameter=0)
 
void selectSPI (SPIClass &spi, SPISettings spi_settings)
 

Static Public Attributes

static const uint16_t WIDTH = 104
 
static const uint16_t HEIGHT = 212
 
static const GxEPD2::Panel panel = GxEPD2::GDEW0213T5D
 
static const bool hasColor = false
 
static const bool hasPartialUpdate = true
 
static const bool hasFastPartialUpdate = true
 
static const uint16_t power_on_time = 100
 
static const uint16_t power_off_time = 50
 
static const uint16_t full_refresh_time = 4700
 
static const uint16_t partial_refresh_time = 750
 

Additional Inherited Members

- Static Public Member Functions inherited from GxEPD2_EPD
static uint16_t gx_uint16_min (uint16_t a, uint16_t b)
 
static uint16_t gx_uint16_max (uint16_t a, uint16_t b)
 
- Public Attributes inherited from GxEPD2_EPD
const uint16_t WIDTH
 
const uint16_t HEIGHT
 
const GxEPD2::Panel panel
 
const bool hasColor
 
const bool hasPartialUpdate
 
const bool hasFastPartialUpdate
 
- Protected Member Functions inherited from GxEPD2_EPD
void _reset ()
 
void _waitWhileBusy (const char *comment=0, uint16_t busy_time=5000)
 
void _writeCommand (uint8_t c)
 
void _writeData (uint8_t d)
 
void _writeData (const uint8_t *data, uint16_t n)
 
void _writeDataPGM (const uint8_t *data, uint16_t n, int16_t fill_with_zeroes=0)
 
void _writeDataPGM_sCS (const uint8_t *data, uint16_t n, int16_t fill_with_zeroes=0)
 
void _writeCommandData (const uint8_t *pCommandData, uint8_t datalen)
 
void _writeCommandDataPGM (const uint8_t *pCommandData, uint8_t datalen)
 
void _startTransfer ()
 
void _transfer (uint8_t value)
 
void _endTransfer ()
 
- Protected Attributes inherited from GxEPD2_EPD
int16_t _cs
 
int16_t _dc
 
int16_t _rst
 
int16_t _busy
 
int16_t _busy_level
 
uint32_t _busy_timeout
 
bool _diag_enabled
 
bool _pulldown_rst_mode
 
SPIClass * _pSPIx
 
SPISettings _spi_settings
 
bool _initial_write
 
bool _initial_refresh
 
bool _power_is_on
 
bool _using_partial_mode
 
bool _hibernating
 
uint16_t _reset_duration
 
void(* _busy_callback )(const void *)
 
const void * _busy_callback_parameter
 

Detailed Description

Definition at line 18 of file GxEPD2_213_T5D.h.

Constructor & Destructor Documentation

◆ GxEPD2_213_T5D()

GxEPD2_213_T5D::GxEPD2_213_T5D ( int16_t cs,
int16_t dc,
int16_t rst,
int16_t busy )

Definition at line 15 of file GxEPD2_213_T5D.cpp.

15 :
16 GxEPD2_EPD(cs, dc, rst, busy, LOW, 10000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate)
17{
18}
static const uint16_t HEIGHT
static const bool hasFastPartialUpdate
static const bool hasColor
static const bool hasPartialUpdate
static const GxEPD2::Panel panel
static const uint16_t WIDTH
GxEPD2_EPD(int16_t cs, int16_t dc, int16_t rst, int16_t busy, int16_t busy_level, uint32_t busy_timeout, uint16_t w, uint16_t h, GxEPD2::Panel p, bool c, bool pu, bool fpu)

Member Function Documentation

◆ clearScreen()

void GxEPD2_213_T5D::clearScreen ( uint8_t value = 0xFF)
virtual

Implements GxEPD2_EPD.

Definition at line 20 of file GxEPD2_213_T5D.cpp.

21{
22 writeScreenBuffer(value);
23 refresh(true);
25}
void writeScreenBufferAgain(uint8_t value=0xFF)
void writeScreenBuffer(uint8_t value=0xFF)
void refresh(bool partial_update_mode=false)

◆ drawImage() [1/2]

void GxEPD2_213_T5D::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 )

Definition at line 219 of file GxEPD2_213_T5D.cpp.

220{
221 if (black)
222 {
223 drawImage(black, x, y, w, h, invert, mirror_y, pgm);
224 }
225}
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)

◆ drawImage() [2/2]

void GxEPD2_213_T5D::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 )

Definition at line 204 of file GxEPD2_213_T5D.cpp.

205{
206 writeImage(bitmap, x, y, w, h, invert, mirror_y, pgm);
207 refresh(x, y, w, h);
208 writeImageAgain(bitmap, x, y, w, h, invert, mirror_y, pgm);
209}
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)
void writeImageAgain(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)

◆ drawImagePart() [1/2]

void GxEPD2_213_T5D::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,
int16_t x,
int16_t y,
int16_t w,
int16_t h,
bool invert = false,
bool mirror_y = false,
bool pgm = false )

Definition at line 227 of file GxEPD2_213_T5D.cpp.

229{
230 if (black)
231 {
232 drawImagePart(black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
233 }
234}
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)

◆ drawImagePart() [2/2]

void GxEPD2_213_T5D::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 )

Definition at line 211 of file GxEPD2_213_T5D.cpp.

213{
214 writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
215 refresh(x, y, w, h);
216 writeImagePartAgain(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
217}
void writeImagePartAgain(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 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)

◆ drawNative()

void GxEPD2_213_T5D::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 )

Definition at line 236 of file GxEPD2_213_T5D.cpp.

237{
238 if (data1)
239 {
240 drawImage(data1, x, y, w, h, invert, mirror_y, pgm);
241 }
242}

◆ hibernate()

void GxEPD2_213_T5D::hibernate ( )
virtual

Implements GxEPD2_EPD.

Definition at line 282 of file GxEPD2_213_T5D.cpp.

283{
284 _PowerOff();
285 if (_rst >= 0)
286 {
287 _writeCommand(0x07); // deep sleep
288 _writeData(0xA5); // check code
289 _hibernating = true;
290 }
291}
void _writeCommand(uint8_t c)
void _writeData(uint8_t d)
int16_t _rst
Definition GxEPD2_EPD.h:112
bool _hibernating
Definition GxEPD2_EPD.h:118

◆ powerOff()

void GxEPD2_213_T5D::powerOff ( void )
virtual

Implements GxEPD2_EPD.

Definition at line 277 of file GxEPD2_213_T5D.cpp.

278{
279 _PowerOff();
280}

◆ refresh() [1/2]

void GxEPD2_213_T5D::refresh ( bool partial_update_mode = false)
virtual

Implements GxEPD2_EPD.

Definition at line 244 of file GxEPD2_213_T5D.cpp.

245{
246 if (partial_update_mode) refresh(0, 0, WIDTH, HEIGHT);
247 else
248 {
249 if (_using_partial_mode) _Init_Full();
250 _Update_Full();
251 _initial_refresh = false; // initial full update done
252 }
253}
bool _using_partial_mode
Definition GxEPD2_EPD.h:118
bool _initial_refresh
Definition GxEPD2_EPD.h:117

◆ refresh() [2/2]

void GxEPD2_213_T5D::refresh ( int16_t x,
int16_t y,
int16_t w,
int16_t h )
virtual

Implements GxEPD2_EPD.

Definition at line 255 of file GxEPD2_213_T5D.cpp.

256{
257 if (_initial_refresh) return refresh(false); // initial update needs be full update
258 // intersection with screen
259 int16_t w1 = x < 0 ? w + x : w; // reduce
260 int16_t h1 = y < 0 ? h + y : h; // reduce
261 int16_t x1 = x < 0 ? 0 : x; // limit
262 int16_t y1 = y < 0 ? 0 : y; // limit
263 w1 = x1 + w1 < int16_t(WIDTH) ? w1 : int16_t(WIDTH) - x1; // limit
264 h1 = y1 + h1 < int16_t(HEIGHT) ? h1 : int16_t(HEIGHT) - y1; // limit
265 if ((w1 <= 0) || (h1 <= 0)) return;
266 // make x1, w1 multiple of 8
267 w1 += x1 % 8;
268 if (w1 % 8 > 0) w1 += 8 - w1 % 8;
269 x1 -= x1 % 8;
270 if (!_using_partial_mode) _Init_Part();
271 _writeCommand(0x91); // partial in
272 _setPartialRamArea(x1, y1, w1, h1);
273 _Update_Part();
274 _writeCommand(0x92); // partial out
275}

◆ writeImage() [1/2]

void GxEPD2_213_T5D::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 )

Definition at line 179 of file GxEPD2_213_T5D.cpp.

180{
181 if (black)
182 {
183 writeImage(black, x, y, w, h, invert, mirror_y, pgm);
184 }
185}

◆ writeImage() [2/2]

void GxEPD2_213_T5D::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 )
virtual

Implements GxEPD2_EPD.

Definition at line 50 of file GxEPD2_213_T5D.cpp.

51{
52 _writeImage(0x13, bitmap, x, y, w, h, invert, mirror_y, pgm);
53}

◆ writeImageAgain()

void GxEPD2_213_T5D::writeImageAgain ( 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 )
virtual

Reimplemented from GxEPD2_EPD.

Definition at line 61 of file GxEPD2_213_T5D.cpp.

62{
63 _writeImage(0x13, bitmap, x, y, w, h, invert, mirror_y, pgm);
64}

◆ writeImageForFullRefresh()

void GxEPD2_213_T5D::writeImageForFullRefresh ( 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 )
virtual

Reimplemented from GxEPD2_EPD.

Definition at line 55 of file GxEPD2_213_T5D.cpp.

56{
57 _writeImage(0x10, bitmap, x, y, w, h, invert, mirror_y, pgm);
58 _writeImage(0x13, bitmap, x, y, w, h, invert, mirror_y, pgm);
59}

◆ writeImagePart() [1/2]

void GxEPD2_213_T5D::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,
int16_t x,
int16_t y,
int16_t w,
int16_t h,
bool invert = false,
bool mirror_y = false,
bool pgm = false )

Definition at line 187 of file GxEPD2_213_T5D.cpp.

189{
190 if (black)
191 {
192 writeImagePart(black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
193 }
194}

◆ writeImagePart() [2/2]

void GxEPD2_213_T5D::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 )
virtual

Implements GxEPD2_EPD.

Definition at line 113 of file GxEPD2_213_T5D.cpp.

115{
116 _writeImagePart(0x13, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
117}

◆ writeImagePartAgain()

void GxEPD2_213_T5D::writeImagePartAgain ( 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 )
virtual

Reimplemented from GxEPD2_EPD.

Definition at line 119 of file GxEPD2_213_T5D.cpp.

121{
122 _writeImagePart(0x13, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
123}

◆ writeNative()

void GxEPD2_213_T5D::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 )

Definition at line 196 of file GxEPD2_213_T5D.cpp.

197{
198 if (data1)
199 {
200 writeImage(data1, x, y, w, h, invert, mirror_y, pgm);
201 }
202}

◆ writeScreenBuffer()

void GxEPD2_213_T5D::writeScreenBuffer ( uint8_t value = 0xFF)
virtual

Implements GxEPD2_EPD.

Definition at line 27 of file GxEPD2_213_T5D.cpp.

28{
29 if (!_using_partial_mode) _Init_Part();
30 if (_initial_write) _writeScreenBuffer(0x10, value); // set previous
31 _writeScreenBuffer(0x13, value); // set current
32 _initial_write = false; // initial full screen buffer clean done
33}
bool _initial_write
Definition GxEPD2_EPD.h:117

◆ writeScreenBufferAgain()

void GxEPD2_213_T5D::writeScreenBufferAgain ( uint8_t value = 0xFF)
virtual

Reimplemented from GxEPD2_EPD.

Definition at line 35 of file GxEPD2_213_T5D.cpp.

36{
37 if (!_using_partial_mode) _Init_Part();
38 _writeScreenBuffer(0x13, value); // set current
39}

Member Data Documentation

◆ full_refresh_time

const uint16_t GxEPD2_213_T5D::full_refresh_time = 4700
static

Definition at line 30 of file GxEPD2_213_T5D.h.

◆ hasColor

const bool GxEPD2_213_T5D::hasColor = false
static

Definition at line 25 of file GxEPD2_213_T5D.h.

◆ hasFastPartialUpdate

const bool GxEPD2_213_T5D::hasFastPartialUpdate = true
static

Definition at line 27 of file GxEPD2_213_T5D.h.

◆ hasPartialUpdate

const bool GxEPD2_213_T5D::hasPartialUpdate = true
static

Definition at line 26 of file GxEPD2_213_T5D.h.

◆ HEIGHT

const uint16_t GxEPD2_213_T5D::HEIGHT = 212
static

Definition at line 23 of file GxEPD2_213_T5D.h.

◆ panel

const GxEPD2::Panel GxEPD2_213_T5D::panel = GxEPD2::GDEW0213T5D
static

Definition at line 24 of file GxEPD2_213_T5D.h.

◆ partial_refresh_time

const uint16_t GxEPD2_213_T5D::partial_refresh_time = 750
static

Definition at line 31 of file GxEPD2_213_T5D.h.

◆ power_off_time

const uint16_t GxEPD2_213_T5D::power_off_time = 50
static

Definition at line 29 of file GxEPD2_213_T5D.h.

◆ power_on_time

const uint16_t GxEPD2_213_T5D::power_on_time = 100
static

Definition at line 28 of file GxEPD2_213_T5D.h.

◆ WIDTH

const uint16_t GxEPD2_213_T5D::WIDTH = 104
static

Definition at line 22 of file GxEPD2_213_T5D.h.


The documentation for this class was generated from the following files: