Function esp_idf_sys::spi_get_timing

source ยท
pub unsafe extern "C" fn spi_get_timing(
    gpio_is_used: bool,
    input_delay_ns: c_int,
    eff_clk: c_int,
    dummy_o: *mut c_int,
    cycles_remain_o: *mut c_int,
)
Expand description

@brief Calculate the timing settings of specified frequency and settings.

@param gpio_is_used True if using GPIO matrix, or False if iomux pins are used. @param input_delay_ns Input delay from SCLK launch edge to MISO data valid. @param eff_clk Effective clock frequency (in Hz) from spi_get_actual_clock(). @param dummy_o Address of dummy bits used output. Set to NULL if not needed. @param cycles_remain_o Address of cycles remaining (after dummy bits are used) output. - -1 If too many cycles remaining, suggest to compensate half a clock. - 0 If no remaining cycles or dummy bits are not used. - positive value: cycles suggest to compensate.

@note If *dummy_o is not zero, it means dummy bits should be applied in half duplex mode, and full duplex mode may not work.