arduino-audio-tools
Public Member Functions | List of all members
audio_tools::I2S< T > Class Template Reference

A Simple I2S interface class for multiple Architectures that supports the reading and writing with a defined data type. More...

#include <I2SStream.h>

Inheritance diagram for audio_tools::I2S< T >:
audio_tools::I2SBase

Public Member Functions

 I2S ()
 Default Constructor.
 
 ~I2S ()
 Destructor.
 
bool begin (I2SConfig cfg)
 
size_t read (T(*src)[2], size_t frameCount)
 Reads data from I2S.
 
size_t write (T(*src)[2], size_t frameCount)
 writes the data to the I2S interface
 
- Public Member Functions inherited from audio_tools::I2SBase
int available ()
 we assume the data is already available in the buffer
 
int available ()
 we assume the data is already available in the buffer
 
int available ()
 
int available ()
 
int available ()
 we assume the data is already available in the buffer
 
int availableForWrite ()
 We limit the write size to the buffer size.
 
int availableForWrite ()
 We limit the write size to the buffer size.
 
int availableForWrite ()
 
int availableForWrite ()
 
int availableForWrite ()
 We limit the write size to the buffer size.
 
bool begin ()
 starts the DAC with the current config - if not started yet. If I2S has been started there is no action and we return true
 
bool begin ()
 
bool begin (I2SConfig cfg)
 starts the DAC
 
bool begin (I2SConfig cfg)
 starts the DAC
 
bool begin (I2SConfig cfg)
 starts the DAC
 
bool begin (I2SConfig cfg)
 starts the DAC
 
bool begin (I2SConfig cfg)
 starts the DAC
 
void begin (I2SConfig cfg)
 starts the DAC
 
bool begin (RxTxMode mode)
 starts the DAC with the default config
 
bool begin (RxTxMode mode)
 starts the DAC with the default config
 
bool begin (RxTxMode mode=TX_MODE)
 starts the DAC with the default config
 
bool begin (RxTxMode mode=TX_MODE)
 starts the DAC with the default config in TX Mode
 
bool begin (RxTxMode mode=TX_MODE)
 starts the DAC with the default config in TX Mode
 
void begin (RxTxMode mode=TX_MODE)
 starts the DAC with the default config in TX Mode
 
I2SConfig config ()
 provides the actual configuration
 
I2SConfig config ()
 provides the actual configuration
 
I2SConfig config ()
 provides the actual configuration
 
I2SConfig config ()
 provides the actual configuration
 
I2SConfig config ()
 provides the actual configuration
 
I2SConfig config ()
 provides the actual configuration
 
I2SConfig defaultConfig (RxTxMode mode)
 Provides the default configuration.
 
I2SConfig defaultConfig (RxTxMode mode)
 Provides the default configuration.
 
I2SConfig defaultConfig (RxTxMode mode)
 Provides the default configuration.
 
I2SConfig defaultConfig (RxTxMode mode)
 Provides the default configuration.
 
I2SConfig defaultConfig (RxTxMode mode)
 Provides the default configuration.
 
I2SConfig defaultConfig (RxTxMode mode=TX_MODE)
 Provides the default configuration.
 
void end ()
 stops the I2C and unistalls the driver
 
void end ()
 stops the I2C and unistalls the driver
 
void end ()
 stops the I2C and unistalls the driver
 
void end ()
 stops the I2C and unistalls the driver
 
void end ()
 stops the I2C and unistalls the driver
 
void end ()
 stops the I2C and unistalls the driver
 
size_t readBytes (void *dest, size_t size_bytes)
 
size_t readBytes (void *dest, size_t size_bytes)
 
size_t readBytes (void *dest, size_t size_bytes)
 
size_t readBytes (void *src, size_t size_bytes)
 
size_t writeBytes (const void *src, size_t size_bytes)
 writes the data to the I2S interface
 
size_t writeBytes (const void *src, size_t size_bytes)
 
size_t writeBytes (const void *src, size_t size_bytes)
 writes the data to the I2S interface
 
size_t writeBytes (const void *src, size_t size_bytes)
 writes the data to the I2S interface
 

Additional Inherited Members

- Protected Member Functions inherited from audio_tools::I2SBase
bool begin (I2SConfig cfg, int txPin, int rxPin)
 starts the DAC
 
uint32_t getDataFormat (I2SConfig &cfg)
 
uint32_t getMode (I2SConfig &cfg)
 
int getModeDigital (I2SConfig &cfg)
 
uint32_t getStandard (I2SConfig &cfg)
 
size_t readBytes (void *dest, size_t size_bytes)
 reads the data from the I2S interface
 
size_t readBytes (void *dest, size_t size_bytes)
 
void setChannels (int channels)
 
void setupBitWidth (I2SConfig cfg)
 
void setupClock (I2SConfig cfg)
 
void setupData (I2SConfig cfg)
 
void setupIRQ ()
 
void setupMode (I2SConfig cfg)
 
void setupPins (I2SConfig cfg)
 
void setupRxTx (I2SConfig cfg)
 
i2s_comm_format_t toCommFormat (I2SFormat mode)
 
i2s_mode_t toMode (I2SConfig &cfg)
 
size_t writeBytes (const void *src, size_t size_bytes)
 writes the data to the I2S interface
 
size_t writeBytes (const void *src, size_t size_bytes)
 writes the data to the I2S buffer
 
size_t writeExt (const void *src, size_t size_bytes)
 writes the data by making shure that we send 2 channels 16 bit data
 
- Static Protected Member Functions inherited from audio_tools::I2SBase
static size_t writeExpandChannel (i2s_port_t i2s_num, const int bits_per_sample, const void *src, size_t size_bytes)
 writes the data by making shure that we send 2 channels
 
- Protected Attributes inherited from audio_tools::I2SBase
I2SConfig cfg = defaultConfig(RX_MODE)
 
I2S_HandleTypeDef i2s
 
i2s_config_t i2s_config
 
i2s_port_t i2s_num
 
bool is_started = false
 

Detailed Description

template<typename T>
class audio_tools::I2S< T >

A Simple I2S interface class for multiple Architectures that supports the reading and writing with a defined data type.

Author
Phil Schatzmann

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