File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
tests/drivers/pwm/pwm_loopback/socs Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ #include <zephyr/dt-bindings/pwm/pwm.h>
8+
9+ / {
10+ pwm_loopback_0 {
11+ compatible = "test-pwm-loopback";
12+ /* first index must be a 32-Bit timer */
13+ pwms = <&mcpwm0 0 0 PWM_POLARITY_NORMAL>,
14+ <&mcpwm0 6 0 PWM_POLARITY_NORMAL>;
15+ };
16+ };
17+
18+ &pinctrl {
19+ mcpwm0_default: mcpwm0_default {
20+ group1 {
21+ pinmux = <MCPWM0_OUT0A_GPIO2>;
22+ input-enable;
23+ };
24+ group2 {
25+ pinmux = <MCPWM0_CAP0_GPIO2>;
26+ output-enable;
27+ };
28+ };
29+ };
30+
31+ &mcpwm0 {
32+ pinctrl-0 = <&mcpwm0_default>;
33+ pinctrl-names = "default";
34+ prescale = <255>;
35+ prescale-timer0 = <103>;
36+ status = "okay";
37+ };
You can’t perform that action at this time.
0 commit comments