ESPHome 2025.5.0
Loading...
Searching...
No Matches
es8156.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace es8156 {
9
10class ES8156 : public audio_dac::AudioDac, public Component, public i2c::I2CDevice {
11 public:
13 // Component overrides //
15
16 void setup() override;
17 float get_setup_priority() const override { return setup_priority::DATA; }
18 void dump_config() override;
19
21 // AudioDac overrides //
23
27 bool set_volume(float volume) override;
28
31 float volume() override;
32
35 bool set_mute_off() override { return this->set_mute_state_(false); }
36
39 bool set_mute_on() override { return this->set_mute_state_(true); }
40
41 bool is_muted() override { return this->is_muted_; }
42
43 protected:
47 bool set_mute_state_(bool mute_state);
48};
49
50} // namespace es8156
51} // namespace esphome
float volume() override
Gets the current volume out from the DAC.
Definition es8156.cpp:59
void dump_config() override
Definition es8156.cpp:43
bool set_mute_off() override
Disables mute for audio out.
Definition es8156.h:35
void setup() override
Definition es8156.cpp:19
bool set_mute_state_(bool mute_state)
Mutes or unmutes the DAC audio out.
Definition es8156.cpp:65
bool is_muted() override
Definition es8156.h:41
float get_setup_priority() const override
Definition es8156.h:17
bool set_volume(float volume) override
Writes the volume out to the DAC.
Definition es8156.cpp:52
bool set_mute_on() override
Enables mute for audio out.
Definition es8156.h:39
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
const float DATA
For components that import data from directly connected sensors like DHT.
Definition component.cpp:19
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7