arduino-audio-tools
|
Basic I2S API - for the Arduino Nano BLE Sense See https://content.arduino.cc/assets/Nano_BLE_MCU-nRF52840_PS_v1.1.pdf Douplex mode (RXTX_MODE) is currently not supported, but it should be quite easy to implement. More...
#include <I2SNanoSenseBLE.h>
Public Member Functions | |
int | available () |
int | availableForWrite () |
bool | begin (I2SConfigStd cfg) |
starts the I2S | |
bool | begin (RxTxMode mode=TX_MODE) |
starts the I2S with the default config in TX Mode | |
void | clearStream () |
Deactivate alternative API: don't forget to call begin() | |
I2SConfigStd | config () |
provides the actual configuration | |
I2SConfigStd | defaultConfig (RxTxMode mode) |
Provides the default configuration. | |
void | end () |
stops the I2S | |
size_t | readBytes (void *dest, size_t size_bytes) |
reads the data from the I2S buffer | |
bool | setAudioInfo (AudioInfo) |
Potentially updates the sample rate (if supported) | |
void | setBufferSize (int size) |
void | setStream (Stream &stream) |
alternative API which provides the data directly via a Stream | |
size_t | writeBytes (const void *src, size_t size_bytes) |
writes the data to the I2S buffer | |
Protected Member Functions | |
unsigned long | getINTENSET () |
Determine the INTENSET value. | |
int | getPinName (int pin) |
Provides the arduino or unconverted pin name. | |
void | releaseBuffers () |
Release buffers. | |
void | setupBitWidth (I2SConfigStd cfg) |
setup SWIDTH | |
bool | setupBuffers () |
dynamic buffer management | |
void | setupClock (I2SConfigStd cfg) |
setup MCKFREQ and RATIO | |
void | setupMode (I2SConfigStd cfg) |
setup format and align | |
void | setupPins (I2SConfigStd cfg) |
setup pins | |
bool | setupRxTx (I2SConfigStd cfg) |
setup TXEN or RXEN | |
void | startI2SActive () |
Start IRQ and I2S. | |
Protected Attributes | |
I2SConfigStd | cfg |
bool | is_active = false |
Friends | |
class | I2SStream |
Basic I2S API - for the Arduino Nano BLE Sense See https://content.arduino.cc/assets/Nano_BLE_MCU-nRF52840_PS_v1.1.pdf Douplex mode (RXTX_MODE) is currently not supported, but it should be quite easy to implement.