|
arduino-audio-tools
|
Basic I2S API for Zephyr based targets. More...
#include <I2SDriverZephyr.h>
Public Member Functions | |
| int | available () |
| int | availableForWrite () |
| virtual bool | begin (I2SConfig cfg)=0 |
| bool | begin (I2SConfigZephyr cfg) |
| starts the DAC with the current config | |
| bool | begin (RxTxMode mode=TX_MODE) |
| starts the DAC with the default config | |
| I2SConfigZephyr | config () |
| provides the actual configuration | |
| I2SConfigZephyr | defaultConfig (RxTxMode mode) |
| Provides the default configuration. | |
| void | end () |
| stops the I2S interface | |
| size_t | readBytes (void *dest, size_t size_bytes) |
| bool | setAudioInfo (AudioInfo info) |
| Potentially updates the sample rate (if supported) | |
| size_t | writeBytes (const void *src, size_t size_bytes) |
| writes the data to the I2S interface | |
Protected Member Functions | |
| i2s_config | buildI2SConfig (const I2SConfigZephyr &cfg, k_mem_slab *mem_slab) |
| void | enableMclkRuntime (void) |
| bool | initSlabs (const I2SConfigZephyr &cfg) |
| bool | resolveDevice () |
| bool | startConfiguredStreams () |
Protected Attributes | |
| I2SConfigZephyr | cfg = defaultConfig(RXTX_MODE) |
| const device * | i2s_dev = nullptr |
| bool | is_started = false |
| i2s_config | rx_cfg {} |
| k_mem_slab | rx_slab |
| Vector< uint8_t > | rx_slab_buffer {0} |
| bool | slabs_initialized = false |
| i2s_config | tx_cfg {} |
| k_mem_slab | tx_slab |
| Vector< uint8_t > | tx_slab_buffer {0} |
Friends | |
| class | I2SStream |
Basic I2S API for Zephyr based targets.
|
inlinevirtual |
Implements I2SDriverBase.
|
inlinevirtual |
Implements I2SDriverBase.
Implemented in I2SDriverESP32.
|
inline |
starts the DAC with the current config
|
inlineprotected |
|
inlinevirtual |
provides the actual configuration
Implements I2SDriverBase.
|
inlinevirtual |
Provides the default configuration.
Implements I2SDriverBase.
ESP32 specific function to enable MCLK output at runtime, since Zephyr's I2S driver doesn't do this automatically.
|
inlinevirtual |
stops the I2S interface
Implements I2SDriverBase.
|
inlineprotected |
Implements I2SDriverBase.
|
inlineprotected |
Potentially updates the sample rate (if supported)
Implements I2SDriverBase.
|
inlineprotected |
writes the data to the I2S interface
Implements I2SDriverBase.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |