Data Fields
I2S_Params Struct Reference

Basic I2S Parameters. More...

#include <I2S.h>

Collaboration diagram for I2S_Params:
Collaboration graph
[legend]

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
 

Detailed Description

Basic I2S Parameters.

I2S parameters are used to with the I2S_open() call. Default values for these parameters are set using I2S_Params_init().

See also
I2S_Params_init()

Field Documentation

§ trueI2sFormat

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.

§ invertWS

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.

§ isMSBFirst

bool I2S_Params::isMSBFirst

Endianness selection.

  • false: The samples are transmitted LSB first.
  • true: The samples are transmitted MSB first.
Warning
Not all devices support selecting endianness. Please refer to the device-specific documentation for possible limitations.

§ isDMAUnused

bool I2S_Params::isDMAUnused

Selection between DMA transmissions and CPU transmissions.

  • false: Transmission are performed by DMA.
  • true: Transmission are performed by CPU.
Warning
Not all devices support selecting between DMA and CPU transmissions. Please refer to the device-specific documentation for possible limitations.

§ memorySlotLength

I2S_MemoryLength I2S_Params::memorySlotLength

Width of stored samples. It should be consistent with the word length.

§ beforeWordPadding

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.

§ afterWordPadding

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.

§ bitsPerWord

uint8_t I2S_Params::bitsPerWord

Bits per sample (Word length): must be between 8 and 24 bits.

§ moduleRole

I2S_Role I2S_Params::moduleRole

Select if the I2S module is a Target or a Controller.

§ samplingEdge

I2S_SamplingEdge I2S_Params::samplingEdge

Select edge sampling type.

§ SD0Use

I2S_DataInterfaceUse I2S_Params::SD0Use

Select if SD0 is an input, an output or disabled.

§ SD1Use

I2S_DataInterfaceUse I2S_Params::SD1Use

Select if SD1 is an input, an output or disabled.

§ SD0Channels

I2S_ChannelConfig I2S_Params::SD0Channels

This parameter is indicating which channels are valid on SD0. Valid channels on SD1 and SD0 can be different.

Refer to I2S_ChannelConfig for a list of possible values, and for which phase types they can be used.

§ SD1Channels

I2S_ChannelConfig I2S_Params::SD1Channels

This parameter is indicating which channels are valid on SD1. Valid channels on SD1 and SD0 can be different.

Refer to I2S_ChannelConfig for a list of possible values, and for which phase types they can be used.

§ phaseType

I2S_PhaseType I2S_Params::phaseType

Select phase type.

§ fixedBufferLength

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 satisfying N>0).

§ startUpDelay

uint16_t I2S_Params::startUpDelay

Number of WS periods to wait before the first transfer.

§ CCLKDivider

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.

§ samplingFrequency

uint32_t I2S_Params::samplingFrequency

I2S sampling frequency configuration in samples/second.

The selected sampling frequency must ensure that the SCK frequency will be inside of its device-specific limits. Please refer to the device-specific documentation for the lower and upper limits of the SCK frequency.

§ readCallback

I2S_Callback I2S_Params::readCallback

Pointer to read callback. Cannot be NULL if a read interface is activated.

§ writeCallback

I2S_Callback I2S_Params::writeCallback

Pointer to write callback. Cannot be NULL if a write interface is activated.

§ errorCallback

I2S_Callback I2S_Params::errorCallback

Pointer to error callback. Cannot be NULL.

§ custom

void* I2S_Params::custom

Pointer to device specific custom params


The documentation for this struct was generated from the following file:
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale