CC27xxDriverLibrary
[i2s.h] Inter-IC Sound
Collaboration diagram for [i2s.h] Inter-IC Sound:

Macros

#define I2S_SD0_DIS   I2S_AIFDIRCFG_AD0_DIS
 SD0 is disabled. More...
 
#define I2S_SD0_IN   I2S_AIFDIRCFG_AD0_IN
 SD0 is an input. More...
 
#define I2S_SD0_OUT   I2S_AIFDIRCFG_AD0_OUT
 SD0 is an output. More...
 
#define I2S_SD1_DIS   I2S_AIFDIRCFG_AD1_DIS
 SD1 is disabled. More...
 
#define I2S_SD1_IN   I2S_AIFDIRCFG_AD1_IN
 SD1 is an input. More...
 
#define I2S_SD1_OUT   I2S_AIFDIRCFG_AD1_OUT
 SD1 is an output. More...
 
#define I2S_CHAN0_MASK   0x00000001
 
#define I2S_CHAN1_MASK   0x00000002
 
#define I2S_CHAN2_MASK   0x00000004
 
#define I2S_CHAN3_MASK   0x00000008
 
#define I2S_CHAN4_MASK   0x00000010
 
#define I2S_CHAN5_MASK   0x00000020
 
#define I2S_CHAN6_MASK   0x00000040
 
#define I2S_CHAN7_MASK   0x00000080
 
#define I2S_MEM_LENGTH_16   I2S_FMTCFG_MEMLEN32_DIS
 16 bit size of word in memory More...
 
#define I2S_MEM_LENGTH_32   I2S_FMTCFG_MEMLEN32_EN
 24 bit size of word in memory More...
 
#define I2S_POS_EDGE   I2S_FMTCFG_SMPLEDGE_POSEDGE
 Sample on positive edge. More...
 
#define I2S_NEG_EDGE   I2S_FMTCFG_SMPLEDGE_NEGEDGE
 Sample on negative edge. More...
 
#define I2S_STMP_SATURATION   0x0000FFFF
 The saturation value used when calculating the sample stamp. More...
 
#define I2S_INT_XCNT_CAPTURE   I2S_IRQFLAGS_XCNTCAPT
 MCUCLK Capture. More...
 
#define I2S_INT_DMA_IN   I2S_IRQFLAGS_DMAIN
 DMA output buffer full interrupt. More...
 
#define I2S_INT_DMA_OUT   I2S_IRQFLAGS_DMAOUT
 DMA input buffer empty interrupt. More...
 
#define I2S_INT_TIMEOUT   I2S_IRQFLAGS_WCLKTIMEOUT
 Word Clock Timeout. More...
 
#define I2S_INT_BUS_ERR   I2S_IRQFLAGS_BUSERR
 DMA Bus error. More...
 
#define I2S_INT_WCLK_ERR   I2S_IRQFLAGS_WCLKERR
 Word Clock error. More...
 
#define I2S_INT_PTR_ERR   I2S_IRQFLAGS_PTRERR
 Data pointer error (DMA data was not updated in time) More...
 
#define I2S_INT_ALL
 All interrupts. More...
 

Functions

__STATIC_INLINE void I2SEnableInt (uint32_t base, uint32_t intFlags)
 Enables individual I2S interrupt sources. More...
 
__STATIC_INLINE void I2SDisableInt (uint32_t base, uint32_t intFlags)
 Disables individual I2S interrupt sources. More...
 
__STATIC_INLINE uint32_t I2SIntStatus (uint32_t base, bool masked)
 Gets the current interrupt status. More...
 
__STATIC_INLINE void I2SClearInt (uint32_t base, uint32_t intFlags)
 Clears I2S interrupt sources. More...
 
__STATIC_INLINE void I2SEnableSampleStamp (uint32_t base)
 Enable the Sample Stamp generator. More...
 
__STATIC_INLINE void I2SDisableSampleStamp (uint32_t base)
 Disable the Sample Stamp generator. More...
 
uint32_t I2SGetSampleStamp (uint32_t base, uint32_t channel)
 Get the current value of a sample stamp counter. More...
 
__STATIC_INLINE void I2SStart (uint32_t base, uint16_t dmaLength)
 Starts the I2S. More...
 
__STATIC_INLINE void I2SStop (uint32_t base)
 Stops the I2S module for operation. More...
 
__STATIC_INLINE void I2SConfigureFormat (uint32_t base, uint8_t dataDelay, uint32_t memoryLength, uint32_t samplingEdge, bool dualPhase, uint8_t bitsPerSample)
 Configure the serial format of the I2S module. More...
 
__STATIC_INLINE void I2SConfigureFrame (uint32_t base, uint8_t sd0Usage, uint8_t sd0Channels, uint8_t sd1Usage, uint8_t sd1Channels)
 Setup the two interfaces SD0 and SD1 (also called AD0 and AD1). More...
 
__STATIC_INLINE void I2SConfigureClocks (uint32_t base, bool isController, bool invertWclk, bool dualPhase, uint32_t cclkDiv, uint32_t wclkDiv, uint32_t bclkDiv)
 Configure the I2S clocks (CCLK, WCLK and BCLK). More...
 
__STATIC_INLINE void I2SEnableControllerClocks (uint32_t base)
 Enable the I2S controller clocks (CCLK, WCLK and BCLK). More...
 
__STATIC_INLINE void I2SDisableControllerClocks (uint32_t base)
 Disable the I2S controller clocks (CCLK, WCLK and BCLK). More...
 
__STATIC_INLINE void I2SSetInPointer (uint32_t base, uint32_t nextPointer)
 Set the next input buffer pointer. More...
 
__STATIC_INLINE void I2SSetOutPointer (uint32_t base, uint32_t nextPointer)
 Set the next output buffer pointer. More...
 
__STATIC_INLINE uint32_t I2SGetInPointerNext (uint32_t base)
 Get value of the next input pointer. More...
 
__STATIC_INLINE uint32_t I2SGetOutPointerNext (uint32_t base)
 Get value of the next output pointer. More...
 
__STATIC_INLINE uint32_t I2SGetInPointer (uint32_t base)
 Get value of the current input pointer. More...
 
__STATIC_INLINE uint32_t I2SGetOutPointer (uint32_t base)
 Get value of the current output pointer. More...
 
__STATIC_INLINE void I2SConfigureInSampleStampTrigger (uint32_t base, uint16_t trigValue)
 Configure the input sample stamp trigger. More...
 
__STATIC_INLINE void I2SConfigureOutSampleStampTrigger (uint32_t base, uint16_t trigValue)
 Configure the output sample stamp trigger. More...
 
__STATIC_INLINE void I2SConfigureWclkCounterPeriod (uint32_t base, uint16_t period)
 Configure the WCLK counter period. More...
 
__STATIC_INLINE void I2SConfigureWclkCounter (uint32_t base, int16_t value)
 Confiugre the WCLK counter value. More...
 
__STATIC_INLINE void I2SResetWclkCounter (uint32_t base)
 Reset the WCLK count. More...
 

Detailed Description

Introduction

The I2S API provides a set of functions for using the I2S module. This module provides a standardized serial interface to transfer audio samples from and to external audio devices such as a codec, DAC, or ADC.

The I2S module has the following features:

The I2S module is configured through the functions I2SConfigureFormat(), I2SConfigureFrame() and I2SConfigureClocks(). If controller mode is used, then the internally generated clocks can be enabled and disabled using I2SEnableControllerClocks() and I2SDisableControllerClocks(), respectively. Transfers are enabled using I2SStart(). Transfers are disabled using I2SStop(). Please note that a specific procedure exists to disable transfers without losing data (refer to I2SStop()).

Data are transmitted using the two double-buffered pointers. For each interface, two registers are set with the address of the data to transfer. These registers are named INPTR and INPTRNEXT for the input interface and OUTPTR and OUTPTRNEXT for the output. When PTR is consumed, the hardware copies the content of PTRNEXT into PTR and the next transfer begins. The address of the next value to write or to read in memory (i.e. to receive or to send out) is set using I2SSetInPointer() and I2SSetOutPointer(). The values stored in INPTRNEXT, OUTPTRNEXT, INPTR and OUTPTR can be read using I2SGetInPointerNext(), I2SGetOutPointerNext(), I2SGetInPointer() and I2SGetOutPointer() functions.

Interrupts can help the user to refresh pointers on time. Interrupts can also be used to detect I2S errors. I2SEnableInt() and I2SDisableInt() activate and deactivate interrupt(s). Interrupt status can be read through I2SIntStatus() and pending interrupt flags can be cleared by I2SClearInt() function.

The sample stamps generator can be configured to start the emission or the reception of the data at specified WCLK counter trigger values using I2SConfigureInSampleStampTrigger(), I2SConfigureOutSampleStampTrigger(), I2SResetWclkCounter() and I2SConfigureWclkCounter(). The current sample stamp can be computed using I2SGetSampleStamp(). To finish, the sample stamps generator can be enabled and disabled using the following functions: I2SEnableSampleStamp() and I2SDisableSampleStamp(). The sample stamps generator must be enabled prior to any transfer.

API

Functions to perform I2S configuration:

Functions to perform transfers:

Functions to handle interruptions:

Functions to handle sample stamps:

Macro Definition Documentation

§ I2S_SD0_DIS

#define I2S_SD0_DIS   I2S_AIFDIRCFG_AD0_DIS

SD0 is disabled.

§ I2S_SD0_IN

#define I2S_SD0_IN   I2S_AIFDIRCFG_AD0_IN

SD0 is an input.

§ I2S_SD0_OUT

#define I2S_SD0_OUT   I2S_AIFDIRCFG_AD0_OUT

SD0 is an output.

§ I2S_SD1_DIS

#define I2S_SD1_DIS   I2S_AIFDIRCFG_AD1_DIS

SD1 is disabled.

§ I2S_SD1_IN

#define I2S_SD1_IN   I2S_AIFDIRCFG_AD1_IN

SD1 is an input.

§ I2S_SD1_OUT

#define I2S_SD1_OUT   I2S_AIFDIRCFG_AD1_OUT

SD1 is an output.

§ I2S_CHAN0_MASK

#define I2S_CHAN0_MASK   0x00000001

§ I2S_CHAN1_MASK

#define I2S_CHAN1_MASK   0x00000002

§ I2S_CHAN2_MASK

#define I2S_CHAN2_MASK   0x00000004

§ I2S_CHAN3_MASK

#define I2S_CHAN3_MASK   0x00000008

§ I2S_CHAN4_MASK

#define I2S_CHAN4_MASK   0x00000010

§ I2S_CHAN5_MASK

#define I2S_CHAN5_MASK   0x00000020

§ I2S_CHAN6_MASK

#define I2S_CHAN6_MASK   0x00000040

§ I2S_CHAN7_MASK

#define I2S_CHAN7_MASK   0x00000080

§ I2S_MEM_LENGTH_16

#define I2S_MEM_LENGTH_16   I2S_FMTCFG_MEMLEN32_DIS

16 bit size of word in memory

§ I2S_MEM_LENGTH_32

#define I2S_MEM_LENGTH_32   I2S_FMTCFG_MEMLEN32_EN

24 bit size of word in memory

§ I2S_POS_EDGE

#define I2S_POS_EDGE   I2S_FMTCFG_SMPLEDGE_POSEDGE

Sample on positive edge.

§ I2S_NEG_EDGE

#define I2S_NEG_EDGE   I2S_FMTCFG_SMPLEDGE_NEGEDGE

Sample on negative edge.

§ I2S_STMP_SATURATION

#define I2S_STMP_SATURATION   0x0000FFFF

The saturation value used when calculating the sample stamp.

Referenced by I2SGetSampleStamp().

§ I2S_INT_XCNT_CAPTURE

#define I2S_INT_XCNT_CAPTURE   I2S_IRQFLAGS_XCNTCAPT

MCUCLK Capture.

§ I2S_INT_DMA_IN

#define I2S_INT_DMA_IN   I2S_IRQFLAGS_DMAIN

DMA output buffer full interrupt.

§ I2S_INT_DMA_OUT

#define I2S_INT_DMA_OUT   I2S_IRQFLAGS_DMAOUT

DMA input buffer empty interrupt.

§ I2S_INT_TIMEOUT

#define I2S_INT_TIMEOUT   I2S_IRQFLAGS_WCLKTIMEOUT

Word Clock Timeout.

§ I2S_INT_BUS_ERR

#define I2S_INT_BUS_ERR   I2S_IRQFLAGS_BUSERR

DMA Bus error.

§ I2S_INT_WCLK_ERR

#define I2S_INT_WCLK_ERR   I2S_IRQFLAGS_WCLKERR

Word Clock error.

§ I2S_INT_PTR_ERR

#define I2S_INT_PTR_ERR   I2S_IRQFLAGS_PTRERR

Data pointer error (DMA data was not updated in time)

§ I2S_INT_ALL

#define I2S_INT_ALL
Value:
I2S_INT_PTR_ERR)
#define I2S_INT_XCNT_CAPTURE
MCUCLK Capture.
Definition: i2s.h:115
#define I2S_INT_TIMEOUT
Word Clock Timeout.
Definition: i2s.h:118
#define I2S_INT_BUS_ERR
DMA Bus error.
Definition: i2s.h:119
#define I2S_INT_DMA_IN
DMA output buffer full interrupt.
Definition: i2s.h:116
#define I2S_INT_WCLK_ERR
Word Clock error.
Definition: i2s.h:120
#define I2S_INT_DMA_OUT
DMA input buffer empty interrupt.
Definition: i2s.h:117

All interrupts.

Function Documentation

§ I2SEnableInt()

__STATIC_INLINE void I2SEnableInt ( uint32_t  base,
uint32_t  intFlags 
)

Enables individual I2S interrupt sources.

This function enables the indicated I2S interrupt sources. Only the sources that are enabled can propagate to the processor interrupt; disabled sources have no effect on the processor.

Parameters
baseis the base address of the I2S module.
intFlagsis the bit mask of the interrupt sources to be enabled. The parameter is the bitwise OR of any of the following:
Returns
None.

References ASSERT.

§ I2SDisableInt()

__STATIC_INLINE void I2SDisableInt ( uint32_t  base,
uint32_t  intFlags 
)

Disables individual I2S interrupt sources.

This function disables the indicated I2S interrupt sources. Only the sources that are enabled propagate to the processor interrupt; disabled sources have no effect on the processor.

Parameters
baseis the base address of the I2S module.
intFlagsis the bit mask of the interrupt sources to be disabled. The parameter is the bitwise OR of any of the following:
Returns
None.

References ASSERT.

§ I2SIntStatus()

__STATIC_INLINE uint32_t I2SIntStatus ( uint32_t  base,
bool  masked 
)

Gets the current interrupt status.

This function returns the interrupt status for the specified I2S. Either the raw interrupt status or the status of interrupts that propagate to the processor can be returned.

Parameters
baseis the base address of the I2S module.
maskedselects between raw and masked interrupt status:
  • false : Raw interrupt status is required.
  • true : Masked interrupt status is required.
Returns
Returns the current interrupt status as a vector of:

References ASSERT.

§ I2SClearInt()

__STATIC_INLINE void I2SClearInt ( uint32_t  base,
uint32_t  intFlags 
)

Clears I2S interrupt sources.

The specified I2S interrupt sources are cleared, so that they no longer assert. This function must be called in the interrupt handler to keep the interrupt from being recognized again immediately upon exit.

Parameters
baseis the base address of the I2S module.
intFlagsis a bit mask of the interrupt sources to be cleared. The parameter is the bitwise OR of any of the following:
Returns
None

References ASSERT.

§ I2SEnableSampleStamp()

__STATIC_INLINE void I2SEnableSampleStamp ( uint32_t  base)

Enable the Sample Stamp generator.

Use this function to enable the sample stamp generators.

Note
It is the user's responsibility to ensure that the sample stamp generator is properly configured before it is enabled. It is the setting of the Input and Output triggers configured using I2SConfigureInSampleStampTrigger() and I2SConfigureOutSampleStampTrigger() that triggers the start point of the audio streams.
Parameters
baseis the base address of the I2S module.
Returns
None.

References ASSERT.

§ I2SDisableSampleStamp()

__STATIC_INLINE void I2SDisableSampleStamp ( uint32_t  base)

Disable the Sample Stamp generator.

Use this function to disable the sample stamp generator. When the sample stamp generator is disabled, the clock counters are automatically cleared.

Parameters
baseis the base address of the I2S module.
Returns
None

References ASSERT, and I2SGetSampleStamp().

§ I2SGetSampleStamp()

uint32_t I2SGetSampleStamp ( uint32_t  base,
uint32_t  channel 
)

Get the current value of a sample stamp counter.

Parameters
baseis the base address of the I2S module.
channelis the sample stamp counter to sample.
Returns
Returns the current value of the selected sample stamp channel.

References I2S_STMP_SATURATION.

Referenced by I2SDisableSampleStamp().

§ I2SStart()

__STATIC_INLINE void I2SStart ( uint32_t  base,
uint16_t  dmaLength 
)

Starts the I2S.

I2S must be configured before it is started.

Note
Immediately after enabling the module the programmer must update the DMA data pointer registers using I2SSetInPointer() and I2SSetOutPointer() to ensure a new pointer is written before the DMA transfer completes. Failure to update the pointer in time will result in an I2S_INT_PTR_ERR.
Parameters
baseis the I2S module base address.
dmaLengthis the number of frames in the DMA buffer. This will allow the DMA to read dmaLength frames between two pointer refreshes. Valued values are integers in the range [2, 256], both included.
Returns
None.
See also
I2SStop()

References ASSERT.

§ I2SStop()

__STATIC_INLINE void I2SStop ( uint32_t  base)

Stops the I2S module for operation.

This function will immediately disable the I2S module. To ensure that all buffer operations are completed before shutting down, the correct procedure is:

  1. Do not update the data pointers using I2SSetInPointer() and I2SSetOutPointer().
  2. Wait until values returned by I2SGetInPointerNext(), I2SGetOutPointerNext(), I2SGetInPointer() and I2SGetOutPointer() are zero.
  3. Disable the I2S using I2SStop() and clear the pointer error using I2SClearInt().
  4. Disable bit clock source.
Parameters
baseis the I2S module base address.
Returns
None.
See also
I2SStart()

References ASSERT.

§ I2SConfigureFormat()

__STATIC_INLINE void I2SConfigureFormat ( uint32_t  base,
uint8_t  dataDelay,
uint32_t  memoryLength,
uint32_t  samplingEdge,
bool  dualPhase,
uint8_t  bitsPerSample 
)

Configure the serial format of the I2S module.

The word length defines the size of the word transmitted on the data lines. For single phased formats bitsPerSample is the exact number of bits per word. In dual phased format this is the maximum number of bits per word.

Parameters
baseis the I2S module base address.
dataDelayis the number of BCLK periods between the first WCLK edge and the MSB of the first audio channel data transferred during the phase. Valued values are integers in the range [0, 255], both included.
memoryLengthselects the memory length of the samples in memory. Possible values are:
samplingEdgeselects if sampling on falling or rising edges. Possible values are:
dualPhasemust be set to true for dual phase and to false for single phase. This must be the same value as configured in I2SConfigureClocks()
bitsPerSampleis the number of bits transmitted for each sample. Valued values are integers in the range [8, 24], both included. If this number does not match with the memory length selected (16 bits or 32 bits), samples will be truncated or padded.
Returns
None.
See also
I2SConfigureFrame()

References ASSERT.

§ I2SConfigureFrame()

__STATIC_INLINE void I2SConfigureFrame ( uint32_t  base,
uint8_t  sd0Usage,
uint8_t  sd0Channels,
uint8_t  sd1Usage,
uint8_t  sd1Channels 
)

Setup the two interfaces SD0 and SD1 (also called AD0 and AD1).

This function sets interface's direction and activated channels.

Parameters
baseis base address of the I2S module.
sd0Usagedefines the usage of SD0. Valid values are:
sd0Channelsdefines the channel mask for SD0. Use a bitwise OR'ed combination of:
sd1Usagedefines the usage of SD1. Valid values are:
sd1Channelsdefines the channel mask for SD1. Use a bitwise OR'ed combination of:
Returns
None.
See also
I2SConfigureFormat()

References ASSERT.

§ I2SConfigureClocks()

__STATIC_INLINE void I2SConfigureClocks ( uint32_t  base,
bool  isController,
bool  invertWclk,
bool  dualPhase,
uint32_t  cclkDiv,
uint32_t  wclkDiv,
uint32_t  bclkDiv 
)

Configure the I2S clocks (CCLK, WCLK and BCLK).

This function does the following:

  • Configure clocks to be either internal (Controller) or external (Target).
  • Configure the I2S module to internally invert WCLK if selected by invertWclk.
  • If isController is true, the I2S module will be configured to use internally generated clocks based on dualPhase, cclkDiv, wclkDiv and bclkDiv.
Note
This function will disable the I2S clocks if they were previously enabled. To enable the clocks use I2SEnableControllerClocks().
Parameters
baseis the base address of the I2S module.
isControllerselects if the device is a Target or a Controller:
  • false: the device is a Target (external clock).
  • true: the device is a Controller (internal clock).
invertWclkselects if the WCLK should be internally inverted:
  • false: WCLK is not inverted.
  • true: WCLK is internally inverted.
dualPhasemust be set to true for dual phase and to false for single phase. This must be the same value as configured in I2SConfigureFormat().
cclkDivis the desired controller clock (CCLK) divider. I.e. the number of AFCLK periods in one CCLK period. Valid values are integers in the range [2, 1024], both included.
wclkDivis the desired word clock (WCLK) divider. The interpretation of this value depends on the value of dualPhase:
  • false (single phase mode): wclkDiv is the number of BCLK periods in one WCLK period (rising edge to rising edge). Valid values for wclkDiv are integers in the range [2, 1024], both included.
  • true (dual phase mode): wclkDiv is the number of BCLK periods in each phase (one edge to the next opposite edge). Meaning the period of WCLK will be 2 * wclkDiv BLCK periods. Valid values for wclkDiv are integers in the range [1, 1023], both included.
bclkDivis the desired bit clock (BCLK) divider. I.e. the number of AFCLK periods in one BCLK period. Valid values are integers in the range [2, 1024], both included.
Returns
None.

References ASSERT.

§ I2SEnableControllerClocks()

__STATIC_INLINE void I2SEnableControllerClocks ( uint32_t  base)

Enable the I2S controller clocks (CCLK, WCLK and BCLK).

Use this function to enable the controller clocks CCLK, WCLK and BCLK (internally generated).

Note
The internal I2S clocks must have been configured using I2SConfigureClocks() with the isController parameter set to true.
Returns
None.

§ I2SDisableControllerClocks()

__STATIC_INLINE void I2SDisableControllerClocks ( uint32_t  base)

Disable the I2S controller clocks (CCLK, WCLK and BCLK).

Use this function to disable the controller clocks CCLK, WCLK and BCLK (internally generated).

Returns
None.

§ I2SSetInPointer()

__STATIC_INLINE void I2SSetInPointer ( uint32_t  base,
uint32_t  nextPointer 
)

Set the next input buffer pointer.

The next pointer should always be written while the DMA is using the previously written pointer. If not written in time, an I2S_INT_PTR_ERR will occur and all inputs and outputs will be disabled. This function assumes nextPointer is pointing to a valid address.

Note
It is recommended that the pointer update is done in an interrupt context to ensure that the update is performed before the buffer is full.
Parameters
baseis the base address of the I2S module.
nextPointeris the address of the data.
Returns
None.
See also
I2SSetOutPointer()

References ASSERT.

§ I2SSetOutPointer()

__STATIC_INLINE void I2SSetOutPointer ( uint32_t  base,
uint32_t  nextPointer 
)

Set the next output buffer pointer.

The next pointer should always be written while the DMA is using the previously written pointer. If not written in time, an I2S_INT_PTR_ERR will occur and all inputs and outputs will be disabled. This function assumes nextPointer is pointing to a valid address.

Note
It is recommended that the pointer update is done in an interrupt context to ensure that the update is performed before the buffer is full.
Parameters
baseis the base address of the I2S module.
nextPointeris the address of the data.
Returns
None.
See also
I2SSetInPointer()

References ASSERT.

§ I2SGetInPointerNext()

__STATIC_INLINE uint32_t I2SGetInPointerNext ( uint32_t  base)

Get value of the next input pointer.

Parameters
baseis the base address of the I2S module.
Returns
the value of the next input pointer.

References ASSERT.

§ I2SGetOutPointerNext()

__STATIC_INLINE uint32_t I2SGetOutPointerNext ( uint32_t  base)

Get value of the next output pointer.

Parameters
baseis the base address of the I2S module.
Returns
the value of the next output pointer.

References ASSERT.

§ I2SGetInPointer()

__STATIC_INLINE uint32_t I2SGetInPointer ( uint32_t  base)

Get value of the current input pointer.

Parameters
baseis the base address of the I2S module.
Returns
the value of the current input pointer.

References ASSERT.

§ I2SGetOutPointer()

__STATIC_INLINE uint32_t I2SGetOutPointer ( uint32_t  base)

Get value of the current output pointer.

Parameters
baseis the base address of the I2S module.
Returns
the value of the current output pointer.

References ASSERT.

§ I2SConfigureInSampleStampTrigger()

__STATIC_INLINE void I2SConfigureInSampleStampTrigger ( uint32_t  base,
uint16_t  trigValue 
)

Configure the input sample stamp trigger.

Use this function to configure the input sample stamp trigger.

Parameters
baseis the base address of the I2S module.
trigValuevalue used to set the trigger.
Returns
None.

References ASSERT.

§ I2SConfigureOutSampleStampTrigger()

__STATIC_INLINE void I2SConfigureOutSampleStampTrigger ( uint32_t  base,
uint16_t  trigValue 
)

Configure the output sample stamp trigger.

Use this function to configure the output sample stamp trigger.

Parameters
baseis the base address of the I2S module.
trigValuevalue used to set the trigger.
Returns
None.

References ASSERT.

§ I2SConfigureWclkCounterPeriod()

__STATIC_INLINE void I2SConfigureWclkCounterPeriod ( uint32_t  base,
uint16_t  period 
)

Configure the WCLK counter period.

Use this function to configure the period of the WCLK counter.

Parameters
baseis the base address of the I2S module.
periodvalue used to define when the WCLK counter should reset. This should be configured the size of the sample buffer, in number of frames.
Returns
None.

References ASSERT.

§ I2SConfigureWclkCounter()

__STATIC_INLINE void I2SConfigureWclkCounter ( uint32_t  base,
int16_t  value 
)

Confiugre the WCLK counter value.

Parameters
baseis the base address of the I2S module.
valueis the offset to add to the counter (this value can be negative).
Returns
None.

References ASSERT.

§ I2SResetWclkCounter()

__STATIC_INLINE void I2SResetWclkCounter ( uint32_t  base)

Reset the WCLK count.

Parameters
baseis the base address of the I2S module.
Returns
None.

References ASSERT.