Skip to content
Snippets Groups Projects
Commit becf1cfb authored by fxk8y's avatar fxk8y :spider:
Browse files

parent 56021689
No related branches found
No related tags found
No related merge requests found
......@@ -35,14 +35,13 @@ CyanLight::Controller::Controller(uint16_t baseChannel, uint8_t channelsConfigur
this->channelsConfigured = std::max(channelsConfigured, CyanLight::MAX_CHANNELS);
this->channels = new CyanLight::PWMChannel*[this->channelsConfigured];
//this->channels = (CyanLight::PWMChannel **) malloc(this->channelsConfigured * sizeof(CyanLight::PWMChannel*));
this->timer_cfg.duty_resolution = (ledc_timer_bit_t)this->resolution;
this->timer_cfg.freq_hz = this->frequency;
this->timer_cfg.speed_mode = LEDC_HIGH_SPEED_MODE;
this->timer_cfg.timer_num = LEDC_TIMER_0;
// Required for newer esp-idf:
//ledc_timer.clk_cfg = LEDC_AUTO_CLK, // Auto select the source clock
this->timer_cfg.freq_hz = this->frequency;
this->timer_cfg.speed_mode = LEDC_HIGH_SPEED_MODE;
this->timer_cfg.timer_num = LEDC_TIMER_0;
this->ledc_timer.clk_cfg = LEDC_AUTO_CLK;
ledc_timer_config(&this->timer_cfg);
ledc_fade_func_install(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment