28 void setup()
override;
bool configure_sample_rate_()
uint8_t es7210_gain_reg_value_(float mic_gain)
Convert floating point mic gain value to register value.
bool configure_i2s_format_()
void set_tdm(bool enable_tdm)
float mic_gain() override
Returns the MIC1 gain; other channels may have different gains.
bool es7210_update_reg_bit_(uint8_t reg_addr, uint8_t update_bits, uint8_t data)
Updates an I2C registry address by modifying the current state.
void dump_config() override
bool set_mic_gain(float mic_gain) override
Sets all four channel gains, replacing any configured per-channel gains.
std::array< float, 4 > channel_gains_
void set_bits_per_sample(ES7210BitsPerSample bits_per_sample)
bool set_channel_gain(uint8_t channel, float gain)
Sets a zero-based channel gain; returns false for an invalid channel or an I2C failure.
ES7210BitsPerSample bits_per_sample_
bool configure_mic_gain_()
void set_sample_rate(uint32_t sample_rate)
This Class provides the methods to read/write bytes from/to an i2c device.
@ ES7210_BITS_PER_SAMPLE_20
@ ES7210_BITS_PER_SAMPLE_18
@ ES7210_BITS_PER_SAMPLE_16
@ ES7210_BITS_PER_SAMPLE_32
@ ES7210_BITS_PER_SAMPLE_24