2016-11-05 12:18:25 -04:00
LED Control
===========
Overview
--------
2016-12-25 10:11:24 -05:00
The LED control module is primarily designed to control the intensity of LEDs, although it can be used to generate PWM signals for other purposes as well.
It has 16 channels which can generate independent waveforms that can be used to drive e.g. RGB LED devices. For maximum flexibility, the high-speed as well
as the low-speed channels can be driven from one of four high-speed/low-speed timers. The PWM controller also has the ability to automatically increase or
decrease the duty cycle gradually, allowing for fades without any processor interference.
2016-11-05 12:18:25 -04:00
Application Example
-------------------
2017-01-19 03:16:06 -05:00
LEDC change duty cycle and fading control example: :example: `peripherals/ledc` .
2016-11-05 12:18:25 -04:00
API Reference
-------------
2016-11-10 16:50:55 -05:00
Header Files
^^^^^^^^^^^^
2017-01-19 03:16:06 -05:00
* :component_file:`driver/include/driver/ledc.h`
2016-11-10 16:50:55 -05:00
2016-11-05 12:18:25 -04:00
Macros
^^^^^^
.. doxygendefine :: LEDC_APB_CLK_HZ
.. doxygendefine :: LEDC_REF_CLK_HZ
2016-12-25 10:11:24 -05:00
Type Definitions
^^^^^^^^^^^^^^^^
.. doxygentypedef :: ledc_isr_handle_t
2016-11-05 12:18:25 -04:00
Enumerations
^^^^^^^^^^^^
.. doxygenenum :: ledc_mode_t
.. doxygenenum :: ledc_intr_type_t
.. doxygenenum :: ledc_duty_direction_t
.. doxygenenum :: ledc_clk_src_t
.. doxygenenum :: ledc_timer_t
.. doxygenenum :: ledc_channel_t
.. doxygenenum :: ledc_timer_bit_t
2016-12-25 10:11:24 -05:00
Structures
^^^^^^^^^^
.. doxygenstruct :: ledc_channel_config_t
:members:
.. doxygenstruct :: ledc_timer_config_t
:members:
2016-11-05 12:18:25 -04:00
Functions
^^^^^^^^^
.. doxygenfunction :: ledc_channel_config
.. doxygenfunction :: ledc_timer_config
.. doxygenfunction :: ledc_update_duty
.. doxygenfunction :: ledc_stop
.. doxygenfunction :: ledc_set_freq
.. doxygenfunction :: ledc_get_freq
.. doxygenfunction :: ledc_set_duty
.. doxygenfunction :: ledc_get_duty
.. doxygenfunction :: ledc_set_fade
.. doxygenfunction :: ledc_isr_register
.. doxygenfunction :: ledc_timer_set
.. doxygenfunction :: ledc_timer_rst
.. doxygenfunction :: ledc_timer_pause
.. doxygenfunction :: ledc_timer_resume
.. doxygenfunction :: ledc_bind_channel_timer
2016-12-25 10:11:24 -05:00
.. doxygenfunction :: ledc_set_fade_with_step
.. doxygenfunction :: ledc_set_fade_with_time
.. doxygenfunction :: ledc_fade_func_install
.. doxygenfunction :: ledc_fade_func_uninstall
.. doxygenfunction :: ledc_fade_start