boards: esp32c6: Added PWM test file for esp32c6_devkitc

Added basic PWM test for esp32c6_devkitc

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This commit is contained in:
Raffael Rostagno 2024-05-21 11:43:05 -03:00 committed by Anas Nashif
parent d59168eecb
commit ec10f1b97f
5 changed files with 46 additions and 4 deletions

View file

@ -1,9 +1,11 @@
# ESP32C6 devkitc board configuration
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0
config HEAP_MEM_POOL_SIZE
default 98304 if WIFI
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -1,6 +1,6 @@
# ESP32C6 devkitc board configuration
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0
config BOARD_ESP32C6_DEVKITC

View file

@ -8,6 +8,7 @@
#include <espressif/esp32c6/esp32c6_wroom_n8.dtsi>
#include "esp32c6_devkitc-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "esp32c6_devkitc";
@ -31,6 +32,7 @@
user_button1: button_1 {
label = "User SW1";
gpios = <&gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
zephyr,code = <INPUT_KEY_0>;
};
};
};

View file

@ -7,8 +7,12 @@ toolchain:
- zephyr
supported:
- gpio
- watchdog
- uart
- spi
testing:
ignore_tags:
- net
- bluetooth
- pm
- tracing

View file

@ -0,0 +1,34 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
*/
#include <zephyr/dt-bindings/pwm/pwm.h>
/ {
aliases {
pwm-0 = &ledc0;
};
};
&pinctrl {
ledc0_default: ledc0_default {
group1 {
pinmux = <LEDC_CH0_GPIO2>;
output-enable;
};
};
};
&ledc0 {
pinctrl-0 = <&ledc0_default>;
pinctrl-names = "default";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel0@0 {
reg = <0x0>;
timer = <0>;
};
};