arduino-audio-driver
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
WM8962 Class Reference

Header only C++ driver for the WM8962 audio codec. More...

#include <WM8962.h>

Inheritance diagram for WM8962:
ZephyrDriverCommon

Public Types

enum  Reg : uint16_t {
  REG_LINVOL = 0x00 , REG_RINVOL = 0x01 , REG_LOUT1 = 0x02 , REG_ROUT1 = 0x03 ,
  REG_CLOCK1 = 0x04 , REG_DACCTL1 = 0x05 , REG_DACCTL2 = 0x06 , REG_IFACE0 = 0x07 ,
  REG_CLOCK2 = 0x08 , REG_IFACE1 = 0x09 , REG_LDAC = 0x0A , REG_RDAC = 0x0B ,
  REG_IFACE2 = 0x0E , REG_RESET = 0x0F , REG_3D = 0x10 , REG_ALC1 = 0x11 ,
  REG_ALC2 = 0x12 , REG_ALC3 = 0x13 , REG_NOISEG = 0x14 , REG_LADC = 0x15 ,
  REG_RADC = 0x16 , REG_ADDCTL1 = 0x17 , REG_ADDCTL2 = 0x18 , REG_POWER1 = 0x19 ,
  REG_POWER2 = 0x1A , REG_ADDCTL3 = 0x1B , REG_APOP1 = 0x1C , REG_APOP2 = 0x1D ,
  REG_INPUT_MIXER_1 = 0x1F , REG_LINPATH = 0x20 , REG_RINPATH = 0x21 , REG_INPUTMIX = 0x22 ,
  REG_LEFT_INPUT_PGA = 0x25 , REG_RIGHT_INPUT_PGA = 0x26 , REG_MONOMIX2 = 0x27 , REG_LOUT2 = 0x28 ,
  REG_ROUT2 = 0x29 , REG_TEMP = 0x2F , REG_ADDCTL4 = 0x30 , REG_CLASSD1 = 0x31 ,
  REG_CLASSD3 = 0x33 , REG_CLK4 = 0x38 , REG_DC_SERVO_0 = 0x3C , REG_DC_SERVO_1 = 0x3D ,
  REG_ANALOG_HP_0 = 0x45 , REG_CHARGE_PUMP_1 = 0x48 , REG_WRITE_SEQ_CTRL_1 = 0x57 , REG_WRITE_SEQ_CTRL_2 = 0x5A ,
  REG_WRITE_SEQ_CTRL_3 = 0x5D , REG_LEFT_HEADPHONE_MIXER = 0x64 , REG_RIGHT_HEADPHONE_MIXER = 0x65 , REG_LEFT_HEADPHONE_MIXER_VOLUME = 0x66 ,
  REG_RIGHT_HEADPHONE_MIXER_VOLUME = 0x67 , REG_LEFT_SPEAKER_MIXER = 0x69 , REG_RIGHT_SPEAKER_MIXER = 0x6A , REG_LEFT_SPEAKER_MIXER_VOLUME = 0x6B ,
  REG_RIGHT_SPEAKER_MIXER_VOLUME = 0x6C , REG_PLL2 = 0x81 , REG_FLL_CTRL_1 = 0x9B , REG_FLL_CTRL_2 = 0x9C ,
  REG_FLL_CTRL_3 = 0x9D , REG_FLL_CTRL_6 = 0xA0 , REG_FLL_CTRL_7 = 0xA1 , REG_FLL_CTRL_8 = 0xA2 ,
  REG_INT_STATUS_2 = 0x231
}
 

Public Member Functions

 WM8962 ()
 
uint8_t address ()
 Provides the actual I2C address of the codec.
 
bool applyProperties ()
 Apply pending volume changes (set VU bit for output and input)
 
bool begin (uint32_t sample_rate, uint8_t bits)
 Initialize the codec: soft reset, power up the analog/digital blocks, run the built-in write sequences, configure the digital audio interface protocol, sample rate / word size and (optionally) enable the playback and/or capture path.
 
bool begin (uint32_t sample_rate, uint8_t bits, codec_mode_t mode, i2s_format_t fmt, bool is_master, uint8_t channels) override
 
bool begin (WM8962Protocol protocol=WM8962Protocol::I2S, uint32_t sample_rate=44100, uint8_t word_size=16, uint32_t mclk_to_fs_ratio=256, bool playback=true, bool capture=true)
 
bool configureInput ()
 Configure the default input path: route input1/input3, default volume, unmuted.
 
bool configureOutput ()
 
virtual int getInputVolume ()
 
virtual int getVolume ()
 Provides the output volume in % (0...100) that was set with setVolume()
 
i2c_bus_handle_t getWire ()
 Provides the actual I2C communication object.
 
bool isInputVolumeSupported () override
 Returns true: the input volume is supported.
 
bool routeInput (WM8962InputPgaSource source, WM8962Channel channel)
 Select the input PGA source for the given channel (FrontLeft / FrontRight only).
 
bool routeOutput (uint16_t mixer_value, WM8962Channel channel)
 Select the output mixer source register for the given channel (the raw mixer-enable value is written as-is).
 
bool runSequence (WM8962Sequence id)
 Trigger one of the codec's built-in write sequences and wait (up to the documented timeout) until it has completed.
 
bool setActive (codec_mode_t mode) override
 
void setAddress (uint8_t addr)
 Defines the I2C address of the codec.
 
bool setAudioFormat (uint32_t sample_rate, uint8_t word_size=16, uint32_t mclk_to_fs_ratio=256)
 Configure word size, sysclk/sample-rate divider (REG_ADDCTL3) and bit-clock divider (REG_CLK4 = sysclk/fs ratio).
 
bool setDevices (input_device_t input_device, output_device_t output_device) override
 Stores the output device selection for use by configureOutput()
 
bool setInputMute (bool mute, WM8962Channel channel=WM8962Channel::All)
 Mute / unmute the input for the given channel(s)
 
bool setInputVolume (int volume) override
 Sets the input volume in % (0...100) for all channels.
 
bool setInputVolume (uint8_t volume, WM8962Channel channel=WM8962Channel::All)
 Set the input volume for the given channel(s) (6 bit value)
 
bool setMute (bool mute) override
 Mutes/unmutes all outputs.
 
bool setOutputMute (bool mute, WM8962Channel channel=WM8962Channel::All)
 Mute / unmute the output for the given channel(s)
 
bool setOutputVolume (uint8_t volume, WM8962Channel channel=WM8962Channel::All)
 Set the output volume (0..127) for the given channel(s)
 
bool setProtocol (WM8962Protocol protocol)
 Configure the digital audio interface protocol (I2S, LJ, RJ, PCMA/B)
 
bool setVolume (int volume) override
 Sets the output volume in % (0...100) for all channels.
 
void setWire (i2c_bus_handle_t w)
 Defines the I2C communication object.
 
bool softReset ()
 Soft reset of the codec (writes 0x6243 to REG_RESET)
 

Static Public Attributes

static constexpr uint16_t ADC_DEFAULT_VOLUME_VALUE = 0x1C0
 
static constexpr uint16_t ADC_MAX_VOLUME_VALUE = 0xFF
 
static constexpr uint16_t CLOCK2_BCLK_DIV_MASK = 0x0F
 
static constexpr uint16_t DAC_DEFAULT_VOLUME_VALUE = 0x1C0
 
static constexpr uint16_t DAC_MAX_VOLUME_VALUE = 0xFF
 
static constexpr uint16_t HEADPHONE_DEFAULT_VOLUME_VALUE = 0x179
 
static constexpr uint16_t HEADPHONE_MAX_VOLUME_VALUE = 0x7F
 
static constexpr uint16_t HEADPHONE_MIN_VOLUME_VALUE = 0x2F
 
static constexpr uint16_t IFACE0_FORMAT_MASK = 0x13
 
static constexpr uint16_t IFACE0_WL_16BITS = 0x00
 
static constexpr uint16_t IFACE0_WL_20BITS = 0x01
 
static constexpr uint16_t IFACE0_WL_24BITS = 0x02
 
static constexpr uint16_t IFACE0_WL_32BITS = 0x03
 
static constexpr uint16_t IFACE0_WL_MASK = 0x0C
 
static constexpr uint16_t IFACE0_WL_SHIFT = 0x02
 
static constexpr uint16_t L_CH_MUTE_MASK = 2
 
static constexpr uint16_t LINEIN_DEFAULT_VOLUME_VALUE = 0x12D
 
static constexpr uint16_t LINEIN_MAX_VOLUME_VALUE = 0x3F
 
static constexpr uint16_t R_CH_MUTE_MASK = 1
 
static constexpr uint16_t REGMASK_IN_MUTE = 0b010000000
 
static constexpr uint16_t REGMASK_IN_VOLUME = 0b000111111
 
static constexpr uint16_t REGMASK_IN_VU = 0b100000000
 
static constexpr uint16_t REGMASK_IN_ZC = 0b001000000
 
static constexpr uint16_t REGMASK_OUT_VOL = 0b001111111
 
static constexpr uint16_t REGMASK_OUT_VU = 0b100000000
 
static constexpr uint16_t REGMASK_OUT_ZC = 0b010000000
 
static constexpr uint16_t SPEAKER_DEFAULT_VOLUME_VALUE = 0x179
 
static constexpr uint16_t SPEAKER_MAX_VOLUME_VALUE = 0x7F
 
static constexpr uint16_t SPEAKER_MIN_VOLUME_VALUE = 0x2F
 
static constexpr uint16_t WSEQ_DONE_EINT_MASK = 0x80
 
static constexpr uint16_t WSEQ_ENA = 0x20
 

Protected Member Functions

bool readReg (uint8_t reg, uint8_t &value)
 Reads a single byte from an 8 bit register address.
 
bool readReg16 (uint8_t reg, uint16_t &value)
 Reads a 16 bit (big endian) value from an 8 bit register address.
 
bool readRegWide (uint16_t reg, uint16_t &value)
 
bool updateInput (WM8962Channel channel, uint16_t val, uint16_t mask)
 
bool updateOutput (WM8962Channel channel, uint16_t val, uint16_t mask)
 
bool updateReg (uint8_t reg, uint8_t mask, uint8_t value)
 Read-Modify-Write of a single byte register.
 
bool updateReg16 (uint8_t reg, uint16_t mask, uint16_t value)
 Read-Modify-Write of a 16 bit (big endian) register.
 
bool updateRegWide (uint16_t reg, uint16_t mask, uint16_t value)
 Read-Modify-Write of a 16 bit register addressed via a 16 bit address.
 
bool writeReg (uint8_t reg, uint8_t value)
 Writes a single byte to an 8 bit register address.
 
bool writeReg16 (uint8_t reg, uint16_t value)
 Writes a 16 bit (big endian) value to an 8 bit register address.
 
bool writeRegWide (uint16_t reg, uint16_t value)
 

Protected Attributes

uint8_t i2c_addr = 0
 
int input_volume_percent = 100
 Last input volume (in %) provided to setInputVolume()
 
output_device_t output_device = DAC_OUTPUT_ALL
 Output device selection set via setDevices(), used by configureOutput()
 
int volume_percent = 100
 Last volume (in %) provided to setVolume()
 
i2c_bus_handle_t wire = nullptr
 

Detailed Description

Header only C++ driver for the WM8962 audio codec.

The WM8962 register map extends beyond a single byte, therefore both the register address and the register value are transferred as 16 bit big endian quantities (4 bytes per write, 2+2 bytes per read).

Provides a soft reset, basic playback/capture configuration, input/output routing and output/input volume & mute control, ported from the corresponding Zephyr RTOS driver.

Member Enumeration Documentation

◆ Reg

enum Reg : uint16_t
Enumerator
REG_LINVOL 
REG_RINVOL 
REG_LOUT1 
REG_ROUT1 
REG_CLOCK1 
REG_DACCTL1 
REG_DACCTL2 
REG_IFACE0 
REG_CLOCK2 
REG_IFACE1 
REG_LDAC 
REG_RDAC 
REG_IFACE2 
REG_RESET 
REG_3D 
REG_ALC1 
REG_ALC2 
REG_ALC3 
REG_NOISEG 
REG_LADC 
REG_RADC 
REG_ADDCTL1 
REG_ADDCTL2 
REG_POWER1 
REG_POWER2 
REG_ADDCTL3 
REG_APOP1 
REG_APOP2 
REG_INPUT_MIXER_1 
REG_LINPATH 
REG_RINPATH 
REG_INPUTMIX 
REG_LEFT_INPUT_PGA 
REG_RIGHT_INPUT_PGA 
REG_MONOMIX2 
REG_LOUT2 
REG_ROUT2 
REG_TEMP 
REG_ADDCTL4 
REG_CLASSD1 
REG_CLASSD3 
REG_CLK4 
REG_DC_SERVO_0 
REG_DC_SERVO_1 
REG_ANALOG_HP_0 
REG_CHARGE_PUMP_1 
REG_WRITE_SEQ_CTRL_1 
REG_WRITE_SEQ_CTRL_2 
REG_WRITE_SEQ_CTRL_3 
REG_LEFT_HEADPHONE_MIXER 
REG_RIGHT_HEADPHONE_MIXER 
REG_LEFT_HEADPHONE_MIXER_VOLUME 
REG_RIGHT_HEADPHONE_MIXER_VOLUME 
REG_LEFT_SPEAKER_MIXER 
REG_RIGHT_SPEAKER_MIXER 
REG_LEFT_SPEAKER_MIXER_VOLUME 
REG_RIGHT_SPEAKER_MIXER_VOLUME 
REG_PLL2 
REG_FLL_CTRL_1 
REG_FLL_CTRL_2 
REG_FLL_CTRL_3 
REG_FLL_CTRL_6 
REG_FLL_CTRL_7 
REG_FLL_CTRL_8 
REG_INT_STATUS_2 

Constructor & Destructor Documentation

◆ WM8962()

WM8962 ( )
inline

Member Function Documentation

◆ address()

uint8_t address ( )
inlineinherited

Provides the actual I2C address of the codec.

◆ applyProperties()

bool applyProperties ( )
inline

Apply pending volume changes (set VU bit for output and input)

◆ begin() [1/3]

bool begin ( uint32_t  sample_rate,
uint8_t  bits 
)
inline

Initialize the codec: soft reset, power up the analog/digital blocks, run the built-in write sequences, configure the digital audio interface protocol, sample rate / word size and (optionally) enable the playback and/or capture path.

Parameters
protocolDigital audio interface protocol
sample_rateI2S sample rate in Hz (e.g. 44100, 48000)
word_sizeI2S word size in bits (16, 20, 24, 32)
mclk_to_fs_ratioMCLK / sample-rate ratio (e.g. 256 for sysclk = 256 * fs); used to select the SYSCLK divider
playbackEnable & configure the output (headphone/speaker) path
captureEnable & configure the input path Initializes the codec for I2S with the given sample rate and bits per sample

◆ begin() [2/3]

bool begin ( uint32_t  sample_rate,
uint8_t  bits,
codec_mode_t  mode,
i2s_format_t  fmt,
bool  is_master,
uint8_t  channels 
)
inlineoverridevirtual

Initializes the codec for I2S with the given sample rate, bits per sample, enabling the playback and/or capture path depending on mode and using the given I2S data format. The is_master and channels parameters are not configurable on this chip and are ignored.

Implements ZephyrDriverCommon.

◆ begin() [3/3]

bool begin ( WM8962Protocol  protocol = WM8962Protocol::I2S,
uint32_t  sample_rate = 44100,
uint8_t  word_size = 16,
uint32_t  mclk_to_fs_ratio = 256,
bool  playback = true,
bool  capture = true 
)
inline

◆ configureInput()

bool configureInput ( )
inline

Configure the default input path: route input1/input3, default volume, unmuted.

◆ configureOutput()

bool configureOutput ( )
inline

Configure the default output path: default volume, headphone (LINE1) and/or speaker (LINE2) output unmuted depending on the output device selected via setDevices()

◆ getInputVolume()

virtual int getInputVolume ( )
inlinevirtualinherited

Provides the input volume in % (0...100) that was set with setInputVolume()

◆ getVolume()

virtual int getVolume ( )
inlinevirtualinherited

Provides the output volume in % (0...100) that was set with setVolume()

◆ getWire()

i2c_bus_handle_t getWire ( )
inlineinherited

Provides the actual I2C communication object.

◆ isInputVolumeSupported()

bool isInputVolumeSupported ( )
inlineoverridevirtual

Returns true: the input volume is supported.

Reimplemented from ZephyrDriverCommon.

◆ readReg()

bool readReg ( uint8_t  reg,
uint8_t &  value 
)
inlineprotectedinherited

Reads a single byte from an 8 bit register address.

◆ readReg16()

bool readReg16 ( uint8_t  reg,
uint16_t &  value 
)
inlineprotectedinherited

Reads a 16 bit (big endian) value from an 8 bit register address.

◆ readRegWide()

bool readRegWide ( uint16_t  reg,
uint16_t &  value 
)
inlineprotected

Reads a 16 bit big endian register value addressed via a 16 bit big endian register address

◆ routeInput()

bool routeInput ( WM8962InputPgaSource  source,
WM8962Channel  channel 
)
inline

Select the input PGA source for the given channel (FrontLeft / FrontRight only).

◆ routeOutput()

bool routeOutput ( uint16_t  mixer_value,
WM8962Channel  channel 
)
inline

Select the output mixer source register for the given channel (the raw mixer-enable value is written as-is).

◆ runSequence()

bool runSequence ( WM8962Sequence  id)
inline

Trigger one of the codec's built-in write sequences and wait (up to the documented timeout) until it has completed.

◆ setActive()

bool setActive ( codec_mode_t  mode)
inlineoverridevirtual

Activates/deactivates the playback and/or capture path depending on codec_mode_t by muting/unmuting the output and input independently

Reimplemented from ZephyrDriverCommon.

◆ setAddress()

void setAddress ( uint8_t  addr)
inlineinherited

Defines the I2C address of the codec.

◆ setAudioFormat()

bool setAudioFormat ( uint32_t  sample_rate,
uint8_t  word_size = 16,
uint32_t  mclk_to_fs_ratio = 256 
)
inline

Configure word size, sysclk/sample-rate divider (REG_ADDCTL3) and bit-clock divider (REG_CLK4 = sysclk/fs ratio).

Parameters
sample_ratesample rate in Hz
word_sizeword size in bits (16, 20, 24, 32)
mclk_to_fs_ratioratio between sysclk and the sample rate (e.g. 256, 512, ...) used to compute REG_CLK4

◆ setDevices()

bool setDevices ( input_device_t  input_device,
output_device_t  output_device 
)
inlineoverridevirtual

Stores the output device selection for use by configureOutput()

Reimplemented from ZephyrDriverCommon.

◆ setInputMute()

bool setInputMute ( bool  mute,
WM8962Channel  channel = WM8962Channel::All 
)
inline

Mute / unmute the input for the given channel(s)

◆ setInputVolume() [1/2]

bool setInputVolume ( int  volume)
inlineoverridevirtual

Sets the input volume in % (0...100) for all channels.

Reimplemented from ZephyrDriverCommon.

◆ setInputVolume() [2/2]

bool setInputVolume ( uint8_t  volume,
WM8962Channel  channel = WM8962Channel::All 
)
inline

Set the input volume for the given channel(s) (6 bit value)

◆ setMute()

bool setMute ( bool  mute)
inlineoverridevirtual

Mutes/unmutes all outputs.

Reimplemented from ZephyrDriverCommon.

◆ setOutputMute()

bool setOutputMute ( bool  mute,
WM8962Channel  channel = WM8962Channel::All 
)
inline

Mute / unmute the output for the given channel(s)

◆ setOutputVolume()

bool setOutputVolume ( uint8_t  volume,
WM8962Channel  channel = WM8962Channel::All 
)
inline

Set the output volume (0..127) for the given channel(s)

◆ setProtocol()

bool setProtocol ( WM8962Protocol  protocol)
inline

Configure the digital audio interface protocol (I2S, LJ, RJ, PCMA/B)

◆ setVolume()

bool setVolume ( int  volume)
inlineoverridevirtual

Sets the output volume in % (0...100) for all channels.

Reimplemented from ZephyrDriverCommon.

◆ setWire()

void setWire ( i2c_bus_handle_t  w)
inlineinherited

Defines the I2C communication object.

◆ softReset()

bool softReset ( )
inline

Soft reset of the codec (writes 0x6243 to REG_RESET)

◆ updateInput()

bool updateInput ( WM8962Channel  channel,
uint16_t  val,
uint16_t  mask 
)
inlineprotected

◆ updateOutput()

bool updateOutput ( WM8962Channel  channel,
uint16_t  val,
uint16_t  mask 
)
inlineprotected

◆ updateReg()

bool updateReg ( uint8_t  reg,
uint8_t  mask,
uint8_t  value 
)
inlineprotectedinherited

Read-Modify-Write of a single byte register.

◆ updateReg16()

bool updateReg16 ( uint8_t  reg,
uint16_t  mask,
uint16_t  value 
)
inlineprotectedinherited

Read-Modify-Write of a 16 bit (big endian) register.

◆ updateRegWide()

bool updateRegWide ( uint16_t  reg,
uint16_t  mask,
uint16_t  value 
)
inlineprotected

Read-Modify-Write of a 16 bit register addressed via a 16 bit address.

◆ writeReg()

bool writeReg ( uint8_t  reg,
uint8_t  value 
)
inlineprotectedinherited

Writes a single byte to an 8 bit register address.

◆ writeReg16()

bool writeReg16 ( uint8_t  reg,
uint16_t  value 
)
inlineprotectedinherited

Writes a 16 bit (big endian) value to an 8 bit register address.

◆ writeRegWide()

bool writeRegWide ( uint16_t  reg,
uint16_t  value 
)
inlineprotected

Writes a 16 bit big endian register address followed by a 16 bit big endian register value (4 bytes total)

Member Data Documentation

◆ ADC_DEFAULT_VOLUME_VALUE

constexpr uint16_t ADC_DEFAULT_VOLUME_VALUE = 0x1C0
staticconstexpr

◆ ADC_MAX_VOLUME_VALUE

constexpr uint16_t ADC_MAX_VOLUME_VALUE = 0xFF
staticconstexpr

◆ CLOCK2_BCLK_DIV_MASK

constexpr uint16_t CLOCK2_BCLK_DIV_MASK = 0x0F
staticconstexpr

◆ DAC_DEFAULT_VOLUME_VALUE

constexpr uint16_t DAC_DEFAULT_VOLUME_VALUE = 0x1C0
staticconstexpr

◆ DAC_MAX_VOLUME_VALUE

constexpr uint16_t DAC_MAX_VOLUME_VALUE = 0xFF
staticconstexpr

◆ HEADPHONE_DEFAULT_VOLUME_VALUE

constexpr uint16_t HEADPHONE_DEFAULT_VOLUME_VALUE = 0x179
staticconstexpr

◆ HEADPHONE_MAX_VOLUME_VALUE

constexpr uint16_t HEADPHONE_MAX_VOLUME_VALUE = 0x7F
staticconstexpr

◆ HEADPHONE_MIN_VOLUME_VALUE

constexpr uint16_t HEADPHONE_MIN_VOLUME_VALUE = 0x2F
staticconstexpr

◆ i2c_addr

uint8_t i2c_addr = 0
protectedinherited

◆ IFACE0_FORMAT_MASK

constexpr uint16_t IFACE0_FORMAT_MASK = 0x13
staticconstexpr

◆ IFACE0_WL_16BITS

constexpr uint16_t IFACE0_WL_16BITS = 0x00
staticconstexpr

◆ IFACE0_WL_20BITS

constexpr uint16_t IFACE0_WL_20BITS = 0x01
staticconstexpr

◆ IFACE0_WL_24BITS

constexpr uint16_t IFACE0_WL_24BITS = 0x02
staticconstexpr

◆ IFACE0_WL_32BITS

constexpr uint16_t IFACE0_WL_32BITS = 0x03
staticconstexpr

◆ IFACE0_WL_MASK

constexpr uint16_t IFACE0_WL_MASK = 0x0C
staticconstexpr

◆ IFACE0_WL_SHIFT

constexpr uint16_t IFACE0_WL_SHIFT = 0x02
staticconstexpr

◆ input_volume_percent

int input_volume_percent = 100
protectedinherited

Last input volume (in %) provided to setInputVolume()

◆ L_CH_MUTE_MASK

constexpr uint16_t L_CH_MUTE_MASK = 2
staticconstexpr

◆ LINEIN_DEFAULT_VOLUME_VALUE

constexpr uint16_t LINEIN_DEFAULT_VOLUME_VALUE = 0x12D
staticconstexpr

◆ LINEIN_MAX_VOLUME_VALUE

constexpr uint16_t LINEIN_MAX_VOLUME_VALUE = 0x3F
staticconstexpr

◆ output_device

output_device_t output_device = DAC_OUTPUT_ALL
protected

Output device selection set via setDevices(), used by configureOutput()

◆ R_CH_MUTE_MASK

constexpr uint16_t R_CH_MUTE_MASK = 1
staticconstexpr

◆ REGMASK_IN_MUTE

constexpr uint16_t REGMASK_IN_MUTE = 0b010000000
staticconstexpr

◆ REGMASK_IN_VOLUME

constexpr uint16_t REGMASK_IN_VOLUME = 0b000111111
staticconstexpr

◆ REGMASK_IN_VU

constexpr uint16_t REGMASK_IN_VU = 0b100000000
staticconstexpr

◆ REGMASK_IN_ZC

constexpr uint16_t REGMASK_IN_ZC = 0b001000000
staticconstexpr

◆ REGMASK_OUT_VOL

constexpr uint16_t REGMASK_OUT_VOL = 0b001111111
staticconstexpr

◆ REGMASK_OUT_VU

constexpr uint16_t REGMASK_OUT_VU = 0b100000000
staticconstexpr

◆ REGMASK_OUT_ZC

constexpr uint16_t REGMASK_OUT_ZC = 0b010000000
staticconstexpr

◆ SPEAKER_DEFAULT_VOLUME_VALUE

constexpr uint16_t SPEAKER_DEFAULT_VOLUME_VALUE = 0x179
staticconstexpr

◆ SPEAKER_MAX_VOLUME_VALUE

constexpr uint16_t SPEAKER_MAX_VOLUME_VALUE = 0x7F
staticconstexpr

◆ SPEAKER_MIN_VOLUME_VALUE

constexpr uint16_t SPEAKER_MIN_VOLUME_VALUE = 0x2F
staticconstexpr

◆ volume_percent

int volume_percent = 100
protectedinherited

Last volume (in %) provided to setVolume()

◆ wire

i2c_bus_handle_t wire = nullptr
protectedinherited

◆ WSEQ_DONE_EINT_MASK

constexpr uint16_t WSEQ_DONE_EINT_MASK = 0x80
staticconstexpr

◆ WSEQ_ENA

constexpr uint16_t WSEQ_ENA = 0x20
staticconstexpr

The documentation for this class was generated from the following file: