ESPHome 2025.5.0
Loading...
Searching...
No Matches
pcf8574_display.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace lcd_pcf8574 {
9
11 public:
12 void set_writer(std::function<void(PCF8574LCDDisplay &)> &&writer) { this->writer_ = std::move(writer); }
13 void setup() override;
14 void dump_config() override;
15 void backlight();
16 void no_backlight();
17
18 protected:
19 bool is_four_bit_mode() override { return true; }
20 void write_n_bits(uint8_t value, uint8_t n) override;
21 void send(uint8_t value, bool rs) override;
22
23 void call_writer() override { this->writer_(*this); }
24
25 // Stores the current state of the backlight.
27 std::function<void(PCF8574LCDDisplay &)> writer_;
28};
29
30} // namespace lcd_pcf8574
31} // namespace esphome
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
void send(uint8_t value, bool rs) override
void set_writer(std::function< void(PCF8574LCDDisplay &)> &&writer)
void write_n_bits(uint8_t value, uint8_t n) override
std::function< void(PCF8574LCDDisplay &)> writer_
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7