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

#include <PCM3168.h>

Public Types

enum  FMT {
  I2S24bit = 0 , Left24bit , Right24bit , Right16bit ,
  I2SDSP24bit , LeftDSP24bit , I2STDM24bit , LeftTDM24bit ,
  I2SHighSpeedTDM24bit , LeftHighSpeedTDM24bit
}
 

Public Member Functions

 PCM3168 ()=default
 
bool begin (FMT fmt=I2SHighSpeedTDM24bit)
 
bool end (void)
 
bool invertADC (uint32_t data)
 
bool invertDAC (uint32_t data)
 
void setAddress (uint8_t addr)
 
bool setInputVolume (float level)
 
bool setInputVolume (int channel, float level)
 
bool setMute (bool mute)
 
bool setMute (int channel, bool mute)
 
bool setMuteADC (bool mute)
 
bool setVolume (float level)
 
bool setVolume (int channel, float level)
 
void setWire (i2c_bus_handle_t w)
 

Protected Member Functions

uint8_t bit_set_to (uint8_t number, uint8_t n, bool x)
 
int32_t inputlevelbyte (float level)
 
bool inputLevelInteger (int channel, int32_t n)
 
bool inputLevelInteger (int32_t n)
 
uint32_t volumebyte (float level)
 
bool volumeInteger (int channel, uint32_t n)
 
bool volumeInteger (uint32_t n)
 
bool write (uint32_t address, const void *data, uint32_t len)
 
bool write (uint32_t address, uint32_t data)
 

Protected Attributes

const int ADC_CHANNELS_MAX = 6
 
const int DAC_CHANNELS_MAX = 8
 
FMT fmt
 
uint8_t i2c_addr = I2C_BASE
 
const uint8_t I2C_BASE = 0x44
 
uint8_t mute_adc = 0
 
uint8_t mute_dac = 0
 
i2c_bus_handle_t wire = nullptr
 

Member Enumeration Documentation

◆ FMT

enum FMT
Enumerator
I2S24bit 
Left24bit 
Right24bit 
Right16bit 
I2SDSP24bit 
LeftDSP24bit 
I2STDM24bit 
LeftTDM24bit 
I2SHighSpeedTDM24bit 
LeftHighSpeedTDM24bit 

Constructor & Destructor Documentation

◆ PCM3168()

PCM3168 ( )
default

Member Function Documentation

◆ begin()

bool begin ( FMT  fmt = I2SHighSpeedTDM24bit)
inline

◆ bit_set_to()

uint8_t bit_set_to ( uint8_t  number,
uint8_t  n,
bool  x 
)
inlineprotected

◆ end()

bool end ( void  )
inline

◆ inputlevelbyte()

int32_t inputlevelbyte ( float  level)
inlineprotected

◆ inputLevelInteger() [1/2]

bool inputLevelInteger ( int  channel,
int32_t  n 
)
inlineprotected

◆ inputLevelInteger() [2/2]

bool inputLevelInteger ( int32_t  n)
inlineprotected

◆ invertADC()

bool invertADC ( uint32_t  data)
inline

◆ invertDAC()

bool invertDAC ( uint32_t  data)
inline

◆ setAddress()

void setAddress ( uint8_t  addr)
inline

◆ setInputVolume() [1/2]

bool setInputVolume ( float  level)
inline

◆ setInputVolume() [2/2]

bool setInputVolume ( int  channel,
float  level 
)
inline

◆ setMute() [1/2]

bool setMute ( bool  mute)
inline

◆ setMute() [2/2]

bool setMute ( int  channel,
bool  mute 
)
inline

◆ setMuteADC()

bool setMuteADC ( bool  mute)
inline

◆ setVolume() [1/2]

bool setVolume ( float  level)
inline

◆ setVolume() [2/2]

bool setVolume ( int  channel,
float  level 
)
inline

◆ setWire()

void setWire ( i2c_bus_handle_t  w)
inline

◆ volumebyte()

uint32_t volumebyte ( float  level)
inlineprotected

◆ volumeInteger() [1/2]

bool volumeInteger ( int  channel,
uint32_t  n 
)
inlineprotected

◆ volumeInteger() [2/2]

bool volumeInteger ( uint32_t  n)
inlineprotected

◆ write() [1/2]

bool write ( uint32_t  address,
const void *  data,
uint32_t  len 
)
inlineprotected

◆ write() [2/2]

bool write ( uint32_t  address,
uint32_t  data 
)
inlineprotected

Member Data Documentation

◆ ADC_CHANNELS_MAX

const int ADC_CHANNELS_MAX = 6
protected

◆ DAC_CHANNELS_MAX

const int DAC_CHANNELS_MAX = 8
protected

◆ fmt

FMT fmt
protected

◆ i2c_addr

uint8_t i2c_addr = I2C_BASE
protected

◆ I2C_BASE

const uint8_t I2C_BASE = 0x44
protected

◆ mute_adc

uint8_t mute_adc = 0
protected

◆ mute_dac

uint8_t mute_dac = 0
protected

◆ wire

i2c_bus_handle_t wire = nullptr
protected

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