pub unsafe extern "C" fn i2s_set_sample_rates(
    i2s_num: i2s_port_t,
    rate: u32
) -> esp_err_t
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