arduino-audio-tools
Loading...
Searching...
No Matches
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.
 
void cleanupADCCalibration ()
 
int configuredRxBytes () const
 
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
 
bool adc_cali_handle_active = false
 
adc_continuous_handle_t adc_handle = nullptr
 
ConverterAutoCenter auto_center
 
AnalogConfigESP32V1 cfg
 
NumberFormatConverterStream converter {io}
 
int rx_pins_attached = 0
 
bool rx_started = false
 
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

Constructor & Destructor Documentation

◆ AnalogDriverESP32V2()

AnalogDriverESP32V2 ( )
default

Default constructor.

◆ ~AnalogDriverESP32V2()

virtual ~AnalogDriverESP32V2 ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ available()

int available ( )
inlineoverridevirtual

Implements AnalogDriverBase.

◆ availableForWrite()

virtual int availableForWrite ( )
inlinevirtualinherited

Reimplemented in AnalogDriverMBED, and AnalogDriverArduino.

◆ begin() [1/2]

virtual bool begin ( AnalogConfig  cfg)
pure virtualinherited

◆ 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

◆ cleanup_rx()

bool cleanup_rx ( )
inlineprotected

Cleanup Analog to Digital Converter.

◆ cleanup_tx()

bool cleanup_tx ( )
inlineprotected

Cleanup dac.

◆ cleanupADCCalibration()

void cleanupADCCalibration ( )
inlineprotected

◆ configuredRxBytes()

int configuredRxBytes ( ) const
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.

◆ setup_rx()

bool setup_rx ( )
inlineprotected

◆ setup_tx()

bool setup_tx ( )
inlineprotected

◆ setupADCCalibration()

bool setupADCCalibration ( )
inlineprotected

◆ write()

size_t write ( const uint8_t src,
size_t  size_bytes 
)
inlineoverridevirtual

Reimplemented from AnalogDriverBase.

Member Data Documentation

◆ active

bool active = false
protected

◆ active_rx

bool active_rx = false
protected

◆ active_tx

bool active_tx = false
protected

◆ adc_cali_handle

adc_cali_handle_t adc_cali_handle = nullptr
protected

◆ adc_cali_handle_active

bool adc_cali_handle_active = false
protected

◆ adc_handle

adc_continuous_handle_t adc_handle = nullptr
protected

◆ auto_center

ConverterAutoCenter auto_center
protected

◆ cfg

AnalogConfigESP32V1 cfg
protected

◆ converter

NumberFormatConverterStream converter {io}
protected

◆ rx_pins_attached

int rx_pins_attached = 0
protected

◆ rx_started

bool rx_started = false
protected

◆ this


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