I2S#
Modules#
Enumerations#
Enumeration for different I2S callback events.
Enumeration for I2S power state.
Enumeration for I2S master and slave modes.
Enumeration for SAI protocol type.
Enumeration for I2S SYNC/ASYNC modes.
Enumeration for I2S transfer type.
Enumeration for I2S transfer data size.
Enumeration for I2S audio data resolutions.
Enumeration for I2S sample rates.
Typedefs#
Renamed signal event structure.
Renamed status structure.
Renamed I2S driver structure.
Created I2S handle type.
Functions#
Initialize the I2S.
Uninitialize I2S peripheral.
Change the power mode of I2S, the supported modes are.
Configure transmitter/Receiver parameters for I2S transfer.
Configure I2S peripheral DMA channel to send data.
Configure I2S peripheral DMA channel to receive data.
Register the user callback function.
Un-register the user callback function.
Get the transmit data count of I2S.
Get the receive data count of I2S.
Get the release, sqa, and dev version of I2S.
Get the transfer status I2S.
Abort I2S Tx/Rx operations.
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. |
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. |
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 master and slave modes.
Enumerator | |
---|---|
SL_I2S_MASTER | I2S master mode. |
SL_I2S_SLAVE | I2S slave mode. |
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. |
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. |
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_TRANSMIT_CONTROL | I2S receive. |
SL_I2S_RECEIVE_CONTROL | I2S receive. |
SL_I2S_SEND_ABORT | I2S abort transmit. |
SL_I2S_RECEIVE_ABORT | I2S abort receive. |
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_SIZE16 | 16 bits |
SL_I2S_DATA_SIZE32 | 32 bits |
100
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 |
SL_I2S_RESOLUTION_32 | 32 bit resolution |
106
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 |
115
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.
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.
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.
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.
53
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)
Initialize the I2S.
[in] | i2s_instance | instance |
[in] | i2s_handle | Double Pointer to the I2S driver handle |
Pass the address of the pointer for storing the I2S handle, which can be used in future for other function calls.
Pre-conditions:
none
Returns
status 0 if successful, else error code 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
165
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)
Uninitialize I2S peripheral.
[in] | i2s_handle | Pointer to the I2S driver handle |
Pre-conditions:
Returns
status 0 if successful, else error code 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
180
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)
Change the power mode of I2S, the supported modes are.
[in] | i2s_handle | Pointer to the I2S driver handle |
[in] | state | state |
POWER_OFF
FULL_POWER
Pre-conditions:
Returns
status 0 if successful, else error code 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
198
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)
Configure transmitter/Receiver parameters for I2S transfer.
[in] | i2s_handle | Pointer to the I2S driver handle |
[in] | xfer_config | of structure which stores transfer parameters |
Pre-conditions:
Returns
status 0 if successful, else error code 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
215
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)
Configure I2S peripheral DMA channel to send data.
[in] | i2s_handle | Pointer to the I2S driver handle |
[in] | data | data |
[in] | size | size |
Pre-conditions:
Returns
status 0 if successful, else error code 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
234
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)
Configure I2S peripheral DMA channel to receive data.
[in] | i2s_handle | Pointer to the I2S driver handle |
[in] | data | data |
[in] | size | size |
Pre-conditions:
Returns
status 0 if successful, else error code 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
253
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)
Register the user callback function.
[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 |
Pre-conditions:
none
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer
SL_STATUS_BUSY (0x0004) - Driver is busy
269
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)
Un-register the user callback function.
[in] | i2s_handle |
Pre-conditions:
Returns
none
281
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)
Get the transmit data count of I2S.
[in] | i2s_handle | Pointer to the I2S driver handle |
Pre-conditions:
Returns
uint32_t value of the tx data count
296
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)
Get the receive data count of I2S.
[in] | i2s_handle | Pointer to the I2S driver handle |
Pre-conditions:
Returns
uint32_t value of the rx data count
311
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.
[in] |
Pre-conditions:
none
Returns
(sl_i2s_version_t) type structure
323
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)
Get the transfer status I2S.
[in] | i2s_handle | Pointer to the I2S driver handle |
Pre-conditions:
Returns
(sl_i2s_status_t) type structure
337
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)
Abort I2S Tx/Rx operations.
[in] | i2s_handle | Pointer to the I2S driver handle |
[in] | abort_type | type, ARM_SAI_ABORT_SEND/ARM_SAI_ABORT_RECEIVE |
Pre-conditions:
sl_si91x_i2s_transmit_data/sl_si91x_i2s_receive_data
Returns
status 0 if successful, else error code 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
356
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h