Function esp_idf_hal::sys::i2s_channel_reconfig_tdm_slot
source · pub unsafe extern "C" fn i2s_channel_reconfig_tdm_slot(
handle: *mut i2s_channel_obj_t,
slot_cfg: *const i2s_tdm_slot_config_t,
) -> i32
Expand description
@brief Reconfigure the I2S slot for TDM mode @note Only allowed to be called when the channel state is READY, i.e., channel has been initialized, but not started this function won’t change the state. ‘i2s_channel_disable’ should be called before calling this function if i2s has started. @note The input channel handle has to be initialized to TDM mode, i.e., ‘i2s_channel_init_tdm_mode’ has been called before reconfiguring
@param[in] handle I2S channel handler
@param[in] slot_cfg Standard mode slot configuration, can be generated by I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG
,
I2S_TDM_PCM_SHORT_SLOT_DEFAULT_CONFIG
, I2S_TDM_PCM_LONG_SLOT_DEFAULT_CONFIG
or I2S_TDM_MSB_SLOT_DEFAULT_CONFIG
.
@return
- ESP_OK Set clock successfully
- ESP_ERR_NO_MEM No memory for DMA buffer
- ESP_ERR_INVALID_ARG NULL pointer, invalid configuration or not TDM mode
- ESP_ERR_INVALID_STATE This channel is not initialized or not stopped