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:
parent
02c2cae942
commit
ea82845f1b
|
@ -0,0 +1 @@
|
|||
CONFIG_PWM_LED_ESP32=y
|
|
@ -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";
|
||||
};
|
Loading…
Reference in New Issue