8 namespace waveshare_epaper {
11 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
12 spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_2MHZ> {
21 void data(uint8_t value);
113 switch (this->model_) {
136 void set_full_update_every(uint32_t full_update_every);
139 void write_lut_(
const uint8_t *lut, uint8_t size);
141 void init_display_();
149 uint32_t full_update_every_{30};
150 uint32_t at_update_{0};
154 bool deep_sleep_between_updates_{
false};
279 static const uint8_t CMD_DTM1_DATA_START_TRANS = 0x10;
280 static const uint8_t CMD_DTM2_DATA_START_TRANS2 = 0x13;
281 static const uint8_t CMD_DISPLAY_REFRESH = 0x12;
282 static const uint8_t CMD_AUTO_SEQ = 0x17;
283 static const uint8_t DATA_AUTO_PON_DSR_POF_DSLP = 0xA7;
284 static const uint8_t CMD_PSR_PANEL_SETTING = 0x00;
285 static const uint8_t CMD_UNDOCUMENTED_0x4D = 0x4D;
286 static const uint8_t CMD_UNDOCUMENTED_0xAA = 0xaa;
287 static const uint8_t CMD_UNDOCUMENTED_0xE9 = 0xe9;
288 static const uint8_t CMD_UNDOCUMENTED_0xB6 = 0xb6;
289 static const uint8_t CMD_UNDOCUMENTED_0xF3 = 0xf3;
290 static const uint8_t CMD_TRES_RESOLUTION_SETTING = 0x61;
291 static const uint8_t CMD_TCON_TCONSETTING = 0x60;
292 static const uint8_t CMD_CDI_VCOM_DATA_INTERVAL = 0x50;
293 static const uint8_t CMD_POF_POWER_OFF = 0x02;
294 static const uint8_t CMD_DSLP_DEEP_SLEEP = 0x07;
295 static const uint8_t DATA_DSLP_DEEP_SLEEP = 0xA5;
296 static const uint8_t CMD_PWS_POWER_SAVING = 0xe3;
297 static const uint8_t CMD_PON_POWER_ON = 0x04;
298 static const uint8_t CMD_PTL_PARTIAL_WINDOW = 0x90;
300 uint8_t *lastbuff_ =
nullptr;
303 void write_init_list_(
const uint8_t *list);
359 void set_full_update_every(uint32_t full_update_every);
362 void write_lut_(
const uint8_t *lut, uint8_t size);
370 uint32_t full_update_every_{30};
371 uint32_t at_update_{0};
391 void set_full_update_every(uint32_t full_update_every);
394 uint32_t full_update_every_{30};
395 uint32_t at_update_{0};
619 void init_display_();
726 void set_full_update_every(uint32_t full_update_every);
735 uint32_t full_update_every_{30};
736 uint32_t at_update_{0};
752 void set_full_update_every(uint32_t full_update_every);
754 void setup()
override;
762 void write_buffer_(uint8_t
cmd,
int top,
int bottom);
763 void set_window_(
int t,
int b);
765 void partial_update_();
768 uint32_t full_update_every_{30};
769 uint32_t at_update_{0};
770 bool is_busy_{
false};
771 void write_lut_(
const uint8_t *lut);
virtual void digital_write(bool value)=0
void set_reset_duration(uint32_t reset_duration)
void on_safe_shutdown() override
void deep_sleep() override
virtual void draw_absolute_pixel_internal(int x, int y, Color color)=0
void deep_sleep() override
void deep_sleep() override
float get_setup_priority() const override
virtual void initialize()=0
void deep_sleep() override
void deep_sleep() override
void deep_sleep() override
void deep_sleep() override
void deep_sleep() override
void set_reset_pin(GPIOPin *reset)
display::DisplayType get_display_type() override
void deep_sleep() override
virtual void fill(Color color)
Fill the entire screen with the given color.
virtual void dump_config()
virtual int get_width_controller()
void deep_sleep() override
WaveshareEPaperTypeBModel
void init_internal_(uint32_t buffer_length)
void deep_sleep() override
The SPIDevice is what components using the SPI will create.
virtual int get_height_internal()=0
WaveshareEPaperTypeAModel model_
void set_dc_pin(GPIOPin *dc_pin)
void deep_sleep() override
virtual uint32_t get_buffer_length_()=0
WaveshareEPaperTypeAModel
virtual int get_width_internal()=0
void deep_sleep() override
void deep_sleep() override
void deep_sleep() override
virtual void deep_sleep()=0
void deep_sleep() override
virtual uint32_t idle_timeout_()
display::DisplayType get_display_type() override
Implementation of SPI Controller mode.
void command(uint8_t value)
void deep_sleep() override
void deep_sleep() override
void deep_sleep() override
void deep_sleep() override
void deep_sleep() override
void set_busy_pin(GPIOPin *busy)
void deep_sleep() override
void cmd_data(const uint8_t *data, size_t length)
void IRAM_ATTR HOT delay(uint32_t ms)