mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 13:14:32 +02:00
Update ledc_basic_example_main.c
the order of initializers should match the declaration, to be able to also use this code in C++
This commit is contained in:
committed by
GitHub
parent
b4268c874a
commit
007c2b155e
@@ -29,8 +29,8 @@ static void example_ledc_init(void)
|
|||||||
// Prepare and then apply the LEDC PWM timer configuration
|
// Prepare and then apply the LEDC PWM timer configuration
|
||||||
ledc_timer_config_t ledc_timer = {
|
ledc_timer_config_t ledc_timer = {
|
||||||
.speed_mode = LEDC_MODE,
|
.speed_mode = LEDC_MODE,
|
||||||
.timer_num = LEDC_TIMER,
|
|
||||||
.duty_resolution = LEDC_DUTY_RES,
|
.duty_resolution = LEDC_DUTY_RES,
|
||||||
|
.timer_num = LEDC_TIMER,
|
||||||
.freq_hz = LEDC_FREQUENCY, // Set output frequency at 4 kHz
|
.freq_hz = LEDC_FREQUENCY, // Set output frequency at 4 kHz
|
||||||
.clk_cfg = LEDC_AUTO_CLK
|
.clk_cfg = LEDC_AUTO_CLK
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user