mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
fix: led on esp32c2 devkit
This commit is contained in:
@@ -28,6 +28,7 @@ led_driver_config_t led_driver_get_config()
|
||||
led_driver_config_t config = {
|
||||
.gpio = LED_GPIO_PIN,
|
||||
.channel = LED_CHANNEL,
|
||||
.output_invert = 1,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ led_driver_handle_t led_driver_init(led_driver_config_t *config)
|
||||
.timer_sel = LEDC_TIMER_1,
|
||||
.duty = 0,
|
||||
.hpoint = 0,
|
||||
.flags.output_invert = config->output_invert,
|
||||
};
|
||||
err = ledc_channel_config(&ledc_channel);
|
||||
if (err != ESP_OK) {
|
||||
|
||||
@@ -23,6 +23,7 @@ extern "C" {
|
||||
typedef struct {
|
||||
int gpio;
|
||||
int channel;
|
||||
bool output_invert;
|
||||
} led_driver_config_t;
|
||||
|
||||
typedef void *led_driver_handle_t;
|
||||
|
||||
Reference in New Issue
Block a user