Function esp_idf_sys::i2s_set_pdm_rx_down_sample

source ยท
pub unsafe extern "C" fn i2s_set_pdm_rx_down_sample(
    i2s_num: i2s_port_t,
    downsample: i2s_pdm_dsr_t,
) -> esp_err_t
Expand description

@brief Set PDM mode down-sample rate In PDM RX mode, there would be 2 rounds of downsample process in hardware. In the first downsample process, the sampling number can be 16 or 8. In the second downsample process, the sampling number is fixed as 8. So the clock frequency in PDM RX mode would be (fpcm * 64) or (fpcm * 128) accordingly. @param i2s_num I2S port number @param downsample i2s RX down sample rate for PDM mode.

@note After calling this function, it would call i2s_set_clk inside to update the clock frequency. Please call this function after I2S driver has been initialized.

@return - ESP_OK Success - ESP_ERR_INVALID_ARG Parameter error - ESP_ERR_NO_MEM Out of memory