diff --git a/components/esp_driver_sdm/include/driver/sdm.h b/components/esp_driver_sdm/include/driver/sdm.h index 55849e2635..e2c5151225 100644 --- a/components/esp_driver_sdm/include/driver/sdm.h +++ b/components/esp_driver_sdm/include/driver/sdm.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -108,22 +108,6 @@ esp_err_t sdm_channel_disable(sdm_channel_handle_t chan); */ esp_err_t sdm_channel_set_pulse_density(sdm_channel_handle_t chan, int8_t density); -/** - * @brief The alias function of `sdm_channel_set_pulse_density`, it decides the pulse density of the output signal - * - * @note `sdm_channel_set_pulse_density` has a more appropriate name compare this - * alias function, suggest to turn to `sdm_channel_set_pulse_density` instead - * - * @param[in] chan SDM channel created by `sdm_new_channel` - * @param[in] duty Actually it's the quantized pulse density of the PDM output signal - * - * @return - * - ESP_OK: Set duty cycle successfully - * - ESP_ERR_INVALID_ARG: Set duty cycle failed because of invalid argument - * - ESP_FAIL: Set duty cycle failed because of other error - */ -esp_err_t sdm_channel_set_duty(sdm_channel_handle_t chan, int8_t duty); - #ifdef __cplusplus } #endif diff --git a/components/esp_driver_sdm/src/sdm.c b/components/esp_driver_sdm/src/sdm.c index 924d4cdfbe..57d352301e 100644 --- a/components/esp_driver_sdm/src/sdm.c +++ b/components/esp_driver_sdm/src/sdm.c @@ -437,9 +437,6 @@ esp_err_t sdm_channel_set_pulse_density(sdm_channel_handle_t chan, int8_t densit return ESP_OK; } -esp_err_t sdm_channel_set_duty(sdm_channel_handle_t chan, int8_t duty) -__attribute__((alias("sdm_channel_set_pulse_density"))); - #if CONFIG_SDM_ENABLE_DEBUG_LOG __attribute__((constructor)) static void sdm_override_default_log_level(void) diff --git a/docs/en/migration-guides/release-6.x/6.0/peripherals.rst b/docs/en/migration-guides/release-6.x/6.0/peripherals.rst index 5b91459887..a79972d8d1 100644 --- a/docs/en/migration-guides/release-6.x/6.0/peripherals.rst +++ b/docs/en/migration-guides/release-6.x/6.0/peripherals.rst @@ -258,6 +258,8 @@ SDMMC The legacy Sigma-Delta Modulator driver ``driver/sigmadelta.h`` is deprecated since version 5.0 (see :ref:`deprecate_sdm_legacy_driver`). Starting from version 6.0, the legacy driver is completely removed. The new driver is placed in the :component:`esp_driver_sdm`, and the header file path is ``driver/sdm.h``. + - :func:`sdm_channel_set_duty` has been removed. Use :func:`sdm_channel_set_pulse_density` instead. + LCD --- diff --git a/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst b/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst index 689a0594b3..c3f0c84671 100644 --- a/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst +++ b/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst @@ -258,6 +258,8 @@ SDMMC 旧版的 Sigma-Delta 调制器驱动 ``driver/sigmadelta.h`` 在 5.0 的版本中就已经被弃用(请参考 :ref:`deprecate_sdm_legacy_driver`)。从 6.0 版本开始,旧版驱动被完全移除。新驱动位于 :component:`esp_driver_sdm` 组件中,头文件引用路径为 ``driver/sdm.h``。 + - :func:`sdm_channel_set_duty` 已被移除。请使用 :func:`sdm_channel_set_pulse_density` 替代。 + LCD --- diff --git a/tools/idf_py_actions/hints.yml b/tools/idf_py_actions/hints.yml index d70a7d6b65..faaf713731 100644 --- a/tools/idf_py_actions/hints.yml +++ b/tools/idf_py_actions/hints.yml @@ -53,6 +53,9 @@ - re_variables: ['(esp_spiram_get_chip_size|esp_spiram_get_size)'] hint_variables: ['esp_spiram_get_chip_size and esp_spiram_get_size', 'esp_psram_get_size()'] + - + re_variables: ['sdm_channel_set_duty'] + hint_variables: ['sdm_channel_set_duty()', 'sdm_channel_set_pulse_density()'] - re: "error: implicit declaration of function '(MCPWM_GEN_TIMER_EVENT_ACTION_END|MCPWM_GEN_COMPARE_EVENT_ACTION_END|MCPWM_GEN_BRAKE_EVENT_ACTION_END)'"