ledc: Add timer selection check to the driver, and leave space for future clk tree management
This commit is contained in:
@@ -60,7 +60,7 @@ Setting the timer is done by calling the function :cpp:func:`ledc_timer_config`
|
||||
:esp32: - Speed mode :cpp:type:`ledc_mode_t`
|
||||
:not esp32: - Speed mode (value must be ``LEDC_LOW_SPEED_MODE``)
|
||||
- Timer number :cpp:type:`ledc_timer_t`
|
||||
- PWM signal frequency
|
||||
- PWM signal frequency in Hz
|
||||
- Resolution of PWM duty
|
||||
- Source clock :cpp:type:`ledc_clk_cfg_t`
|
||||
|
||||
@@ -222,6 +222,14 @@ The source clock can also limit the PWM frequency. The higher the source clock f
|
||||
|
||||
2. For {IDF_TARGET_NAME}, all timers share one clock source. In other words, it is impossible to use different clock sources for different timers.
|
||||
|
||||
When a timer is no longer needed by any channel, it can be deconfigured by calling the same function :cpp:func:`ledc_timer_config`. The configuration structure :cpp:type:`ledc_timer_config_t` passes in should be:
|
||||
|
||||
- :cpp:member:`ledc_timer_config_t::speed_mode` The speed mode of the timer which wants to be deconfigured belongs to (:cpp:type:`ledc_mode_t`)
|
||||
|
||||
- :cpp:member:`ledc_timer_config_t::timer_num` The ID of the timers which wants to be deconfigured (:cpp:type:`ledc_timer_t`)
|
||||
|
||||
- :cpp:member:`ledc_timer_config_t::deconfigure` Set this to true so that the timer specified can be deconfigured
|
||||
|
||||
|
||||
.. _ledc-api-configure-channel:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user