Function esp_idf_svc::hal::sys::spi_get_timing
source ยท pub unsafe extern "C" fn spi_get_timing(
gpio_is_used: bool,
input_delay_ns: i32,
eff_clk: i32,
dummy_o: *mut i32,
cycles_remain_o: *mut i32,
)
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.