mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-02 16:11:41 +01:00
Merge branch 'feat/sdm_gpio_append_mode' into 'master'
refactor(sdm): refactor gpio config mode Closes IDF-11275 See merge request espressif/esp-idf!34256
This commit is contained in:
@@ -42,7 +42,6 @@ To install an SDM channel, you should call :cpp:func:`sdm_new_channel` to get a
|
||||
- :cpp:member:`sdm_config_t::clk_src` selects the source clock for the SDM module. Note that, all channels should select the same clock source.
|
||||
- :cpp:member:`sdm_config_t::sample_rate_hz` sets the sample rate of the SDM module. A higher sample rate can help to output signals with higher SNR (Signal to Noise Ratio), and easier to restore the original signal after the filter.
|
||||
- :cpp:member:`sdm_config_t::invert_out` sets whether to invert the output signal.
|
||||
- :cpp:member:`sdm_config_t::io_loop_back` is for debugging purposes only. It enables both the GPIO's input and output ability through the GPIO matrix peripheral.
|
||||
|
||||
The function :cpp:func:`sdm_new_channel` can fail due to various errors such as insufficient memory, invalid arguments, etc. Specifically, when there are no more free channels (i.e., all hardware SDM channels have been used up), :c:macro:`ESP_ERR_NOT_FOUND` will be returned.
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ Sigma-Delta 调制通道通常应用于以下场景:
|
||||
- :cpp:member:`sdm_config_t::clk_src` 选择 SDM 模块的时钟源。注意,所有通道选择的时钟源应保持一致。
|
||||
- :cpp:member:`sdm_config_t::sample_rate_hz` 设置 SDM 模块的采样率。提高采样率可以提高输出信号的信噪比,更容易在后级通过滤波获取高精度的原始信号。
|
||||
- :cpp:member:`sdm_config_t::invert_out` 设置是否反转输出信号。
|
||||
- :cpp:member:`sdm_config_t::io_loop_back` 通过 GPIO 矩阵外设,启用 GPIO 的输入和输出功能。注意,该字段仅供调试使用。
|
||||
|
||||
函数 :cpp:func:`sdm_new_channel` 可能因为各种原因失败,如内存不足、参数无效等。当缺少空闲通道(即所有的硬件 SDM 通道均在使用中)时,将返回 :c:macro:`ESP_ERR_NOT_FOUND`。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user