Merge branch 'feat/blink_example_refactor' into 'master'

feat(blink): add sdkconfig defaults for each target

Closes IDF-8988, IDF-8074, and IDF-9006

See merge request espressif/esp-idf!28887
This commit is contained in:
morris 2024-02-07 11:04:45 +08:00
commit d426036168
13 changed files with 20 additions and 14 deletions

View File

@ -2,9 +2,11 @@
examples/get-started/blink:
disable:
- if: IDF_TARGET in ["esp32p4", "esp32c5"]
temporary: true
reason: target esp32p4 and esp32c5 are not supported yet # TODO: IDF-8074, [ESP32C5] IDF-9006
- if: SOC_GPSPI_SUPPORTED != 1 and SOC_RMT_SUPPORTED != 1 # The blink example relies on the RMT or GPSPI to drive the led strip
depends_components:
- esp_driver_gpio
- esp_driver_spi
- esp_driver_rmt
examples/get-started/hello_world:
enable:

View File

@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
# Blink Example

View File

@ -4,8 +4,7 @@ menu "Example Configuration"
choice BLINK_LED
prompt "Blink LED type"
default BLINK_LED_GPIO if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C2
default BLINK_LED_STRIP
default BLINK_LED_GPIO
help
Select the LED type. A normal level controlled LED or an addressable LED strip.
The default selection is based on the Espressif DevKit boards.
@ -35,9 +34,6 @@ menu "Example Configuration"
config BLINK_GPIO
int "Blink GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 5 if IDF_TARGET_ESP32
default 18 if IDF_TARGET_ESP32S2
default 48 if IDF_TARGET_ESP32S3
default 8
help
GPIO number (IOxx) to blink on and off the LED.

View File

@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import logging
import os
@ -8,7 +7,6 @@ import pytest
from pytest_embedded_idf.dut import IdfDut
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8988
@pytest.mark.supported_targets
@pytest.mark.generic
def test_blink(dut: IdfDut) -> None:

View File

@ -1,2 +0,0 @@
CONFIG_BLINK_LED_STRIP=y
CONFIG_BLINK_LED_STRIP_BACKEND_SPI=y

View File

@ -0,0 +1,2 @@
CONFIG_BLINK_LED_GPIO=y
CONFIG_BLINK_GPIO=8

View File

@ -0,0 +1 @@
CONFIG_BLINK_LED_STRIP=y

View File

@ -0,0 +1 @@
CONFIG_BLINK_GPIO=5

View File

@ -0,0 +1 @@
CONFIG_BLINK_LED_STRIP=y

View File

@ -0,0 +1,2 @@
CONFIG_BLINK_GPIO=6
CONFIG_BLINK_LED_STRIP=y

View File

@ -0,0 +1 @@
CONFIG_BLINK_LED_STRIP=y

View File

@ -0,0 +1,2 @@
CONFIG_BLINK_LED_STRIP=y
CONFIG_BLINK_GPIO=18

View File

@ -0,0 +1,2 @@
CONFIG_BLINK_LED_STRIP=y
CONFIG_BLINK_GPIO=48