Function esp_idf_svc::hal::sys::i2s_set_sample_rates
source · pub unsafe extern "C" fn i2s_set_sample_rates(
i2s_num: u32,
rate: u32,
) -> i32
Expand description
@brief Set sample rate used for I2S RX and TX.
The bit clock rate is determined by the sample rate and i2s_config_t configuration parameters (number of channels, bits_per_sample).
bit_clock = rate * (number of channels) * bits_per_sample
@param i2s_num I2S port number
@param rate I2S sample rate (ex: 8000, 44100…)
@return - ESP_OK Success - ESP_ERR_INVALID_ARG Parameter error - ESP_ERR_NO_MEM Out of memory