Merge branch 'esp-matter/add_esp32c5_support' into 'main'

[Target] Add esp32c5 support

See merge request app-frameworks/esp-matter!1171
This commit is contained in:
Shu Chen
2025-06-17 03:06:33 +00:00
21 changed files with 425 additions and 25 deletions
@@ -0,0 +1,42 @@
// Copyright 2025 Espressif Systems (Shanghai) CO LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License
#include <esp_log.h>
#include <iot_button.h>
#include <button_gpio.h>
#include <driver/gpio.h>
#include <led_driver.h>
#define LED_GPIO_PIN GPIO_NUM_27
#define LED_CHANNEL 0 /* RMT_CHANNEL_0 */
#define BUTTON_GPIO_PIN GPIO_NUM_28
static const char *TAG = "device";
led_driver_config_t led_driver_get_config()
{
led_driver_config_t config = {
.gpio = LED_GPIO_PIN,
.channel = LED_CHANNEL,
};
return config;
}
button_gpio_config_t button_driver_get_config()
{
button_gpio_config_t config = {
.gpio_num = BUTTON_GPIO_PIN,
.active_level = 0,
};
return config;
}
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.5)
if (NOT ("${IDF_TARGET}" STREQUAL "esp32c5" ))
message(FATAL_ERROR "please set esp32c5 as the IDF_TARGET using 'idf.py --preview set-target esp32c5'")
endif()
SET(device_type esp32c5_devkit_c)
SET(led_type ws2812)
SET(button_type iot)
SET(extra_components_dirs_append "$ENV{ESP_MATTER_DEVICE_PATH}/../../led_driver"
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/iot_button")