|
| 1 | +#ifndef _THINKINK_213_TRICOLOR_RH_H |
| 2 | +#define _THINKINK_213_TRICOLOR_RH_H |
| 3 | + |
| 4 | +#include "Adafruit_EPD.h" |
| 5 | + |
| 6 | +class ThinkInk_213_Tricolor_RH : public Adafruit_SSD1680 { |
| 7 | +private: |
| 8 | +public: |
| 9 | + ThinkInk_213_Tricolor_RH(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST, |
| 10 | + int8_t CS, int8_t SRCS, int8_t MISO, int8_t BUSY = -1) |
| 11 | + : Adafruit_SSD1680(250, 122, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){}; |
| 12 | + |
| 13 | + ThinkInk_213_Tricolor_RH(int8_t DC, int8_t RST, int8_t CS, int8_t SRCS, |
| 14 | + int8_t BUSY = -1, SPIClass *spi = &SPI) |
| 15 | + : Adafruit_SSD1680(250, 122, DC, RST, CS, SRCS, BUSY, spi){}; |
| 16 | + |
| 17 | + void begin(thinkinkmode_t mode = THINKINK_MONO) { |
| 18 | + Adafruit_EPD::begin(true); |
| 19 | + setBlackBuffer(0, true); |
| 20 | + setColorBuffer(1, false); |
| 21 | + |
| 22 | + layer_colors[EPD_WHITE] = 0b00; |
| 23 | + layer_colors[EPD_BLACK] = 0b01; |
| 24 | + layer_colors[EPD_RED] = 0b10; |
| 25 | + layer_colors[EPD_GRAY] = 0b10; |
| 26 | + layer_colors[EPD_LIGHT] = 0b00; |
| 27 | + layer_colors[EPD_DARK] = 0b01; |
| 28 | + |
| 29 | + default_refresh_delay = 13000; |
| 30 | + setRotation(0); |
| 31 | + powerDown(); |
| 32 | + }; |
| 33 | +}; |
| 34 | + |
| 35 | +#endif // _THINKINK_213_TRI |
0 commit comments