samples: led_pwm: added overlay for the esp32 board

added pwm leds in board overlay file,
added configs in board conf file

Signed-off-by: Andrei-Edward Popa <andrei_edward.popa@upb.ro>
This commit is contained in:
Andrei-Edward Popa 2021-10-28 17:31:06 +03:00 committed by Christopher Friedt
parent 02c2cae942
commit ea82845f1b
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1 @@
CONFIG_PWM_LED_ESP32=y

View File

@ -0,0 +1,26 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2021 Andrei-Edward Popa
*/
#include <dt-bindings/pwm/pwm.h>
/ {
aliases {
pwm-0 = &ledc0;
pwm-led0 = &pwm_led_blue;
};
pwmleds {
compatible = "pwm-leds";
pwm_led_blue: pwm_led_gpio0_2 {
label = "PWM LED0";
pwms = <&ledc0 2 1000 PWM_POLARITY_NORMAL>;
};
};
};
&ledc0 {
status = "okay";
};