Basic I2S Parameters. More...
#include <I2S.h>
Data Fields | |
bool | trueI2sFormat |
bool | invertWS |
bool | isMSBFirst |
bool | isDMAUnused |
I2S_MemoryLength | memorySlotLength |
uint8_t | beforeWordPadding |
uint8_t | afterWordPadding |
uint8_t | bitsPerWord |
I2S_Role | moduleRole |
I2S_SamplingEdge | samplingEdge |
I2S_DataInterfaceUse | SD0Use |
I2S_DataInterfaceUse | SD1Use |
I2S_ChannelConfig | SD0Channels |
I2S_ChannelConfig | SD1Channels |
I2S_PhaseType | phaseType |
uint16_t | fixedBufferLength |
uint16_t | startUpDelay |
uint16_t | CCLKDivider |
uint32_t | samplingFrequency |
I2S_Callback | readCallback |
I2S_Callback | writeCallback |
I2S_Callback | errorCallback |
void * | custom |
Basic I2S Parameters.
I2S parameters are used to with the I2S_open() call. Default values for these parameters are set using I2S_Params_init().
bool I2S_Params::trueI2sFormat |
Activate "true I2S format". false: Data are read/write on the data lines from the first SCK period of the WS half-period to the last SCK edge of the WS half-period. true: Data are read/write on the data lines from the second SCK period of the WS half-period to the first SCK edge of the next WS half-period. If no padding is activated, this corresponds to the I2S standard.
bool I2S_Params::invertWS |
WS must be internally inverted when using I2S data format. false: The WS signal is not internally inverted. true: The WS signal is internally inverted.
bool I2S_Params::isMSBFirst |
Endianness selection. Not available on CC26XX. false: The samples are transmitted LSB first. true: The samples are transmitted MSB first.
bool I2S_Params::isDMAUnused |
Selection between DMA transmissions and CPU transmissions. false: Transmission are performed by DMA. true: Transmission are performed by CPU. Not available for CC26XX: all transmissions are performed by CPU.
I2S_MemoryLength I2S_Params::memorySlotLength |
Width of stored samples. It should be consistent with the word length. I2S_MEMORY_LENGTH_8BITS: Memory length is 8 bits (not available for CC26XX). I2S_MEMORY_LENGTH_16BITS: Memory length is 16 bits. I2S_MEMORY_LENGTH_24BITS: Memory length is 24 bits. I2S_MEMORY_LENGTH_32BITS: Memory length is 32 bits (not available for CC26XX).
uint8_t I2S_Params::beforeWordPadding |
Number of SCK periods between the first WS edge and the MSB of the first audio channel data transferred during the phase.
uint8_t I2S_Params::afterWordPadding |
Number of SCK periods between the LSB of the an audio channel and the MSB of the next audio channel.
uint8_t I2S_Params::bitsPerWord |
Bits per sample (Word length): must be between 8 and 24 bits.
I2S_Role I2S_Params::moduleRole |
Select if the I2S module is a Target or a Controller.
I2S_SamplingEdge I2S_Params::samplingEdge |
Select edge sampling type.
I2S_DataInterfaceUse I2S_Params::SD0Use |
Select if SD0 is an input, an output or disabled.
I2S_DataInterfaceUse I2S_Params::SD1Use |
Select if SD1 is an input, an output or disabled.
I2S_ChannelConfig I2S_Params::SD0Channels |
This parameter is a bit mask indicating which channels are valid on SD0. If phase type is "dual", maximum channels number is two. Valid channels on SD1 and SD0 can be different. For dual phase mode:
For single phase mode:
I2S_ChannelConfig I2S_Params::SD1Channels |
This parameter is a bit mask indicating which channels are valid on SD1. If phase type is "dual", maximum channels number is two. Valid channels on SD1 and SD0 can be different. For dual phase mode:
For single phase mode:
I2S_PhaseType I2S_Params::phaseType |
Select phase type.
This parameter must not be considered on CC32XX. This chip only allows dual phase formats.
uint16_t I2S_Params::fixedBufferLength |
Number of consecutive bytes of the samples buffers. This field must be set to a value x different from 0. All the data buffers used (both for input and output) must contain N*x bytes (with N an integer verifying N>0).
uint16_t I2S_Params::startUpDelay |
Number of WS periods to wait before the first transfer.
uint16_t I2S_Params::CCLKDivider |
Select the frequency divider for CCLK signal. Final value of CCLK is 48MHz/CCLKDivider. Value must be selected between 2 and 1024.
uint32_t I2S_Params::samplingFrequency |
I2S sampling frequency configuration in samples/second. SCK frequency limits:
I2S_Callback I2S_Params::readCallback |
Pointer to read callback. Cannot be NULL if a read interface is activated.
I2S_Callback I2S_Params::writeCallback |
Pointer to write callback. Cannot be NULL if a write interface is activated.
I2S_Callback I2S_Params::errorCallback |
Pointer to error callback. Cannot be NULL.
void* I2S_Params::custom |
Pointer to device specific custom params