samples: basic: blinky_pwm: add esp32s3_luatos_core
add support for esp32s3_luatos_core Signed-off-by: YuLong Yao <feilongphone@gmail.com>
This commit is contained in:
parent
e69616291b
commit
cf8ac53d0d
2 changed files with 88 additions and 0 deletions
44
samples/basic/blinky_pwm/boards/esp32s3_luatos_core.overlay
Normal file
44
samples/basic/blinky_pwm/boards/esp32s3_luatos_core.overlay
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Copyright (c) 2023 YuLong Yao <feilongphone@gmail.com>
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pwm/pwm.h>
|
||||
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
pwm-0 = &ledc0;
|
||||
pwm-led0 = &pwm_led_blue;
|
||||
};
|
||||
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
pwm_led_blue: pwm_led_gpio0_10 {
|
||||
label = "PWM LED0";
|
||||
pwms = <&ledc0 0 1000 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
ledc0_default: ledc0_default {
|
||||
group1 {
|
||||
pinmux = <LEDC_CH0_GPIO10>;
|
||||
output-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ledc0 {
|
||||
pinctrl-0 = <&ledc0_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
channel0@0 {
|
||||
reg = <0x0>;
|
||||
timer = <0>;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Copyright (c) 2023 YuLong Yao <feilongphone@gmail.com>
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pwm/pwm.h>
|
||||
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
pwm-0 = &ledc0;
|
||||
pwm-led0 = &pwm_led_blue;
|
||||
};
|
||||
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
pwm_led_blue: pwm_led_gpio0_10 {
|
||||
label = "PWM LED0";
|
||||
pwms = <&ledc0 0 1000 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
ledc0_default: ledc0_default {
|
||||
group1 {
|
||||
pinmux = <LEDC_CH0_GPIO10>;
|
||||
output-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ledc0 {
|
||||
pinctrl-0 = <&ledc0_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
channel0@0 {
|
||||
reg = <0x0>;
|
||||
timer = <0>;
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue