|
arduino-audio-driver
|
Header-only driver class for the AC101 codec chip. More...
#include <AC101.h>
Public Member Functions | |
| AC101 ()=default | |
| error_t | configI2S (codec_mode_t mode, I2SDefinition *iface) |
| error_t | ctrlStateActive (codec_mode_t mode, bool ctrlStateActive) |
| error_t | deinit () |
| int | getEarphVolume () |
| int | getSpkVolume () |
| uint16_t | getSrcValue (input_device_t input_device) |
| Determines the value for the SRC register based on the selected input_device. | |
| error_t | getVoiceVolume (int *volume) |
| error_t | i2sConfigClock (ac_i2s_clock_t *cfg) |
| error_t | init (codec_config_t *codec_cfg) |
| error_t | readI2C (uint8_t devAddr, uint8_t reg_add, uint8_t *p_data, size_t size) |
| uint16_t | readReg (uint8_t reg_addr) |
| void | setAddress (int addr) |
| Defines the I2C device address. | |
| void | setCodecClk (samplerate_t sampledata) |
| error_t | setEarphVolume (uint8_t volume) |
| error_t | setOutputMixerGain (ac_output_mixer_gain_t gain, ac_output_mixer_source_t source) |
| error_t | setSpkVolume (uint8_t volume) |
| error_t | setVoiceMute (bool enable) |
| error_t | setVoiceVolume (int volume) |
| void | setWire (i2c_bus_handle_t handle) |
| Defines the I2C bus instance to be used. | |
| error_t | start (ac_module_t mode) |
| error_t | stop (ac_module_t mode) |
| error_t | writeReg (uint8_t reg_add, uint16_t data) |
Static Public Attributes | |
| static constexpr int | AC101_ADDR = 0x1A |
| static constexpr uint8_t | AC_DAC_DAPCTRL = 0xa0 |
| static constexpr uint8_t | AC_DAC_DAPHETHD = 0xab |
| static constexpr uint8_t | AC_DAC_DAPHGATC = 0xa9 |
| static constexpr uint8_t | AC_DAC_DAPHGDEC = 0xa7 |
| static constexpr uint8_t | AC_DAC_DAPHGKPA = 0xad |
| static constexpr uint8_t | AC_DAC_DAPHGOPA = 0xaf |
| static constexpr uint8_t | AC_DAC_DAPHHPFC = 0xa1 |
| static constexpr uint8_t | AC_DAC_DAPLETHD = 0xac |
| static constexpr uint8_t | AC_DAC_DAPLGATC = 0xaa |
| static constexpr uint8_t | AC_DAC_DAPLGDEC = 0xa8 |
| static constexpr uint8_t | AC_DAC_DAPLGKPA = 0xae |
| static constexpr uint8_t | AC_DAC_DAPLGOPA = 0xb0 |
| static constexpr uint8_t | AC_DAC_DAPLHAVC = 0xa3 |
| static constexpr uint8_t | AC_DAC_DAPLHPFC = 0xa2 |
| static constexpr uint8_t | AC_DAC_DAPLLAVC = 0xa4 |
| static constexpr uint8_t | AC_DAC_DAPOPT = 0xb1 |
| static constexpr uint8_t | AC_DAC_DAPRHAVC = 0xa5 |
| static constexpr uint8_t | AC_DAC_DAPRLAVC = 0xa6 |
| static constexpr int | ACK_CHECK_DIS = 0x0 |
| static constexpr int | ACK_CHECK_EN = 0x1 |
| static constexpr int | ACK_VAL = 0x0 |
| static constexpr uint8_t | ADC_APC_CTRL = 0x50 |
| static constexpr uint8_t | ADC_DIG_CTRL = 0x40 |
| static constexpr uint8_t | ADC_SRC = 0x51 |
| static constexpr uint8_t | ADC_SRCBST_CTRL = 0x52 |
| static constexpr uint8_t | ADC_VOL_CTRL = 0x41 |
| static constexpr uint8_t | CHIP_AUDIO_RS = 0x00 |
| static constexpr uint8_t | DAC_DAP_ENA = 0xb5 |
| static constexpr uint8_t | DAC_DIG_CTRL = 0x48 |
| static constexpr uint8_t | DAC_MXR_GAIN = 0x4d |
| static constexpr uint8_t | DAC_MXR_SRC = 0x4c |
| static constexpr uint8_t | DAC_VOL_CTRL = 0x49 |
| static constexpr uint8_t | HMIC_CTRL1 = 0x44 |
| static constexpr uint8_t | HMIC_CTRL2 = 0x45 |
| static constexpr uint8_t | HMIC_STATUS = 0x46 |
| static constexpr uint8_t | HPOUT_CTRL = 0x56 |
| static constexpr int | I2C_MASTER_READ = 1 |
| static constexpr int | I2C_MASTER_WRITE = 0 |
| static constexpr uint8_t | I2S1_MXR_GAIN = 0x18 |
| static constexpr uint8_t | I2S1_MXR_SRC = 0x13 |
| static constexpr uint8_t | I2S1_SDIN_CTRL = 0x12 |
| static constexpr uint8_t | I2S1_SDOUT_CTRL = 0x11 |
| static constexpr uint8_t | I2S1_VOL_CTRL1 = 0x14 |
| static constexpr uint8_t | I2S1_VOL_CTRL2 = 0x15 |
| static constexpr uint8_t | I2S1_VOL_CTRL3 = 0x16 |
| static constexpr uint8_t | I2S1_VOL_CTRL4 = 0x17 |
| static constexpr uint8_t | I2S1LCK_CTRL = 0x10 |
| static constexpr uint8_t | I2S_SR_CTRL = 0x06 |
| static constexpr uint8_t | MOD_CLK_ENA = 0x04 |
| static constexpr uint8_t | MOD_RST_CTRL = 0x05 |
| static constexpr int | NACK_VAL = 0x1 |
| static constexpr uint8_t | OMIXER_BST1_CTRL = 0x55 |
| static constexpr uint8_t | OMIXER_DACA_CTRL = 0x53 |
| static constexpr uint8_t | OMIXER_SR = 0x54 |
| static constexpr uint8_t | PLL_CTRL1 = 0x01 |
| static constexpr uint8_t | PLL_CTRL2 = 0x02 |
| static constexpr int | READ_BIT = 1 |
| static constexpr uint8_t | SPKOUT_CTRL = 0x58 |
| static constexpr uint8_t | SYSCLK_CTRL = 0x03 |
| static constexpr int | WRITE_BIT = 0 |
Protected Attributes | |
| int | i2c_addr = AC101_ADDR |
| i2c_bus_handle_t | i2c_handle = nullptr |
Header-only driver class for the AC101 codec chip.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Determines the value for the SRC register based on the selected input_device.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Defines the I2C device address.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Defines the I2C bus instance to be used.
|
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 |
|
staticconstexpr |
|
protected |
|
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 |