The LEDC hardware abstraction layer's control class.
More...
#include <ledc.h>
|
| | Controller (const Controller &)=delete |
| Controller & | operator= (const Controller &)=delete |
| void | shutdown () |
| | Resets all channels and shuts down the controller.
|
| void | add_timer (const timer_config_t &config) |
| | Configures a new LEDC timer using the given config.
|
| void | add_channel (const channel_config_t &config) |
| | Configures a new LEDC channel using the given config.
|
| void | set_frequency (ledc_timer_t ledc_timer, uint32_t frequency) const |
| | Sets the frequency of a specific LEDC timer.
|
| void | set_duty (ledc_channel_t ledc_channel, uint32_t duty) const |
| | Sets the duty cycle of a specific LEDC channel.
|
|
| static Controller & | get_instance () |
| | Gets the controller instance.
|
The LEDC hardware abstraction layer's control class.
◆ Controller()
| HAL::LEDC::Controller::Controller |
( |
const Controller & | | ) |
|
|
delete |
◆ add_channel()
Configures a new LEDC channel using the given config.
- Parameters
-
| config | The channel config to use |
◆ add_timer()
| void HAL::LEDC::Controller::add_timer |
( |
const timer_config_t & | config | ) |
|
Configures a new LEDC timer using the given config.
- Parameters
-
| config | The timer config to use |
◆ get_instance()
| Controller & HAL::LEDC::Controller::get_instance |
( |
| ) |
|
|
inlinestatic |
Gets the controller instance.
- Note
- The instance will be created on the first call of this function
- Returns
- Reference to the controller object
◆ operator=()
| Controller & HAL::LEDC::Controller::operator= |
( |
const Controller & | | ) |
|
|
delete |
◆ set_duty()
| void HAL::LEDC::Controller::set_duty |
( |
ledc_channel_t | ledc_channel, |
|
|
uint32_t | duty ) const |
Sets the duty cycle of a specific LEDC channel.
- Parameters
-
| ledc_channel | The channel of which to set the duty cycle |
| duty | The target duty cycle |
◆ set_frequency()
| void HAL::LEDC::Controller::set_frequency |
( |
ledc_timer_t | ledc_timer, |
|
|
uint32_t | frequency ) const |
Sets the frequency of a specific LEDC timer.
- Parameters
-
| ledc_timer | The timer of which to set the frequency |
| frequency | The target frequency |
◆ shutdown()
| void HAL::LEDC::Controller::shutdown |
( |
| ) |
|
Resets all channels and shuts down the controller.
The documentation for this class was generated from the following files: