Function esp_idf_sys::i2c_filter_enable
source ยท pub unsafe extern "C" fn i2c_filter_enable(
i2c_num: i2c_port_t,
cyc_num: u8,
) -> esp_err_t
Expand description
@brief Enable hardware filter on I2C bus Sometimes the I2C bus is disturbed by high frequency noise(about 20ns), or the rising edge of the SCL clock is very slow, these may cause the master state machine to break. Enable hardware filter can filter out high frequency interference and make the master more stable. @note Enable filter will slow down the SCL clock.
@param i2c_num I2C port number to filter @param cyc_num the APB cycles need to be filtered (0<= cyc_num <=7). When the period of a pulse is less than cyc_num * APB_cycle, the I2C controller will ignore this pulse.
@return - ESP_OK Success - ESP_ERR_INVALID_ARG Parameter error