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 MCLKDivider
 
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. Not available on CC26XX. false: The samples are transmitted LSB first. true: The samples are transmitted MSB first.

§ isDMAUnused

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.

§ memorySlotLength

I2S_MemoryLength I2S_Params::memorySlotLength

Memory buffer used. 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).

§ 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 first WS edge and the MSB of the first audio channel data transferred during the phase.

§ 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 Slave or a Master.

  • I2S_SLAVE: The device is a slave (clocks are generated externally).
  • I2S_MASTER: The device is a master (clocks are generated internally).

§ 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 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:

  • I2S_CHANNELS_NONE: No channel activated: read -> I2S does not receive anything (no buffer consumption) write -> I2S does not send anything (no buffer consumption)
  • I2S_CHANNELS_MONO: Only channel 1 is activated: read -> I2S only reads channel 1 write -> I2S transmits the data on channel 1 and duplicates it on channel 2
  • I2S_CHANNELS_MONO_INV: Only channel 2 is activated: read -> I2S only reads channel 2 write -> I2S transmits the data on channel 2 and duplicates it on the channel 1 of the next word
  • I2S_CHANNELS_STEREO: STEREO: read -> I2S reads both channel 1 and channel 2 write -> I2S transmits data both on channel 1 and channel 2

For single phase mode:

§ SD1Channels

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:

  • I2S_CHANNELS_NONE: No channel activated: read -> I2S does not receive anything (no buffer consumption) write -> I2S does not send anything (no buffer consumption)
  • I2S_CHANNELS_MONO: Only channel 1 is activated: read -> I2S only reads channel 1 write -> I2S transmits the data on channel 1 and duplicates it on channel 2
  • I2S_CHANNELS_MONO_INV: Only channel 2 is activated: read -> I2S only reads channel 2 write -> I2S transmits the data on channel 2 and duplicates it on the channel 1 of the next word
  • I2S_CHANNELS_STEREO: STEREO: read -> I2S reads both channel 1 and channel 2 write -> I2S transmits data both on channel 1 and channel 2

For single phase mode:

§ phaseType

I2S_PhaseType I2S_Params::phaseType

Select phase type.

This parameter must not be considered on CC32XX. This chip only allows dual phase formats.

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

§ startUpDelay

uint16_t I2S_Params::startUpDelay

Time (in number of WS cycles) to wait before the first transfer.

§ MCLKDivider

uint16_t I2S_Params::MCLKDivider

Select the frequency divider for MCLK signal. Final value of MCLK is 48MHz/MCLKDivider. Value must be selected between 2 and 1024.

§ samplingFrequency

uint32_t I2S_Params::samplingFrequency

I2S sampling frequency configuration in samples/second. SCK frequency limits:

  • For CC26XX, SCK frequency should be between 47 kHz and 4 MHz.
  • For CC32XX, SCK frequency should be between 57 Hz and 8 MHz.

§ 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-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale