|
arduino-audio-tools
|
Basic I2S API - for the ESP32. If we receive 1 channel, we expand the result to 2 channels. More...
#include <I2SESP32.h>
Public Member Functions | |
| int | available () |
| we assume the data is already available in the buffer | |
| int | availableForWrite () |
| We limit the write size to the buffer size. | |
| bool | begin () |
| bool | begin (I2SConfigESP32 cfg) |
| starts the DAC | |
| bool | begin (RxTxMode mode) |
| starts the DAC with the default config | |
| I2SConfigESP32 | config () |
| provides the actual configuration | |
| I2SConfigESP32 | defaultConfig (RxTxMode mode) |
| Provides the default configuration. | |
| void | end () |
| stops the I2C and unistalls the driver | |
| size_t | readBytes (void *dest, size_t size_bytes) |
| bool | setAudioInfo (AudioInfo info) |
| Potentially updates the sample rate (if supported) | |
| void | setWaitTimeReadMs (TickType_t ms) |
| void | setWaitTimeWriteMs (TickType_t ms) |
| size_t | writeBytes (const void *src, size_t size_bytes) |
| writes the data to the I2S interface | |
Protected Member Functions | |
| bool | begin (I2SConfigESP32 cfg, int txPin, int rxPin) |
| starts the DAC | |
| int | getModeDigital (I2SConfigESP32 &cfg) |
| bool | isNoChannelConversion (I2SConfigESP32 cfg) |
| void | setChannels (int channels) |
| i2s_comm_format_t | toCommFormat (I2SFormat mode) |
| i2s_mode_t | toMode (I2SConfigESP32 &cfg) |
| 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 sure that we send 2 channels | |
Protected Attributes | |
| I2SConfigESP32 | cfg = defaultConfig(RX_MODE) |
| i2s_config_t | i2s_config |
| i2s_port_t | i2s_num |
| bool | is_started = false |
| TickType_t | ticks_to_wait_read = portMAX_DELAY |
| TickType_t | ticks_to_wait_write = portMAX_DELAY |
Friends | |
| class | AnalogAudio |
| class | AudioKitStream |
Basic I2S API - for the ESP32. If we receive 1 channel, we expand the result to 2 channels.
|
inline |
we assume the data is already available in the buffer
|
inline |
We limit the write size to the buffer size.
|
inline |
starts the DAC with the current config - if not started yet. If I2S has been started there is no action and we return true
|
inline |
starts the DAC
|
inlineprotected |
starts the DAC
|
inline |
provides the actual configuration
|
inline |
Provides the default configuration.
|
inline |
stops the I2C and unistalls the driver
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
writes the data to the I2S interface
|
inlineprotected |
writes the data by making sure that we send 2 channels
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |