I2S#


Introduction#

A serial communication protocol called I2S, or Inter-IC Sound, is intended to convey digital audio data between integrated circuits (ICs) in electronic devices. Connecting audio components like digital signal processors, digital-to-analog converters, and microphones is a popular usage for it.

  • In an I2S connection, one device typically serves as the master, generating the clock signals, while the other device operates as the slave, synchronizing its data transmission to the master's clock.

The following is a brief discussion of the I2S peripheral's capability for

  1. Programmable audio resolutions

  2. Sampling rates

  3. Full duplex communication


Configuration#

  • For more information on configuring available parameters refer to the respective peripheral example readme document.


Usage#

The default I2S is Initialised and configured with the 16 bit resolution and 8 kHz sampling rate. Just after calling the register callback it will goes to transmit-receive mode and communicates over Interrupt given.

  1. sl_si91x_i2s_init

  2. sl_si91x_i2s_register_event_callback

  3. sl_si91x_i2s_transmit_data

  4. sl_si91x_i2s_receive_data

  5. sl_si91x_i2s_deinit

  • I2S also had some of the apis with which one can configure the power modes, unregister the callback, get the data count and abort the transfer.

  1. sl_si91x_i2s_configure_power_mode

  2. sl_si91x_i2s_unregister_event_callback

  3. sl_si91x_i2s_get_receive_data_count

  4. sl_si91x_i2s_end_transfer

Modules#

sl_i2s_version_t

sl_i2s_xfer_config_t

Enumerations#

enum
SL_I2S_SEND_COMPLETE = ARM_SAI_EVENT_SEND_COMPLETE
SL_I2S_RECEIVE_COMPLETE = ARM_SAI_EVENT_RECEIVE_COMPLETE
SL_I2S_TX_UNDERFLOW = ARM_SAI_EVENT_TX_UNDERFLOW
SL_I2S_RX_OVERFLOW = ARM_SAI_EVENT_RX_OVERFLOW
SL_I2S_FRAME_ERROR = ARM_SAI_EVENT_FRAME_ERROR
}

Enumeration for different I2S callback events.

enum
SL_I2S_POWER_OFF = ARM_POWER_OFF
SL_I2S_LOW_POWER = ARM_POWER_LOW
SL_I2S_FULL_POWER = ARM_POWER_FULL
}

Enumeration for I2S power state.

enum
SL_I2S_MASTER = ARM_SAI_MODE_MASTER
SL_I2S_SLAVE = ARM_SAI_MODE_SLAVE
}

Enumeration for I2S Primary and Secondary modes.

enum
SL_I2S_PROTOCOL = ARM_SAI_PROTOCOL_I2S
SL_PCM_PROTOCOL = 0
}

Enumeration for SAI protocol type.

enum
SL_I2S_SYNC = ARM_SAI_SYNCHRONOUS
SL_I2S_ASYNC = ARM_SAI_ASYNCHRONOUS
}

Enumeration for I2S SYNC/ASYNC modes.

enum
SL_I2S_TRANSMIT = ARM_SAI_CONFIGURE_TX
SL_I2S_RECEIVE = ARM_SAI_CONFIGURE_RX
SL_I2S_SEND_ABORT = ARM_SAI_ABORT_SEND
SL_I2S_RECEIVE_ABORT = ARM_SAI_ABORT_RECEIVE
}

Enumeration for I2S transfer type.

enum
SL_I2S_DATA_SIZE8 = 8
SL_I2S_DATA_SIZE16 = 16
SL_I2S_DATA_SIZE32 = 32
}

Enumeration for I2S transfer data size.

enum
SL_I2S_RESOLUTION_12 = 12
SL_I2S_RESOLUTION_16 = 16
SL_I2S_RESOLUTION_20 = 20
SL_I2S_RESOLUTION_24 = 24
}

Enumeration for I2S audio data resolutions.

enum
SL_I2S_SAMPLING_RATE_8000 = 8000
SL_I2S_SAMPLING_RATE_11025 = 11025
SL_I2S_SAMPLING_RATE_16000 = 16000
SL_I2S_SAMPLING_RATE_22050 = 22050
SL_I2S_SAMPLING_RATE_24000 = 24000
SL_I2S_SAMPLING_RATE_32000 = 32000
SL_I2S_SAMPLING_RATE_44100 = 44100
SL_I2S_SAMPLING_RATE_48000 = 48000
SL_I2S_SAMPLING_RATE_88200 = 88200
SL_I2S_SAMPLING_RATE_96000 = 96000
SL_I2S_SAMPLING_RATE_192000 = 192000
}

Enumeration for I2S sample rates.

Typedefs#

typedef ARM_SAI_SignalEvent_t

Renamed signal event structure.

typedef ARM_SAI_STATUS

Renamed status structure.

typedef ARM_DRIVER_SAI

Renamed I2S driver structure.

typedef const void *

Created I2S handle type.

Variables#

uint8_t

Release version number.

uint8_t

sqa version number

uint8_t

dev version number

uint16_t

Primary/Secondary mode.

uint16_t

SYNC/ASYNC mode.

uint16_t

I2S/PCM (currently only I2S is supported)

uint16_t

Audio data resolutions.

uint32_t

data size

uint32_t

Audio sampling rate.

uint32_t

Functions#

sl_status_t
sl_si91x_i2s_init(uint32_t i2s_instance, sl_i2s_handle_t *i2s_handle)

This API Initializes the I2S peripheral.

sl_status_t
sl_si91x_i2s_deinit(sl_i2s_handle_t *i2s_handle)

This API uninitialize I2S peripheral.

sl_status_t
sl_si91x_i2s_configure_power_mode(sl_i2s_handle_t i2s_handle, sl_i2s_power_state_t state)

This API configure I2S power mode.

sl_status_t
sl_si91x_i2s_config_transmit_receive(sl_i2s_handle_t i2s_handle, sl_i2s_xfer_config_t *xfer_config)

This API configures transmitter/Receiver parameters for I2S transfer.

sl_status_t
sl_si91x_i2s_transmit_data(sl_i2s_handle_t i2s_handle, const void *data, uint32_t size)

This API transmit I2S data.

sl_status_t
sl_si91x_i2s_receive_data(sl_i2s_handle_t i2s_handle, const void *data, uint32_t size)

This API receive I2S data.

sl_status_t
sl_si91x_i2s_register_event_callback(sl_i2s_handle_t i2s_handle, sl_i2s_signal_event_t callback_event)

This API Registers the user callback function.

sl_status_t
sl_si91x_i2s_unregister_event_callback(sl_i2s_handle_t i2s_handle)

This API un-registers the user callback function.

uint32_t
sl_si91x_i2s_get_transmit_data_count(sl_i2s_handle_t i2s_handle)

This API returns the transmitted data count.

uint32_t
sl_si91x_i2s_get_receive_data_count(sl_i2s_handle_t i2s_handle)

This API return receives data count.

Get the release, sqa, and dev version of I2S.

sl_si91x_i2s_get_status(sl_i2s_handle_t i2s_handle)

This API return I2S peripheral status.

sl_status_t
sl_si91x_i2s_end_transfer(sl_i2s_handle_t i2s_handle, sl_i2s_xfer_type_t abort_type)

This API aborts I2S transfer.

Enumeration Documentation#

i2s_event_typedef_t#

i2s_event_typedef_t

Enumeration for different I2S callback events.

Enumerator
SL_I2S_SEND_COMPLETE

Send complete event.

SL_I2S_RECEIVE_COMPLETE

Receive lost event.

SL_I2S_TX_UNDERFLOW

Tx underflow event.

SL_I2S_RX_OVERFLOW

Rx Overflow event.

SL_I2S_FRAME_ERROR

Frame error event.


Definition at line 56 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_power_state_t#

sl_i2s_power_state_t

Enumeration for I2S power state.

Enumerator
SL_I2S_POWER_OFF

Power mode OFF.

SL_I2S_LOW_POWER

Low power mode.

SL_I2S_FULL_POWER

Full power mode.


Definition at line 65 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_mode_t#

sl_i2s_mode_t

Enumeration for I2S Primary and Secondary modes.

Enumerator
SL_I2S_MASTER

I2S primary mode.

SL_I2S_SLAVE

I2S secondary mode.


Definition at line 72 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_sai_protocol_t#

sl_sai_protocol_t

Enumeration for SAI protocol type.

Enumerator
SL_I2S_PROTOCOL

I2S protocol.

SL_PCM_PROTOCOL

PCM protocol, currently not supported in the driver.


Definition at line 78 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_sync_t#

sl_i2s_sync_t

Enumeration for I2S SYNC/ASYNC modes.

Enumerator
SL_I2S_SYNC

I2S synchronous mode.

SL_I2S_ASYNC

I2S asynchronous mode.


Definition at line 84 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_xfer_type_t#

sl_i2s_xfer_type_t

Enumeration for I2S transfer type.

Enumerator
SL_I2S_TRANSMIT

I2S transmit.

SL_I2S_RECEIVE

I2S receive.

SL_I2S_SEND_ABORT

I2S abort transmit.

SL_I2S_RECEIVE_ABORT

I2S abort receive.


Definition at line 90 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_xfer_size_t#

sl_i2s_xfer_size_t

Enumeration for I2S transfer data size.

Enumerator
SL_I2S_DATA_SIZE8

8 bits

SL_I2S_DATA_SIZE16

16 bits

SL_I2S_DATA_SIZE32

32 bits


Definition at line 98 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_data_resolution_t#

sl_i2s_data_resolution_t

Enumeration for I2S audio data resolutions.

Enumerator
SL_I2S_RESOLUTION_12

12 bit resolution

SL_I2S_RESOLUTION_16

16 bit resolution

SL_I2S_RESOLUTION_20

20 bit resolution

SL_I2S_RESOLUTION_24

24 bit resolution


Definition at line 105 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_sampling_rate_t#

sl_i2s_sampling_rate_t

Enumeration for I2S sample rates.

Enumerator
SL_I2S_SAMPLING_RATE_8000

8kHz

SL_I2S_SAMPLING_RATE_11025

11.025kHz

SL_I2S_SAMPLING_RATE_16000

16kHz

SL_I2S_SAMPLING_RATE_22050

22.05kHz

SL_I2S_SAMPLING_RATE_24000

24kHz

SL_I2S_SAMPLING_RATE_32000

32kHz

SL_I2S_SAMPLING_RATE_44100

44.1kHz

SL_I2S_SAMPLING_RATE_48000

48kHz

SL_I2S_SAMPLING_RATE_88200

88.2kHz

SL_I2S_SAMPLING_RATE_96000

96kHz

SL_I2S_SAMPLING_RATE_192000

192kHz


Definition at line 113 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

Typedef Documentation#

sl_i2s_signal_event_t#

typedef ARM_SAI_SignalEvent_t sl_i2s_signal_event_t

Renamed signal event structure.


Definition at line 50 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_status_t#

typedef ARM_SAI_STATUS sl_i2s_status_t

Renamed status structure.


Definition at line 51 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_driver_t#

typedef ARM_DRIVER_SAI sl_i2s_driver_t

Renamed I2S driver structure.


Definition at line 52 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_i2s_handle_t#

typedef const void* sl_i2s_handle_t

Created I2S handle type.


Definition at line 53 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

Variable Documentation#

release#

uint8_t sl_i2s_version_t::release

Release version number.


Definition at line 129 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

major#

uint8_t sl_i2s_version_t::major

sqa version number


Definition at line 130 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

minor#

uint8_t sl_i2s_version_t::minor

dev version number


Definition at line 131 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

mode#

uint16_t sl_i2s_xfer_config_t::mode

Primary/Secondary mode.


Definition at line 136 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sync#

uint16_t sl_i2s_xfer_config_t::sync

SYNC/ASYNC mode.


Definition at line 137 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

protocol#

uint16_t sl_i2s_xfer_config_t::protocol

I2S/PCM (currently only I2S is supported)


Definition at line 138 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

resolution#

uint16_t sl_i2s_xfer_config_t::resolution

Audio data resolutions.


Definition at line 139 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

data_size#

uint32_t sl_i2s_xfer_config_t::data_size

data size


Definition at line 140 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sampling_rate#

uint32_t sl_i2s_xfer_config_t::sampling_rate

Audio sampling rate.


Definition at line 141 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

transfer_type#

uint32_t sl_i2s_xfer_config_t::transfer_type

Tx/Rx.


Definition at line 142 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

Function Documentation#

sl_si91x_i2s_init#

sl_status_t sl_si91x_i2s_init (uint32_t i2s_instance, sl_i2s_handle_t * i2s_handle)

This API Initializes the I2S peripheral.

Parameters
[in]i2s_instance

instance , 0 - I2S0 1 - I2S1

[in]i2s_handle

Double Pointer to the I2S driver handle

This API enable clock for I2S peripheral and configure SCLK, WSCLK, DIN and DOUT pins. Pass the address of the pointer for storing the I2S handle, which can be used in the future for other function calls.

  • Pre-condition:

    • none

Returns

  • status 0 if successful, else error code is as follow

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid

    • SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument

    • SL_STATUS_BUSY (0x0004) - Driver is busy


Definition at line 164 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_deinit#

sl_status_t sl_si91x_i2s_deinit (sl_i2s_handle_t * i2s_handle)

This API uninitialize I2S peripheral.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

This API disable the DMA instance used for I2S transfer and power down I2S peripheral by disabling the clock supply to I2S

Returns

  • status 0 if successful, else error code is as follow

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid

    • SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument

Note

  • When I2S module is used in combination with other periperals, while deinitializing in the application, refer to the notes below:

    1. Whenever sl_si91x_i2s_deinit() gets called, it will disable the clock for the peripheral. To power off the peripheral we have to power down the power domain (PERI_EFUSE) which contains the different peripherals mentioned below. i.e USART, UART, I2C, SSI Master, SSI Slave, Generic-SPI Master, I2S Master, I2S Slave, Micro-DMA Controller, Config Timer, Random-Number Generator, CRC Accelerator, SIO, QEI, MCPWM and EFUSE. Use below API to power down the particular power domain if other peripherals are not being used: sl_si91x_peri_efuse_power_down(power_down);

    2. A few peripherals (ULP Peripherals, UULP Peripherals, GPDMA and SDIO-SPI) have seperate domains; those can be powered down indepedently. For additional details, refer to the Power architecture section in the Hardware Reference Manual. Here ULP_UART has a separate power domain ULPSS_PWRGATE_ULP_UART, which can be power down independently. Refer to rsi_power_save.h file for all power gates definitions.


Definition at line 191 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_configure_power_mode#

sl_status_t sl_si91x_i2s_configure_power_mode (sl_i2s_handle_t i2s_handle, sl_i2s_power_state_t state)

This API configure I2S power mode.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

[in]state

state, SL_I2S_POWER_OFF/SL_I2S_FULL_POWER

The supported modes are POWER_OFF - I2S peripheral clocks and I2S DMA channel is disabled. FULL_POWER - Enable I2S peripheral clocks and configure I2S DMA channel.

Returns

  • status 0 if successful, else error code is as follow

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid

    • SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument


Definition at line 208 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_config_transmit_receive#

sl_status_t sl_si91x_i2s_config_transmit_receive (sl_i2s_handle_t i2s_handle, sl_i2s_xfer_config_t * xfer_config)

This API configures transmitter/Receiver parameters for I2S transfer.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

[in]xfer_config

of structure which stores transfer parameters

This API configures I2S DMA transmit and receive channels. Configuring transfer_type to SL_I2S_TRANSMIT will configure Tx channel and SL_I2S_RECEIVE will configure the Rx channel.

Returns

  • status 0 if successful, else error code is as follow

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid

    • SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument


Definition at line 226 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_transmit_data#

sl_status_t sl_si91x_i2s_transmit_data (sl_i2s_handle_t i2s_handle, const void * data, uint32_t size)

This API transmit I2S data.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

[in]data

of transmit data

[in]size

size

This API configures I2S tx DMA channel descriptors and trigger DMA transfer. sl_si91x_i2s_config_transmit_receive() should be called with transfer_type set to SL_I2S_TRANSMIT before sending data.

Returns

  • status 0 if successful, else error code is as follow

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid

    • SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument


Definition at line 246 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_receive_data#

sl_status_t sl_si91x_i2s_receive_data (sl_i2s_handle_t i2s_handle, const void * data, uint32_t size)

This API receive I2S data.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

[in]data

of receive data

[in]size

size

This API configures I2S rx DMA channel descriptors and enables DMA channel to receive data. sl_si91x_i2s_config_transmit_receive() should be called with transfer_type set to SL_I2S_RECEIVE before receiving data.

Returns

  • status 0 if successful, else error code is as follow

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid

    • SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument


Definition at line 266 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_register_event_callback#

sl_status_t sl_si91x_i2s_register_event_callback (sl_i2s_handle_t i2s_handle, sl_i2s_signal_event_t callback_event)

This API Registers the user callback function.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

[in]callback_event

Pointer to the function which needs to be called at the time of interrupt

Transfer complete event can be notified using this callback. Callbacks should be registered before starting the I2S transfer.

Returns

  • status 0 if successful, else error code as follows

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_BUSY (0x0004) - Driver is busy


Definition at line 283 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_unregister_event_callback#

sl_status_t sl_si91x_i2s_unregister_event_callback (sl_i2s_handle_t i2s_handle)

This API un-registers the user callback function.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

This function can be used only if callbacks are registered before using sl_si91x_i2s_register_event_callback()

Returns

  • status 0 if successful, else error code SL_STATUS_OK (0x0000) - Success
    SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
    SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument


Definition at line 298 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_get_transmit_data_count#

uint32_t sl_si91x_i2s_get_transmit_data_count (sl_i2s_handle_t i2s_handle)

This API returns the transmitted data count.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

Get the transmit data count of I2S. If an active I2S transfer is started, this function can be used to get several data bytes transferred.

Returns

  • uint32_t value of the tx data count


Definition at line 313 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_get_receive_data_count#

uint32_t sl_si91x_i2s_get_receive_data_count (sl_i2s_handle_t i2s_handle)

This API return receives data count.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

Get the received data count of I2S. If I2S is configured for receive, this function can be used to get several data bytes received.

Returns

  • uint32_t value of the RX data count


Definition at line 329 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_get_version#

sl_i2s_version_t sl_si91x_i2s_get_version (void )

Get the release, sqa, and dev version of I2S.

Parameters
N/A
  • Pre-condition:

    • none

Returns


Definition at line 339 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_get_status#

sl_i2s_status_t sl_si91x_i2s_get_status (sl_i2s_handle_t i2s_handle)

This API return I2S peripheral status.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

Get following transfer status of I2S,

  1. Frame error

  2. Rx busy

  3. Rx overflow

  4. Tx busy

  5. Tx underflow

    Returns

    • (sl_i2s_status_t) type structure


Definition at line 357 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h

sl_si91x_i2s_end_transfer#

sl_status_t sl_si91x_i2s_end_transfer (sl_i2s_handle_t i2s_handle, sl_i2s_xfer_type_t abort_type)

This API aborts I2S transfer.

Parameters
[in]i2s_handle

Pointer to the I2S driver handle

[in]abort_type

type, ARM_SAI_ABORT_SEND/ARM_SAI_ABORT_RECEIVE

This API disable I2S clocks and DMA channel. This API also stops WSCLK generation.

Returns

  • status 0 if successful, else error code is as follows

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid

    • SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument


Definition at line 376 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h