arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AnalogDriverESP32V2 Class Referenceabstract

AnalogAudioStream: A very fast DAC using DMA using the new dac_continuous API. This implementation assumes that the issue with the different number of samples per channel has been resolved! https://github.com/espressif/esp-idf/issues/12337. More...

#include <AnalogDriverESP32V2.h>

Inheritance diagram for AnalogDriverESP32V2:
AnalogDriverBase

Classes

class  IO16Bit
 

Public Member Functions

 AnalogDriverESP32V2 ()=default
 Default constructor.
 
virtual ~AnalogDriverESP32V2 ()
 Destructor.
 
int available () override
 
virtual int availableForWrite ()
 
virtual bool begin (AnalogConfig cfg)=0
 
bool begin (AnalogConfigESP32V1 cfg)
 
void end () override
 
size_t readBytes (uint8_t *dest, size_t size_bytes) override
 
size_t write (const uint8_t *src, size_t size_bytes) override
 

Protected Member Functions

bool checkADCBitsPerSample ()
 
bool checkADCBitWidth ()
 
bool checkADCChannels ()
 
bool checkADCSampleRate ()
 
bool cleanup_rx ()
 Cleanup Analog to Digital Converter.
 
bool cleanup_tx ()
 Cleanup dac.
 
bool setup_rx ()
 
bool setup_tx ()
 
bool setupADCCalibration ()
 

Protected Attributes

bool active = false
 
bool active_rx = false
 
bool active_tx = false
 
adc_cali_handle_t adc_cali_handle = nullptr
 
adc_continuous_handle_t adc_handle = nullptr
 
ConverterAutoCenter auto_center
 
AnalogConfigESP32V1 cfg
 
NumberFormatConverterStream converter {io}
 
audio_tools::AnalogDriverESP32V2::IO16Bit this
 

Detailed Description

AnalogAudioStream: A very fast DAC using DMA using the new dac_continuous API. This implementation assumes that the issue with the different number of samples per channel has been resolved! https://github.com/espressif/esp-idf/issues/12337.

Author
Phil Schatzmann

Member Function Documentation

◆ available()

int available ( )
inlineoverridevirtual

Implements AnalogDriverBase.

◆ begin() [1/2]

virtual bool begin ( AnalogConfig  cfg)
pure virtualinherited

Implemented in AnalogDriverMBED, and AnalogDriverESP32.

◆ begin() [2/2]

bool begin ( AnalogConfigESP32V1  cfg)
inline

Start the Analog driver

◆ checkADCBitsPerSample()

bool checkADCBitsPerSample ( )
inlineprotected

◆ checkADCBitWidth()

bool checkADCBitWidth ( )
inlineprotected

◆ checkADCChannels()

bool checkADCChannels ( )
inlineprotected

◆ checkADCSampleRate()

bool checkADCSampleRate ( )
inlineprotected

◆ end()

void end ( )
inlineoverridevirtual

Stop and uninstalls the driver

Implements AnalogDriverBase.

◆ readBytes()

size_t readBytes ( uint8_t *  dest,
size_t  size_bytes 
)
inlineoverridevirtual

Implements AnalogDriverBase.

◆ setupADCCalibration()

bool setupADCCalibration ( )
inlineprotected

◆ write()

size_t write ( const uint8_t *  src,
size_t  size_bytes 
)
inlineoverridevirtual

Reimplemented from AnalogDriverBase.


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