Skip to content

Commit

Permalink
Update waveshare_epaper.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixswiss authored Mar 16, 2024
1 parent e753ac3 commit 2d9640a
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions esphome/components/waveshare_epaper/waveshare_epaper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2081,8 +2081,6 @@ void WaveshareEPaper7P5InBV3::init_display_() {
this->data(0x2F);
this->data(0x17);

// POWER ON
this->command(0x04);

delay(100); // NOLINT
this->wait_until_idle_();
Expand All @@ -2096,7 +2094,7 @@ void WaveshareEPaper7P5InBV3::init_display_() {
this->data(0x20);
this->data(0x01); // gate 480
this->data(0xE0);
// COMMAND ...?
// COMMAND DUAL SPI MM_EN, DUSPI_EN
this->command(0x15);
this->data(0x00);
// COMMAND VCOM AND DATA INTERVAL SETTING
Expand Down Expand Up @@ -2158,11 +2156,27 @@ void WaveshareEPaper7P5InBV3::init_display_() {
this->command(0x24); // LUTBB
for (count = 0; count < 42; count++)
this->data(lut_bb_7_i_n5_v2[count]);

Check failure on line 2159 in esphome/components/waveshare_epaper/waveshare_epaper.cpp

View workflow job for this annotation

GitHub Actions / Run script/ci-custom

File contains tab character. Please convert tabs to spaces.

Check failure on line 2159 in esphome/components/waveshare_epaper/waveshare_epaper.cpp

View workflow job for this annotation

GitHub Actions / Run script/ci-custom

Trailing whitespace detected
// COMMAND POWER DRIVER HAT DOWN
// This command will turn off booster, controller, source driver, gate driver, VCOM, and
// temperature sensor, but register data will be kept until VDD turned OFF or Deep Sleep Mode.
// Source/Gate/Border/VCOM will be released to floating.
this->command(0x02);

Check failure on line 2165 in esphome/components/waveshare_epaper/waveshare_epaper.cpp

View workflow job for this annotation

GitHub Actions / Run script/ci-custom

Trailing whitespace detected
};
void HOT WaveshareEPaper7P5InBV3::display() {
this->init_display_();
uint32_t buf_len = this->get_buffer_length_();

// COMMAND POWER ON
ESP_LOGI(TAG, "Power on the display and hat");

// This command will turn on booster, controller, regulators, and temperature sensor will be
// activated for one-time sensing before enabling booster. When all voltages are ready, the
// BUSY_N signal will return to high.
this->command(0x04);
delay(200); // NOLINT
this->wait_until_idle_();

this->command(0x10);
for (uint32_t i = 0; i < buf_len; i++) {
this->data(0xFF);
Expand Down

0 comments on commit 2d9640a

Please sign in to comment.