mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'feature/esp32s31_ledc_support' into 'master'
feat(ledc): add support for ESP32S31 Closes IDF-14709 and IDF-14710 See merge request espressif/esp-idf!47267
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
LED Control (LEDC)
|
||||
==================
|
||||
|
||||
{IDF_TARGET_LEDC_MAX_FADE_RANGE_NUM: default="1", esp32c6="16", esp32h2="16", esp32p4="16", esp32c5="16", esp32c61="16", esp32h21="16"}
|
||||
|
||||
:link_to_translation:`zh_CN:[中文]`
|
||||
|
||||
Introduction
|
||||
@@ -169,7 +167,7 @@ The source clock can also limit the PWM frequency. The higher the source clock f
|
||||
- 48 MHz
|
||||
- Dynamic Frequency Scaling compatible
|
||||
|
||||
.. only:: esp32c6 or esp32c61 or esp32p4
|
||||
.. only:: esp32c6 or esp32c61 or esp32p4 or esp32s31
|
||||
|
||||
.. list-table:: Characteristics of {IDF_TARGET_NAME} LEDC source clocks
|
||||
:widths: 15 15 30
|
||||
@@ -314,7 +312,7 @@ The LEDC hardware provides the means to gradually transition from one duty cycle
|
||||
|
||||
.. only:: SOC_LEDC_GAMMA_CURVE_FADE_SUPPORTED
|
||||
|
||||
On {IDF_TARGET_NAME}, the hardware additionally allows to perform up to {IDF_TARGET_LEDC_MAX_FADE_RANGE_NUM} consecutive linear fades without CPU intervention. This feature can be useful if you want to do a fade with gamma correction.
|
||||
On {IDF_TARGET_NAME}, the hardware additionally allows to perform consecutive linear fades without CPU intervention. This feature can be useful if you want to do a fade with gamma correction.
|
||||
|
||||
The luminance perceived by human eyes does not have a linear relationship with the PWM duty cycle. In order to make human feel the LED is dimming or lighting linearly, the change in duty cycle should be non-linear, which is the so-called gamma correction. The LED controller can simulate a gamma curve fading by piecewise linear approximation. :cpp:func:`ledc_fill_multi_fade_param_list` is a function that can help to construct the parameters for the piecewise linear fades. First, you need to allocate a memory block for saving the fade parameters, then by providing start/end PWM duty cycle values, gamma correction function, and the total number of desired linear segments to the helper function, it will fill the calculation results into the allocated space. You can also construct the array of :cpp:type:`ledc_fade_param_config_t` manually. Once the fade parameter structs are prepared, a consecutive fading can be configured by passing the pointer to the prepared :cpp:type:`ledc_fade_param_config_t` list and the total number of fade ranges to :cpp:func:`ledc_set_multi_fade`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user