|
arduino-audio-driver
|
Header-only driver class for the ES8156 DAC chip. More...
#include <ES8156.h>
Public Member Functions | |
| ES8156 ()=default | |
| error_t | configI2S (codec_mode_t mode, I2SDefinition *iface) |
| Configure ES8156 codec mode and I2S interface. | |
| error_t | ctrlStateActive (codec_mode_t mode, bool ctrl_state_active) |
| Control ES8156 codec chip. | |
| error_t | deinit (void) |
| Deinitialize ES8156 codec chip. | |
| error_t | getVoiceVolume (int *volume) |
| Get voice volume (0~100) | |
| error_t | init (codec_config_t *cfg) |
| Initialize ES8156 codec chip. | |
| int | readReg (uint8_t reg_addr) |
| error_t | resume (void) |
| void | setAddress (int addr) |
| Defines the I2C device address. | |
| error_t | setVoiceMute (bool enable) |
| Configure ES8156 DAC mute or not. | |
| error_t | setVoiceVolume (int volume) |
| Set voice volume. | |
| void | setWire (i2c_bus_handle_t handle) |
| Defines the I2C bus instance to be used. | |
| error_t | standby (void) |
| error_t | writeReg (uint8_t reg_addr, uint8_t data) |
Static Public Member Functions | |
| static constexpr int | bitVal (int nr) |
Static Public Attributes | |
| static constexpr int | ES8156_ADDR = 0x8 |
| static constexpr uint8_t | ES8156_ALC_CONFIG1_REG15 = 0x15 |
| static constexpr uint8_t | ES8156_ALC_CONFIG2_REG16 = 0x16 |
| static constexpr uint8_t | ES8156_ALC_CONFIG3_REG17 = 0x17 |
| static constexpr uint8_t | ES8156_ANALOG_LP_REG24 = 0x24 |
| static constexpr uint8_t | ES8156_ANALOG_SYS1_REG20 = 0x20 |
| static constexpr uint8_t | ES8156_ANALOG_SYS2_REG21 = 0x21 |
| static constexpr uint8_t | ES8156_ANALOG_SYS3_REG22 = 0x22 |
| static constexpr uint8_t | ES8156_ANALOG_SYS4_REG23 = 0x23 |
| static constexpr uint8_t | ES8156_ANALOG_SYS5_REG25 = 0x25 |
| static constexpr uint8_t | ES8156_AUTOMUTE_SET_REG12 = 0x12 |
| static constexpr uint8_t | ES8156_CHIP_STATUS_REG0C = 0x0c |
| static constexpr uint8_t | ES8156_CHIP_VERSION_REGFF = 0xFF |
| static constexpr uint8_t | ES8156_CHIPID0_REGFE = 0xFE |
| static constexpr uint8_t | ES8156_CHIPID1_REGFD = 0xFD |
| static constexpr uint8_t | ES8156_CLOCK_ON_OFF_REG08 = 0x08 |
| static constexpr uint8_t | ES8156_DAC_MUTE_REG13 = 0x13 |
| static constexpr uint8_t | ES8156_DAC_OSR_COUNTER_REG10 = 0x10 |
| static constexpr uint8_t | ES8156_DAC_SDP_REG11 = 0x11 |
| static constexpr uint8_t | ES8156_EQ_CONTROL1_REG19 = 0x19 |
| static constexpr uint8_t | ES8156_EQ_CONTROL2_REG1A = 0x1a |
| static constexpr uint8_t | ES8156_I2C_PAGESEL_REGFC = 0xFC |
| static constexpr uint8_t | ES8156_LRCLK_DIV_H_REG03 = 0x03 |
| static constexpr uint8_t | ES8156_LRCLK_DIV_L_REG04 = 0x04 |
| static constexpr uint8_t | ES8156_MAINCLOCK_CTL_REG01 = 0x01 |
| static constexpr uint8_t | ES8156_MISC_CONTROL1_REG07 = 0x07 |
| static constexpr uint8_t | ES8156_MISC_CONTROL2_REG09 = 0x09 |
| static constexpr uint8_t | ES8156_MISC_CONTROL3_REG18 = 0x18 |
| static constexpr uint8_t | ES8156_NFS_CONFIG_REG06 = 0x06 |
| static constexpr uint8_t | ES8156_P2S_CONTROL_REG0D = 0x0d |
| static constexpr uint8_t | ES8156_RESET_REG00 = 0x00 |
| static constexpr uint8_t | ES8156_SCLK_DIV_REG05 = 0x05 |
| static constexpr uint8_t | ES8156_SCLK_MODE_REG02 = 0x02 |
| static constexpr uint8_t | ES8156_TIME_CONTROL1_REG0A = 0x0a |
| static constexpr uint8_t | ES8156_TIME_CONTROL2_REG0B = 0x0b |
| static constexpr uint8_t | ES8156_VOLUME_CONTROL_REG14 = 0x14 |
Protected Attributes | |
| codec_dac_volume_config_t * | dac_vol_handle |
| int | i2c_addr = ES8156_ADDR |
| i2c_bus_handle_t | i2c_handle = nullptr |
| bool | initialized = false |
Header-only driver class for the ES8156 DAC chip.
|
default |
|
inlinestaticconstexpr |
|
inline |
Configure ES8156 codec mode and I2S interface.
|
inline |
Control ES8156 codec chip.
|
inline |
Get voice volume (0~100)
|
inline |
Initialize ES8156 codec chip.
|
inline |
|
inline |
|
inline |
Defines the I2C device address.
|
inline |
Set voice volume.
| volume | voice volume (0~100) |
|
inline |
Defines the I2C bus instance to be used.
|
inline |
|
inline |
|
protected |
|
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 |
|
protected |