[−][src]Function esp_idf_sys::spi_cal_clock
pub unsafe extern "C" fn spi_cal_clock(
fapb: c_int,
hz: c_int,
duty_cycle: c_int,
reg_o: *mut u32
) -> c_int
@brief Calculate the working frequency that is most close to desired frequency, and also the register value.
@param fapb The frequency of apb clock, should be APB_CLK_FREQ
.
@param hz Desired working frequency
@param duty_cycle Duty cycle of the spi clock
@param reg_o Output of value to be set in clock register, or NULL if not needed.
@return Actual working frequency that most fit.