I have the next problem using Arduino core:
When I compile this:In file included from src\main.cpp:8:0:
lib/Salida/Salida.h:9:1: sorry, unimplemented: non-trivial designated initializers not supported
};
Code: Select all
#include "driver/ledc.h"
#define PIN_S1 GPIO_NUM_4
ledc_timer_config_t ledc_timer = {
.speed_mode = LEDC_HIGH_SPEED_MODE,
.bit_num = LEDC_TIMER_10_BIT,
.timer_num = LEDC_TIMER_0,
.freq_hz = 200
};
ledc_channel_config_t ledc_channel = {
.gpio_num = PIN_S1,
.speed_mode = LEDC_HIGH_SPEED_MODE,
.channel = LEDC_CHANNEL_0,
.intr_type = LEDC_INTR_DISABLE,
.timer_sel = LEDC_TIMER_0,
.duty = 2,
.hpoint = 0
};
S1()
{
ledc_timer_config(&ledc_timer);
ledc_channel_config(&ledc_channel);
}
The Arduino code is the next:
Code: Select all
#include <Salida.h>
void setup(){
S1();
}
void loop(){
}
Thanks!