MT7687 API Reference  LinkIt SDK v4
hal_i2s_link_config_t Struct Reference
HAL » I2S » Struct

I2S link structure. More...

#include <hal_i2s.h>

Data Fields

hal_i2s_sample_rate_t sample_rate
 Sampling rate of the I2S link. More...
 
hal_i2s_channel_number_t channel_number
 Channel number of the I2S link. More...
 
uint32_t msb_offset
 The number of bits delay between frame sync and first data bit of the I2S link. More...
 
uint8_t lr_swap
 Enable or disable data swapping between right and left channels of the I2S link by setting this value. More...
 
uint8_t word_select_inverse
 Enable or disable word select clock inverting of the I2S link by setting this value. More...
 

Detailed Description

I2S link structure.

Field Documentation

hal_i2s_channel_number_t channel_number

Channel number of the I2S link.

uint8_t lr_swap

Enable or disable data swapping between right and left channels of the I2S link by setting this value.

Set the lr_swap to 0 to disable data swapping between right and left channels of the I2S link.
Set the lr_swap to 1 to enable data swapping between right and left channels of the I2S link.

uint32_t msb_offset

The number of bits delay between frame sync and first data bit of the I2S link.

The user can set msb_offset from 0 to 127.

hal_i2s_sample_rate_t sample_rate

Sampling rate of the I2S link.

uint8_t word_select_inverse

Enable or disable word select clock inverting of the I2S link by setting this value.

The word select clock lets the device know whether channel 1 or channel 2 is currently being sent, since I2S allows two channels to be sent on the same data line.
If the user sets the word_select_inverse to 0, the left channel data is transmitted on the low cycle of the word select clock and the right channel data is transmitted on the high cycle.
If the user sets the word_select_inverse to 1, the left channel data is transmitted on the high cycle of the word select clock and the right channel data is transmitted on the low cycle.


The documentation for this struct was generated from the following file: