Add 7.5inch v2 waveshare (#1077)

* Added 7.5inchV2

* Added 7.5inV2

* Added 7.5inch_V2

* fixed Display function

* Inverted bytecode

Added ~() to invert the bytecode and make the screen look black text on white background

* Hoping to keep Travis happy with blank lines

* more travis hacking

* travis happy?

* wow

* gfhj
This commit is contained in:
Paul Deen
2020-07-12 01:03:13 +02:00
committed by GitHub
parent e41ea42074
commit c8998941a5
3 changed files with 82 additions and 15 deletions
@@ -105,6 +105,7 @@ enum WaveshareEPaperTypeBModel {
WAVESHARE_EPAPER_2_7_IN = 0,
WAVESHARE_EPAPER_4_2_IN,
WAVESHARE_EPAPER_7_5_IN,
WAVESHARE_EPAPER_7_5_INV2,
};
class WaveshareEPaper2P7In : public WaveshareEPaper {
@@ -236,5 +237,28 @@ class WaveshareEPaper7P5In : public WaveshareEPaper {
int get_height_internal() override;
};
class WaveshareEPaper7P5InV2 : public WaveshareEPaper {
public:
void initialize() override;
void display() override;
void dump_config() override;
void deep_sleep() override {
// COMMAND POWER OFF
this->command(0x02);
this->wait_until_idle_();
// COMMAND DEEP SLEEP
this->command(0x07);
this->data(0xA5); // check byte
}
protected:
int get_width_internal() override;
int get_height_internal() override;
};
} // namespace waveshare_epaper
} // namespace esphome