52 void setup()
override;
bool set_mute_on() override
Enables mute for audio out.
void set_mic_gain(ES8311MicGain mic_gain)
bool set_mute_off() override
Disables mute for audio out.
void set_bits_per_sample(ES8311Resolution resolution)
float volume() override
Gets the current volume out from the DAC.
void set_use_mic(bool use_mic)
ES8311Resolution resolution_out_
static const ES8311Coefficient * get_coefficient(uint32_t mclk, uint32_t rate)
Retrieves the appropriate registers values for the configured mclk and rate.
ES8311Resolution resolution_in_
uint32_t sample_frequency_
float get_setup_priority() const override
static uint8_t calculate_resolution_value(ES8311Resolution resolution)
Computes the register value for the configured resolution (bits per sample)
void dump_config() override
void set_use_mclk(bool use_mclk)
bool configure_format_()
Configures the ES8311 registers for the chosen bits per sample.
bool configure_clock_()
Configures the ES8311 registers for the chosen sample rate.
bool configure_mic_()
Configures the ES8311 microphone registers.
void set_sample_frequency(uint32_t sample_frequency)
bool set_mute_state_(bool mute_state)
Mutes or unmute the DAC audio out.
bool set_volume(float volume) override
Writes the volume out to the DAC.
This Class provides the methods to read/write bytes from/to an i2c device.
const float DATA
For components that import data from directly connected sensors like DHT.
Providing packet encoding functions for exchanging data with a remote host.