|
arduino-audio-driver
|
Header-only driver class for the ES7210 ADC chip. More...
#include <ES7210.h>
Public Member Functions | |
| ES7210 ()=default | |
| error_t | configFmt (i2s_format_t fmt) |
| error_t | configI2S (codec_mode_t mode, I2SDefinition *iface) |
| Configure ES7210 ADC mode and I2S interface. | |
| error_t | configSample (samplerate_t sample) |
| error_t | ctrlStateActive (codec_mode_t mode, bool ctrl_state_active) |
| Control ES7210 ADC chip. | |
| error_t | deinit () |
| Deinitialize ES7210 ADC chip. | |
| int | getCoeff (uint32_t mclk, uint32_t lrck) |
| error_t | getGain (void) |
| Get gain. | |
| int8_t | getMclkSrc (void) |
| error_t | init (codec_config_t *codec_cfg) |
| Initialize ES7210 ADC chip. | |
| error_t | micSelect (es7210_input_mics_t mic) |
| Select ES7210 mic. | |
| void | readAll (void) |
| Read all regs of ES7210. | |
| int | readReg (uint8_t reg_addr) |
| Read regs of ES7210. | |
| void | setAddress (int addr) |
| Defines the I2C device address. | |
| error_t | setBits (sample_bits_t bits) |
| error_t | setGain (es7210_gain_value_t gain) |
| Set gain (Note: the enabled microphone sets the same gain) | |
| error_t | setMicsForChannels (channels_t ch) |
| error_t | setMute (bool enable) |
| Set ES7210 ADC mute status. | |
| error_t | setVolume (int volume) |
| Set volume. | |
| void | setWire (i2c_bus_handle_t handle) |
| Defines the I2C bus instance to be used. | |
| error_t | start (uint8_t clock_reg_value) |
| error_t | stop (void) |
| error_t | updateRegBit (uint8_t reg_addr, uint8_t update_bits, uint8_t data) |
| error_t | writeReg (uint8_t reg_addr, uint8_t data) |
Static Public Attributes | |
| static constexpr uint8_t | ES7210_ADC12_HPF1_REG22 = 0x22 |
| static constexpr uint8_t | ES7210_ADC12_HPF2_REG23 = 0x23 |
| static constexpr uint8_t | ES7210_ADC34_HPF1_REG21 = 0x21 |
| static constexpr uint8_t | ES7210_ADC34_HPF2_REG20 = 0x20 |
| static constexpr uint8_t | ES7210_ADC34_MUTERANGE_REG14 = 0x14 |
| static constexpr uint8_t | ES7210_ADC_AUTOMUTE_REG13 = 0x13 |
| static constexpr int | ES7210_ADDR = ES7210_AD1_AD0_00 >> 1 |
| static constexpr uint8_t | ES7210_ANALOG_REG40 = 0x40 |
| static constexpr uint8_t | ES7210_CLOCK_OFF_REG01 = 0x01 |
| static constexpr uint8_t | ES7210_LRCK_DIVH_REG04 = 0x04 |
| static constexpr uint8_t | ES7210_LRCK_DIVL_REG05 = 0x05 |
| static constexpr uint8_t | ES7210_MAINCLK_REG02 = 0x02 |
| static constexpr uint8_t | ES7210_MASTER_CLK_REG03 = 0x03 |
| static constexpr int | ES7210_MCLK_SOURCE = FROM_CLOCK_DOUBLE_PIN |
| static constexpr uint8_t | ES7210_MIC12_BIAS_REG41 = 0x41 |
| static constexpr uint8_t | ES7210_MIC12_POWER_REG4B = 0x4B |
| static constexpr uint8_t | ES7210_MIC1_ES7210_GAIN_REG43 = 0x43 |
| static constexpr uint8_t | ES7210_MIC1_POWER_REG47 = 0x47 |
| static constexpr uint8_t | ES7210_MIC2_ES7210_GAIN_REG44 = 0x44 |
| static constexpr uint8_t | ES7210_MIC2_POWER_REG48 = 0x48 |
| static constexpr uint8_t | ES7210_MIC34_BIAS_REG42 = 0x42 |
| static constexpr uint8_t | ES7210_MIC34_POWER_REG4C = 0x4C |
| static constexpr uint8_t | ES7210_MIC3_ES7210_GAIN_REG45 = 0x45 |
| static constexpr uint8_t | ES7210_MIC3_POWER_REG49 = 0x49 |
| static constexpr uint8_t | ES7210_MIC4_ES7210_GAIN_REG46 = 0x46 |
| static constexpr uint8_t | ES7210_MIC4_POWER_REG4A = 0x4A |
| static constexpr uint8_t | ES7210_MODE_CONFIG_REG08 = 0x08 |
| static constexpr uint8_t | ES7210_OSR_REG07 = 0x07 |
| static constexpr uint8_t | ES7210_POWER_DOWN_REG06 = 0x06 |
| static constexpr uint8_t | ES7210_RESET_REG00 = 0x00 |
| static constexpr uint8_t | ES7210_SDP_INTERFACE1_REG11 = 0x11 |
| static constexpr uint8_t | ES7210_SDP_INTERFACE2_REG12 = 0x12 |
| static constexpr uint8_t | ES7210_TIME_CONTROL0_REG09 = 0x09 |
| static constexpr uint8_t | ES7210_TIME_CONTROL1_REG0A = 0x0A |
| static constexpr int | FROM_CLOCK_DOUBLE_PIN = 1 |
| static constexpr int | FROM_PAD_PIN = 0 |
| static constexpr int | I2S_DSP_MODE = 0 |
| static constexpr int | MCLK_DIV_FRE = 256 |
| static constexpr const char * | TAG_ES7210 = "ES7210" |
Protected Attributes | |
| int | i2c_addr = ES7210_ADDR |
| i2c_bus_handle_t | i2c_handle = nullptr |
| es7210_input_mics_t | mic_select |
Header-only driver class for the ES7210 ADC chip.
|
default |
|
inline |
|
inline |
Configure ES7210 ADC mode and I2S interface.
|
inline |
|
inline |
Control ES7210 ADC chip.
|
inline |
|
inline |
Get gain.
|
inline |
|
inline |
Initialize ES7210 ADC chip.
|
inline |
Select ES7210 mic.
|
inline |
Read all regs of ES7210.
|
inline |
Read regs of ES7210.
|
inline |
Defines the I2C device address.
|
inline |
|
inline |
Set gain (Note: the enabled microphone sets the same gain)
|
inline |
|
inline |
Set volume.
|
inline |
Defines the I2C bus instance to be used.
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
protected |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
|
protected |
|
staticconstexpr |