MT7687 API Reference  LinkIt SDK v4
Enum
HAL » I2S

Overview

Enumerations

enum  hal_i2s_status_t {
  HAL_I2S_STATUS_INVALID_PARAMETER = -2,
  HAL_I2S_STATUS_ERROR = -1,
  HAL_I2S_STATUS_OK = 0
}
 This enum defines the I2S status. More...
 
enum  hal_i2s_clock_mode_t {
  HAL_I2S_MASTER = 0,
  HAL_I2S_SLAVE = 1
}
 This enum defines the I2S clock mode. More...
 
enum  hal_i2s_channel_number_t {
  HAL_I2S_MONO = 0,
  HAL_I2S_STEREO = 1
}
 This enum defines the I2S channel number. More...
 
enum  hal_i2s_tx_mode_t {
  HAL_I2S_TX_MONO_DUPLICATE_DISABLE = 0,
  HAL_I2S_TX_MONO_DUPLICATE_ENABLE = 1
}
 Enable or disable right channel of the I2S TX to send the same data as on the left channel of the I2S TX. More...
 
enum  hal_i2s_rx_down_rate_t {
  HAL_I2S_RX_DOWN_RATE_DISABLE = 0,
  HAL_I2S_RX_DOWN_RATE_ENABLE = 1
}
 Enable or disable twice the downsampling rate mode in the I2S RX link. More...
 
enum  hal_i2s_initial_type_t {
  HAL_I2S_TYPE_EXTERNAL_MODE = 0,
  HAL_I2S_TYPE_EXTERNAL_TDM_MODE = 1,
  HAL_I2S_TYPE_INTERNAL_MODE = 2,
  HAL_I2S_TYPE_INTERNAL_LOOPBACK_MODE = 3
}
 This enum defines initial type of I2S. More...
 
enum  hal_i2s_event_t {
  HAL_I2S_EVENT_DATA_REQUEST = 0,
  HAL_I2S_EVENT_DATA_NOTIFICATION = 1
}
 I2S event. More...
 
enum  hal_i2s_sample_rate_t {
  HAL_I2S_SAMPLE_RATE_8K = 0,
  HAL_I2S_SAMPLE_RATE_12K = 1,
  HAL_I2S_SAMPLE_RATE_16K = 2,
  HAL_I2S_SAMPLE_RATE_24K = 3,
  HAL_I2S_SAMPLE_RATE_32K = 4,
  HAL_I2S_SAMPLE_RATE_48K = 5
}
 I2S sample rate definition. More...
 

Enumeration Type Documentation

This enum defines the I2S channel number.

The channel number setting is only valid for the I2S TX link. The setting does not have any effect on the I2S RX link.

Enumerator
HAL_I2S_MONO 

A single channel.

HAL_I2S_STEREO 

Two channels.

This enum defines the I2S clock mode.

Enumerator
HAL_I2S_MASTER 

Clock source fed to an external device.

HAL_I2S_SLAVE 

Clock source comes from an external device.

I2S event.

Enumerator
HAL_I2S_EVENT_DATA_REQUEST 

This value means request user to fill data.

HAL_I2S_EVENT_DATA_NOTIFICATION 

This value means notify user the RX data is ready.

This enum defines initial type of I2S.

Enumerator
HAL_I2S_TYPE_EXTERNAL_MODE 

i2s external mode

HAL_I2S_TYPE_EXTERNAL_TDM_MODE 

i2s external tdm mode<invalid>

HAL_I2S_TYPE_INTERNAL_MODE 

i2s internal mode<invalid>

HAL_I2S_TYPE_INTERNAL_LOOPBACK_MODE 

i2s internal loopback mode

Enable or disable twice the downsampling rate mode in the I2S RX link.

In this mode the sampling rate of the I2S TX is 48kHz while the sampling rate of the I2S RX is 24kHz. The I2S RX automatically drops 1 sample in each 2 input samples received.

Enumerator
HAL_I2S_RX_DOWN_RATE_DISABLE 

Actual sampling rate of the I2S RX = sampling rate.

HAL_I2S_RX_DOWN_RATE_ENABLE 

Actual sampling rate of the I2S RX is half of the original sampling rate.

I2S sample rate definition.

Enumerator
HAL_I2S_SAMPLE_RATE_8K 

8000Hz

HAL_I2S_SAMPLE_RATE_12K 

12000Hz

HAL_I2S_SAMPLE_RATE_16K 

16000Hz

HAL_I2S_SAMPLE_RATE_24K 

24000Hz

HAL_I2S_SAMPLE_RATE_32K 

32000Hz

HAL_I2S_SAMPLE_RATE_48K 

48000Hz

This enum defines the I2S status.

Enumerator
HAL_I2S_STATUS_INVALID_PARAMETER 

A wrong parameter is given.

HAL_I2S_STATUS_ERROR 

An error occurred during the function call.

HAL_I2S_STATUS_OK 

No error occurred during the function call.

Enable or disable right channel of the I2S TX to send the same data as on the left channel of the I2S TX.

Enumerator
HAL_I2S_TX_MONO_DUPLICATE_DISABLE 

Right channel of the TX, sends all 0.

HAL_I2S_TX_MONO_DUPLICATE_ENABLE 

Right channel of the TX, sends the same data as the left.