spi_master: rename the hal layer function that calculates clock and timing

This commit is contained in:
Armando
2020-07-14 13:55:18 +08:00
parent dc22501b47
commit e58ce2141d
3 changed files with 4 additions and 4 deletions

View File

@@ -352,7 +352,7 @@ esp_err_t spi_bus_add_device(spi_host_device_t host_id, const spi_device_interfa
spi_hal_timing_conf_t temp_timing_conf; spi_hal_timing_conf_t temp_timing_conf;
esp_err_t ret = spi_hal_get_clock_conf(hal, dev_config->clock_speed_hz, duty_cycle, esp_err_t ret = spi_hal_cal_clock_conf(hal, dev_config->clock_speed_hz, duty_cycle,
!(bus_attr->flags & SPICOMMON_BUSFLAG_IOMUX_PINS), !(bus_attr->flags & SPICOMMON_BUSFLAG_IOMUX_PINS),
dev_config->input_delay_ns, &freq, dev_config->input_delay_ns, &freq,
&temp_timing_conf); &temp_timing_conf);

View File

@@ -169,7 +169,7 @@ void spi_hal_fetch_result(const spi_hal_context_t *hal);
* Utils * Utils
* ---------------------------------------------------------*/ * ---------------------------------------------------------*/
/** /**
* Get the configuration of clock and timing. The configuration will be used when ``spi_hal_setup_device``. * Calculate the configuration of clock and timing. The configuration will be used when ``spi_hal_setup_device``.
* *
* It is highly suggested to do this at initialization, since it takes long time. * It is highly suggested to do this at initialization, since it takes long time.
* *
@@ -185,7 +185,7 @@ void spi_hal_fetch_result(const spi_hal_context_t *hal);
* *
* @return ESP_OK if desired is available, otherwise fail. * @return ESP_OK if desired is available, otherwise fail.
*/ */
esp_err_t spi_hal_get_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf); esp_err_t spi_hal_cal_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf);
/** /**
* Get the frequency actual used. * Get the frequency actual used.

View File

@@ -49,7 +49,7 @@ void spi_hal_deinit(spi_hal_context_t *hal)
} }
} }
esp_err_t spi_hal_get_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf) esp_err_t spi_hal_cal_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf)
{ {
spi_hal_timing_conf_t temp_conf; spi_hal_timing_conf_t temp_conf;