I2S

This module implements an I2S master.

Details

define I2S_VERSION

define I2S_IOC_IDENT_CHAR

define I_I2S_GETVERSION

define I_I2S_GETINFO

define I_I2S_SETATTR

define I_I2S_SETACTION

define I_I2S_MUTE

define I_I2S_UNMUTE

define I_I2S_TOTAL

enum @17
  • I2S_FLAG_IS_WIDTH_8 I2S Word Width 8 bits
  • I2S_FLAG_IS_WIDTH_16 I2S Word Width 16 bits
  • I2S_FLAG_IS_WIDTH_24 I2S Word Width 24 bits
  • I2S_FLAG_IS_WIDTH_32 I2S Word Width 32 bits
  • I2S_FLAG_IS_MONO I2S Mono mode
  • I2S_FLAG_IS_STEREO I2S Stereo mode (default behavoir)
  • I2S_FLAG_SET_MASTER Set the I2S as a master
  • I2S_FLAG_SET_SLAVE Set the I2S as a slave
  • I2S_FLAG_IS_TRANSMITTER Set the I2S transmitter (master or slave)
  • I2S_FLAG_IS_RECEIVER Set the I2S receiver (master or slave)
  • I2S_FLAG_IS_FORMAT_MSB Set this bit for MSB format
  • I2S_FLAG_IS_FORMAT_LSB Set this bit for LSB format
  • I2S_FLAG_IS_MCK_ENABLED Set this bit to enable the mclk output
  • I2S_FLAG_IS_FORMAT_PCM_SHORT Set this bit for PCM Short format
  • I2S_FLAG_IS_FORMAT_PCM_LONG Set this bit for PCM Long format
  • I2S_FLAG_IS_WIDTH_16_EXTENDED I2S has 16-bits of data in 32-bit blocks
  • SAI_FLAG_IS_OUTPUTDRIVE_DISABLE SAI_Block_Output_Drive SAI Block Output Drive
  • SAI_FLAG_IS_FIFOTHRESHOLD_EMPTY SAI_Block_Fifo_Threshold SAI Block Fifo Threshold
  • SAI_FLAG_IS_FIFOTHRESHOLD_1QF SAI_Block_Fifo_Threshold SAI Block Fifo Threshold
  • SAI_FLAG_IS_FIFOTHRESHOLD_HF SAI_Block_Fifo_Threshold SAI Block Fifo Threshold
  • SAI_FLAG_IS_FIFOTHRESHOLD_3QF SAI_Block_Fifo_Threshold SAI Block Fifo Threshold
  • SAI_FLAG_IS_FIFOTHRESHOLD_FULL SAI_Block_Fifo_Threshold SAI Block Fifo Threshold
  • SAI_FLAG_IS_ULAW_1CPL_COMPANDING SAI Block Companding Mode
  • SAI_FLAG_IS_ALAW_1CPL_COMPANDING SAI Block Companding Mode
  • SAI_FLAG_IS_ULAW_2CPL_COMPANDING SAI Block Companding Mode
  • SAI_FLAG_IS_ALAW_2CPL_COMPANDING SAI Block Companding Mode
  • SAI_FLAG_ENABLE SAI enable command
  • SAI_DMA_ENABLE SAI dma enable command
  • SAI_FLAG_IS_SYNCHRONOUS Synchronous with other block of same SAI
  • SAI_FLAG_IS_SYNCHRONOUS_EXT_SAI1 Synchronous with other SAI, SAI1
  • SAI_FLAG_IS_SYNCHRONOUS_EXT_SAI2 Synchronous with other SAI, SAI2
  • SAI_FLAG_SET_SLOT update active slot

struct::i2s_info_t

This structure defines how the control structure for configuring the I2S port.

u32 o_flags

Mode flags (see I2SMODE*)

u32 o_events

Mode flags (see I2SMODE*)

u32 freq

The I2S audio frequency

u32 resd

struct::i2s_pin_assignment_t

mcu_pin_t ws

mcu_pin_t sck

mcu_pin_t sdout

mcu_pin_t sdin

mcu_pin_t mck

struct::sai_pin_assignment_t

mcu_pin_t sck

in/out bit clock

mcu_pin_t sd

data line

mcu_pin_t mclk

output master clock not used in slave mode

mcu_pin_t fs

frame synchronization


struct::i2s_attr_t

u32 o_flags

Flag bitmask

u32 freq

The I2S audio frequency

i2s_pin_assignment_t pin_assignment

The pin assignement values

u32 mck_mult

The I2S mclk multiplier value

u32 resd

struct::sai_attr_t

u32 o_flags

Flag bitmask

u32 freq

The sai audio frequency

u32 slot

< active slots

sai_pin_assignment_t pin_assignment

The pin assignement values

u32 mck_mult

The sai mclk multiplier value

u32 resd

X

Thanks for Coming!

Subscribe to news and updates