mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 07:08:20 +00:00
fix: (Component WaveshareEpaper) Correct display tx cmd
This commit is contained in:
parent
ec5fccf9c8
commit
9e05af358d
@ -1960,19 +1960,22 @@ void WaveshareEPaper4P2InBV2::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HOT WaveshareEPaper4P2InBV2::display() {
|
void HOT WaveshareEPaper4P2InBV2::display() {
|
||||||
const size_t buf_len = this->get_buffer_length_() / 2u;
|
const uint32_t buf_half_len = this->get_buffer_length_() / 2u;
|
||||||
|
|
||||||
// COMMAND DATA START TRANSMISSION 1 (B/W data)
|
// COMMAND DATA START TRANSMISSION 1 (B/W data)
|
||||||
this->command(0x10);
|
this->command(0x10);
|
||||||
this->start_data_();
|
this->start_data_();
|
||||||
this->write_array(this->buffer_, buf_len);
|
for (size_t i = 0; i < buf_half_len; i++) {
|
||||||
|
this->data(this->buffer_[i]);
|
||||||
|
}
|
||||||
this->end_data_();
|
this->end_data_();
|
||||||
delay(2);
|
|
||||||
|
|
||||||
// COMMAND DATA START TRANSMISSION 2 (RED data)
|
// COMMAND DATA START TRANSMISSION 2 (RED data)
|
||||||
this->command(0x13);
|
this->command(0x13);
|
||||||
this->start_data_();
|
this->start_data_();
|
||||||
this->write_array(this->buffer_ + buf_len, buf_len);
|
for (size_t i = 0; i < buf_half_len; i++) {
|
||||||
|
this->data(this->buffer_[i + buf_half_len]);
|
||||||
|
}
|
||||||
this->end_data_();
|
this->end_data_();
|
||||||
delay(2);
|
delay(2);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user